guides:reference:infoblox:infoblox_ext_attr_mapping
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:reference:infoblox:infoblox_ext_attr_mapping [2022/04/29 16:07] – yspeerte | guides:reference:infoblox:infoblox_ext_attr_mapping [2024/07/03 12:31] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
+ | |||
+ | ===== Infoblox Extended Attributes mapping ===== | ||
+ | |||
+ | For the Infoblox IPAM integration. | ||
+ | |||
+ | To create and maintain the full IPAM tree of a Client in the Infoblox GridMaster, the toll "IPAM / DHCP update" | ||
+ | |||
+ | This tool allows to select a Client and update or renew the entire IPAM tree of the supernets assigned to the Client. Since each supernet is divided into subnets of various types and size for specific purposes, the IPAM tree can be organized following this structure. | ||
+ | |||
+ | The structure can be explicitly defined per plan-id in the NMS table Dhcp_tree. The usage of this table is described in the article [[guides: | ||
+ | |||
+ | This article describes how the retrieved information for the definition of the IPAM tree can also be used to define the values of the Infoblox Extended Attributes. | ||
+ | |||
+ | These extended-attributes (or ext-attr for short) are highly customizable and fully customer specific. The Infoblox integration with NetYCE is therefore likewise highly customizable. | ||
+ | |||
+ | ==== Available YCE attributes ==== | ||
+ | |||
+ | The aforementioned IPAM / DHCP tool uses a three-staged process to manipulate the IPAM. First, a request is made to the NetYCE XML API to retrieve the information to create the desired tree. The response combines the Client' | ||
+ | |||
+ | The resulting information includes entire hierarchical IPAM trees that is composed of three types of objects: containers, networks and scopes (aka ranges). The attributes reported for each of these object types differ. The ext-attr mappings that can be defined are restricted to these attributes. | ||
+ | |||
+ | The second step involves adding automatically the desired Infoblox Extended attributes based on the information received. For all ' | ||
+ | |||
+ | The final step is creating or updating the Infoblox IPAM trees corresponding the retrieved and generated data. | ||
+ | |||
+ | Since the ext-attr ' | ||
+ | |||
+ | |||
+ | ^"< | ||
+ | |net_type |**network** |**network** |Infoblox object type | | ||
+ | |line_number |6 |6 |sequence number in tree definition | | ||
+ | |net_tier |2 |2 |relative hierarchy level of object in tree | | ||
+ | |scope |IPAM or DNS |IPAM |name of mapping configuration. '' | ||
+ | |source |netyce, hpoo or linux |netyce |origin of requester. Currently only ' | ||
+ | |task_id |1214_0001 |1214_0001 |NetYCE API's unique transaction id. Format < | ||
+ | |client_type |NY |n/a |Client_type | | ||
+ | |client_code |ASD-DC |n/a |ClientCode | ||
+ | |site_type |DC | |Site_type. Type of location. When network is not assigned to a location or service, this value is blank | | ||
+ | |site_code |ASD–NY01 |n/a |SiteCode. Location code | | ||
+ | |service_type |L3_AccessU-48 |n/a |Service-type of the service containing this network | | ||
+ | |service_name |L3_AccessU-48 | |Service-name of the service containing this network. The name is equal to the Service-type by default and is user-alterable | | ||
+ | |net_address |10.10.0.0 |10.10.1.0 |Ip-address of the network | | ||
+ | |net_mask |255.255.255.128 |255.255.255.128 |Net-mask of the network | | ||
+ | |net_size |25 |25 |Prefix or CDIR of the network | | ||
+ | |net_name |Users |Users |Name of the subnet-type as per ip-plan | | ||
+ | |net_descr |Users |Users |Name of the subnet. Equal to the net_name by default and is user-alterable | | ||
+ | |net_comment |DC - ASD–NY99 - vl401 - Users 0 |Users 2 |This string is entered by default in the Comment. Value is hardcoded | | ||
+ | |vlan_id |401 |n/a |Vlan number if assigned one | | ||
+ | |vrf_id |12 |n/a |VRF id number this network was assigned to | | ||
+ | |vrf_name |ka | |VRF name, according NetYCE VRF definition, this network was assigned to | | ||
+ | |ddns |yes |no |Enable dynamic dns: ' | ||
+ | |net_options |1, | ||
+ | | | | | | | ||
+ | ^"< | ||
+ | |net_type |**scope** |**scope** |Infoblox object type | | ||
+ | |line_number |7 |7 |sequence number in tree definition | | ||
+ | |net_tier |3 |3 |relative hierarchy level of object in tree | | ||
+ | |scope |IPAM or DNS |IPAM |name of mapping configuration. '' | ||
+ | |source |netyce, hpoo or linux |netyce |origin of requester. Currently only ' | ||
+ | |task_id |1214_0001 |1214_0001 |NetYCE API's unique transaction id. Format < | ||
+ | |client_type |NY |n/a |Client_type | | ||
+ | |client_code |ASD-DC |n/a |ClientCode | ||
+ | |site_type |DC | |Site_type. Type of location. When network is not assigned to a location or service, this value is blank | | ||
+ | |site_code |ASD–NY01 |n/a |SiteCode. Location code | | ||
+ | |service_type |L3_AccessU-48 |n/a |Service-type of the service containing this network | | ||
+ | |service_name |L3_AccessU-48 | |Service-name of the service containing this network. The name is equal to the Service-type by default and is user-alterable | | ||
+ | |net_address |10.10.0.0 |10.10.1.0 |Ip-address of the network | | ||
+ | |net_mask |255.255.255.128 |255.255.255.128 |Net-mask of the network | | ||
+ | |net_size |25 |25 |Prefix or CDIR of the network | | ||
+ | |net_name |Users |Users |Name of the subnet-type as per ip-plan | | ||
+ | |net_descr |Users |Users |Name of the subnet. Equal to the net_name by default and is user-alterable | | ||
+ | |net_comment |DC - ASD–NY99 - vl401 - Users 0 |Users 2 |This string is entered by default in the Comment. Value is hardcoded | | ||
+ | |vlan_id |401 |n/a |Vlan number if assigned one | | ||
+ | |vrf_id |12 |n/a |VRF id number this network was assigned to | | ||
+ | |vrf_name |ka | |VRF name, according NetYCE VRF definition, this network was assigned to | | ||
+ | |ddns |no |no |Enable dynamic dns: ' | ||
+ | |net_options |3 |3 |List of dhcp-option numbers that are configured for this network | | ||
+ | |scope_start |10.10.0.6 |10.10.0.6 | ||
+ | |scope_end |10.10.0.126 |10.10.0.126 |Last ip-address in the scope range | | ||
+ | |||
+ | ==== Mapping Configuration ==== | ||
+ | |||
+ | Once the Infoblox extended-attributes definitions are finalized and implemented, | ||
+ | |||
+ | The format for this file uses a pseudo-language to simplify the syntax by preserve the hierarchical nature of the configuration. The structure is outlined below: | ||
+ | |||
+ | <code perl> | ||
+ | # EXTENDED-ATTRIBUTE MAPPING CONFIGURATION | ||
+ | # | ||
+ | # scope { # IPAM or DNS | ||
+ | # Extended-attribute-name { # Infoblox Extended-attribute name | ||
+ | # source { # netyce, hpoo or linux | ||
+ | # primary-key-attribute { # mapping list supporting regex and indirect values | ||
+ | # key-attribute-value = value | ||
+ | # key-attribute-value = < | ||
+ | # key-attribute-value = pre< | ||
+ | # / | ||
+ | # / | ||
+ | # ' | ||
+ | # ' | ||
+ | # } | ||
+ | # secondary-key-attribute { # optional, additional key-attribute with mapping list | ||
+ | # key-attribute-value = value | ||
+ | # } | ||
+ | # ' | ||
+ | # key-attribute-value = value | ||
+ | # } | ||
+ | # } | ||
+ | # } | ||
+ | # } | ||
+ | </ | ||
+ | |||
+ | An example may serve best to illustrate its usage. Consider the definition of the IPAM ext-attr '' | ||
+ | |||
+ | <code perl> | ||
+ | # Example: | ||
+ | # The ext-attr ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | rn = < | ||
+ | / | ||
+ | else = < | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | When the NetYCE attribute '' | ||
+ | |||
+ | But when client_type matches the regex /f+p$/, like ' | ||
+ | |||
+ | Should neither match, the '' | ||
+ | |||
+ | In these mappings, right-hand side of the '' | ||
+ | |||
+ | This example uses a request for an an IPAM record (the scope) where the requesting application is ' | ||
+ | create mappings for these as well. | ||
+ | |||
+ | More complex mappings can be created when several key-attributes are stacked together. Two or more key-attributes, | ||
+ | |||
+ | <code perl> | ||
+ | Netwerkomgeving { | ||
+ | netyce { | ||
+ | vrf_name { | ||
+ | /^ka/ = dn | ||
+ | kn-vrf = dn | ||
+ | /linux/ = < | ||
+ | else = < | ||
+ | } | ||
+ | subnet_type { | ||
+ | /oracle/ = dc | ||
+ | /wifi/ = dn | ||
+ | users = dn | ||
+ | } | ||
+ | client_type { | ||
+ | fp = dc | ||
+ | rn = dn | ||
+ | } | ||
+ | else { | ||
+ | default = missing-vrf | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | >> <color orange> | ||
+ | |||
+ | |||
+ | > **Notes**: | ||
+ | > | ||
+ | > None of the strings need to be quoted. String-enclosing quotes will be ignored. | ||
+ | > | ||
+ | > Much of the configuration file is case-insensitive, | ||
+ | > | ||
+ | > The mapping comparisons are always case-insensitive. '' | ||
+ | > | ||
+ | > The regex-support for the mapping entries is indicated by a regex between slashes ('/ ... /'). Regex modifiers like ''/ | ||
+ | |||
+ | ==== Example configuration file ==== | ||
+ | |||
+ | filename: ''/ | ||
+ | |||
+ | <code perl> | ||
+ | IPAM { | ||
+ | CI { | ||
+ | netyce { | ||
+ | client_type { | ||
+ | fp = TI000456 | ||
+ | ny = TI000123 | ||
+ | default = missing-client_type | ||
+ | else = TI000789 | ||
+ | } | ||
+ | } | ||
+ | mon { | ||
+ | ci { | ||
+ | default = missing-ci | ||
+ | else = <ci> | ||
+ | } | ||
+ | } | ||
+ | linux { | ||
+ | ci { | ||
+ | default = missing-ci | ||
+ | else = <ci> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | RFC { | ||
+ | netyce { | ||
+ | rfc { | ||
+ | default = < | ||
+ | else = <rfc> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ReferenceCode { | ||
+ | netyce { | ||
+ | client_type { | ||
+ | /f+p$/ = < | ||
+ | ny = < | ||
+ | default = missing-client_type | ||
+ | else = < | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | NetworkEnv { | ||
+ | netyce { | ||
+ | vrf_name { | ||
+ | /linux/ = < | ||
+ | /^ka/ = dn | ||
+ | else = < | ||
+ | kn-vrf = dn | ||
+ | } | ||
+ | subnet_type { | ||
+ | /oracle/ = dc | ||
+ | /wifi/ = dn | ||
+ | users = dn | ||
+ | } | ||
+ | client_type { | ||
+ | fp = dc | ||
+ | rn = dn | ||
+ | } | ||
+ | else { | ||
+ | default = missing-vrf | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | Source { | ||
+ | netyce { | ||
+ | source { | ||
+ | netyce = NetYCE | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | DNS { | ||
+ | CI { | ||
+ | netyce { | ||
+ | client_type { | ||
+ | fp = TI000456 | ||
+ | ny = TI000123 | ||
+ | default = missing-client_type | ||
+ | else = TI000789 | ||
+ | } | ||
+ | } | ||
+ | mon { | ||
+ | ci { | ||
+ | default = missing-ci | ||
+ | else = <ci> | ||
+ | } | ||
+ | } | ||
+ | linux { | ||
+ | ci { | ||
+ | default = missing-ci | ||
+ | else = <ci> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | RFC { | ||
+ | netyce { | ||
+ | rfc { | ||
+ | default = < | ||
+ | else = <rfc> | ||
+ | } | ||
+ | } | ||
+ | mon { | ||
+ | rfc { | ||
+ | / | ||
+ | / | ||
+ | default = missing-rfc | ||
+ | else = invalid-rfc | ||
+ | } | ||
+ | } | ||
+ | linux { | ||
+ | rfc { | ||
+ | default = missing-rfc | ||
+ | else = <rfc> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | Source { | ||
+ | netyce { | ||
+ | bron { | ||
+ | else = NetYCE | ||
+ | } | ||
+ | } | ||
+ | mon { | ||
+ | bron { | ||
+ | else = NetYCE for ItShop | ||
+ | } | ||
+ | } | ||
+ | linux { | ||
+ | bron { | ||
+ | else = NetYCE for Linux | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||