Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD]base_dns_infrastructure #20

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions base_dns_infrastructure/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
==================================
Base module for DNS infrastructure
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d1fd02bc15b5b3fefcb003c19ccf93ed84a0342a9621e1bd8bafa3c6ce0351b1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Finfrastructure-lightgray.png?logo=github
:target: https://github.com/OCA/infrastructure/tree/16.0/base_dns_infrastructure
:alt: OCA/infrastructure
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/infrastructure-16-0/infrastructure-16-0-base_dns_infrastructure
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/infrastructure&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|


This module only introduces the main data model and can be used as is to
manually store DNS records. It provides the main objects.

Additional modules for specific connectors need to be added to manage the
service provider connection.

**Table of contents**

.. contents::
:local:

Installation
============

Just install this module

Configuration
=============

No configuration required.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/infrastructure/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/infrastructure/issues/new?body=module:%20base_dns_infrastructure%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Elico Corp
* LasLabs
* Mind And Go

Contributors
~~~~~~~~~~~~

* Dave Lasley <[email protected]>
* Eric Caudal <[email protected]>
* Noah Wang <[email protected]>
* Liu Lixia <[email protected]>
* Augustin Cisterne-Kaas <[email protected]>
* Florent THOMAS <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/infrastructure <https://github.com/OCA/infrastructure/tree/16.0/base_dns_infrastructure>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions base_dns_infrastructure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
29 changes: 29 additions & 0 deletions base_dns_infrastructure/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Base module for DNS infrastructure",
"version": "16.0.1.0.1",
"category": "Services",
"application": True,
"external_dependencies": {
"python": ["validator-collection"],
},
"depends": ["base", "mail"],
"author": "Elico Corp, "
"LasLabs, "
"Mind And Go, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/infrastructure",
"data": [
"data/dns_record_type.xml",
"views/dns_record_type.xml",
"views/dns_record.xml",
"views/dns_domain_zone.xml",
"views/dns_menu.xml",
"security/dns.xml",
"security/ir.model.access.csv",
],
"demo": ["demo/base_dns_infrastructure.xml"],
"installable": True,
}
159 changes: 159 additions & 0 deletions base_dns_infrastructure/data/dns_record_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record model="ir.module.category" id="module_category_infrastructure_dns">
<field name="name">Infrastructure and DNS</field>
<field name="sequence">60</field>
<field name="visible" eval="0" />
</record>


<record id="type_a" model="dns.record.type">
<field name="name">IPv4 Address</field>
<field name="code">A</field>
<field name="help">IPv4 address. Enter multiple addresses
on separate lines.
Example:
192.0.2.235
198.51.100.234
</field>
<field
name="validate_regex"
><![CDATA[^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\n?)+$]]></field>
</record>

<record id="type_aaaa" model="dns.record.type">
<field name="name">IPv6 Address</field>
<field name="code">AAAA</field>
<field name="help">IPv6 address. Enter multiple addresses
on separate lines.
Example:
2001:0db8:85a3:0:0:8a2e:0370:7334
fe80:0:0:0:202:b3ff:fe1e:8329
</field>
<field
name="validate_regex"
><![CDATA[^((?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\n?)+$]]></field>
</record>

<record id="type_cname" model="dns.record.type">
<field name="name">Canonical Name</field>
<field name="code">CNAME</field>
<field name="help">The domain name that you want to
resolve to instead of the value in the
Name field.
Example:
www.example.com
</field>
<field
name="validate_regex"
><![CDATA[^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$]]></field>
</record>

<record id="type_mx" model="dns.record.type">
<field name="name">Mail Exchange</field>
<field name="code">MX</field>
<field name="help">A priority and a domain name that
specifies a mail server. Enter multiple
values on separate lines.
Format:
[priority] [mail server host name]
Example:
10 mailserver.example.com.
20 mailserver2.example.com.
</field>
<field
name="validate_regex"
><![CDATA[^([12]?\d ([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}\n)+$]]></field>
</record>

<record id="type_txt" model="dns.record.type">
<field name="name">Text</field>
<field name="code">TXT</field>
<field name="help">A text record.
Enter multiple values on separate lines.
Enclose text in quotation marks.
Example:
"Sample Text Entries"
"Enclose entries in quotation marks"
</field>
<field name="validate_regex"><![CDATA[^(".*"\n)+$]]></field>
</record>

<record id="type_ptr" model="dns.record.type">
<field name="name">Pointer</field>
<field name="code">PTR</field>
<field name="help">The domain name that you want to return.
Example:
www.example.com
</field>
<field
name="validate_regex"
><![CDATA[^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$]]></field>
</record>

<record id="type_srv" model="dns.record.type">
<field name="name">Service Locator</field>
<field name="code">SRV</field>
<field name="help">A SRV record. For information about SRV
record format, refer to the applicable
documentation. Enter multiple values
on separate lines.
Format:
[priority] [weight] [port] [server host name]
Example:
1 10 5269 xmpp-server.example.com.
2 12 5060 sip-server.example.com.
</field>
<field
name="validate_regex"
><![CDATA[^(\d+ \d+ \d+ ([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}\n)+$]]></field>
</record>

<record id="type_spf" model="dns.record.type">
<field name="name">Sender Policy Framework</field>
<field name="code">SPF</field>
<field name="help">An SPF record. For information about SPF
record format, refer to the applicable
documentation. Enter multiple values
on separate lines. Enclose values in
quotation marks.
Example:
"v=spf1 ip4:192.168.0.1/16-all"
</field>
<field name="validate_regex"><![CDATA[.*]]></field>
</record>

<record id="type_naptr" model="dns.record.type">
<field name="name">Name Authority Pointer</field>
<field name="code">NAPTR</field>
<field name="help">An NAPTR record. For information about NAPTR
record format, refer to the applicable
documentation. Enter multiple values
on separate lines.
Format:
[order] [preference] [flags] [services] [regexp] [replacement]
Example:
100 100 "U" "" "!^.*$!sip:[email protected]!" .
10 100 "S" "SIP+D2U" "" foo.example.com.
</field>
<field name="validate_regex"><![CDATA[.*]]></field>
</record>

<record id="type_ns" model="dns.record.type">
<field name="name">Name Server</field>
<field name="code">A</field>
<field name="help">The domain name of a name server.
Enter multiple name servers on
separate lines.
Example:
ns1.amazon.com
ns2.amazon.org
ns3.amazon.net
ns4.amazon.co.uk
</field>
<field
name="validate_regex"
><![CDATA[^(([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}\n)+$]]></field>
</record>

</odoo>
30 changes: 30 additions & 0 deletions base_dns_infrastructure/demo/base_dns_infrastructure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<odoo noupdate="1">

<record id="oca_partner" model="res.partner">
<field name="name">Odoo Community</field>
<field name="ref">OCA</field>
</record>

<record id="oca_domain_zone" model="dns.domain_zone">
<field name="name">odoo-community.org</field>
<field name="owner_partner_id" ref="oca_partner" />
</record>

<record id="runboat_oca_domain_zone" model="dns.domain_zone">
<field name="name">runboat</field>
<field name="owner_partner_id" ref="oca_partner" />
<field name="parent_id" ref="oca_domain_zone" />
</record>

<record id="oca_dns_ipA" model="dns.record">
<field name="zone_id" ref="oca_domain_zone" />
<field name="type_id" ref="type_a" />
<field name="value">85.10.204.136</field>
</record>



dns.record

</odoo>
6 changes: 6 additions & 0 deletions base_dns_infrastructure/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import dns_record_type
from . import dns_domain_zone
from . import dns_record
from . import res_partner
3 changes: 3 additions & 0 deletions base_dns_infrastructure/models/dns_domain_zone/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import common
Loading
Loading