Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Multiple descr attributes duplicates inherited template attributes #4

@jalmargyyk

Description

@jalmargyyk

If a specific customer template has multiple "descr" attributes, the ripe update will fail. The reason for this seems to be duplication of status attribute and other attributes from the inherited base template.

e.g.
templates.json:

{
    "templates":
    {
        "TEST-NET": {
            "attributes": [
                {"descr": "Test Company Ltd."},
                {"descr": "Test road 1234"}
            ],
            "inherit": "base_test_company.json"
        }
    }
}

base_test_company.json:

{ "attributes": [
    {"org": ""},
    {"admin-c": "AA2-TEST"},
    {"tech-c": "AA2-TEST"},
    {"mnt-by": "TEST-NCC-HM-MNT"},
    {"status": "ASSIGNED PA"},
    {"source": "TEST"}
]}

ripe-updater tries to send the following object to ripe db:

{'objects': {'object': [
      {'source': {'id': 'RIPE'
        }, 'attributes': {'attribute': [
            {'name': 'inetnum', 'value': '192.168.0.0 - 192.168.0.255'
            },
            {'name': 'netname', 'value': 'TEST-NET'
            },
            {'name': 'descr', 'value': 'Test Company Ltd.'
            },
            {'name': 'descr', 'value': 'Test road 1234'
            },
            {'name': 'org', 'value': 'ORG-EIPB1-TEST'
            },
            {'name': 'country', 'value': 'FI'
            },
            {'name': 'admin-c', 'value': 'AA2-TEST'
            },
            {'name': 'tech-c', 'value': 'AA2-TEST'
            },
            {'name': 'mnt-by', 'value': 'TEST-NCC-HM-MNT'
            },
            {'name': 'admin-c', 'value': 'AA2-TEST'
            },
            {'name': 'tech-c', 'value': 'AA2-TEST'
            },
            {'name': 'mnt-by', 'value': 'TEST-NCC-HM-MNT'
            },
            {'name': 'status', 'value': 'ASSIGNED PA'
            },
            {'name': 'source', 'value': 'RIPE'
            },
            {'name': 'status', 'value': 'ASSIGNED PA'
            }
          ]
        }
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions