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

Prefix scoping (draft) #1

Closed
wants to merge 4 commits into from
Closed

Prefix scoping (draft) #1

wants to merge 4 commits into from

Conversation

PeterG3
Copy link
Owner

@PeterG3 PeterG3 commented Jun 17, 2024

(Netbox Feature Request) Assign Prefix/Cluster to a Region

switching from SITE assignment to SCOPE (incl site, region, location) assignment based on this old commit which did the same for VLANGROUPS netbox-community#5985

Work in progress for this official FR Allow prefixes to be assigned to a site group or region

@PeterG3
Copy link
Owner Author

PeterG3 commented Jun 17, 2024

PREFIX can be created already


{
    ....
    "prefix": "1.0.1.0/24",
    "scope_type": "dcim.site",
    "scope_id": 1,
    "scope": {
        "id": 1,
        "url": "http://localhost:8080/api/dcim/sites/1/",
        "display": "site1",
        "name": "site1",
        "slug": "site1"
    },
    ...
}

UI is still failing displaying a SITE and this PREFIX so I have to update these as well

FieldError at /dcim/sites/1/
Cannot resolve keyword 'site' into field. Choices are: _children, _depth, bookmarks, comments, contacts, created, custom_field_data, description, id, is_pool, journal_entries, last_updated, mark_utilized, prefix, role, role_id, scope, scope_id, scope_type, scope_type_id, status, tagged_items, tags, tenant, tenant_id, vlan, vlan_id, vrf, vrf_id
FieldDoesNotExist at /ipam/prefixes/1/
Prefix has no field named 'site'

@PeterG3
Copy link
Owner Author

PeterG3 commented Jun 18, 2024

Prefix UI Edit is working and changes are represented in the API now
image

 "scope_type": "dcim.region",
    "scope_id": 2,
    "scope": {
        "id": 2,
        "url": "http://localhost:8080/api/dcim/regions/2/",
        "display": "region1a",
        "name": "region1a",
        "slug": "region1",
        "_depth": 1
    },

image

 "scope_type": "dcim.site",
    "scope_id": 1,
    "scope": {
        "id": 1,
        "url": "http://localhost:8080/api/dcim/sites/1/",
        "display": "site1",
        "name": "site1",
        "slug": "site1"
    },

Copy link

github-actions bot commented Jul 4, 2024

This PR has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further action is taken.

Copy link

This PR has been automatically closed due to lack of activity.

@github-actions github-actions bot closed this Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant