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

Generic Relation for Secrets (Needs API feedback) #2428

Closed

Conversation

AndyGauge
Copy link

Fixes: #1503

Fixes: #1503

This change replaces the Device Foreign Key with a GenericRelationship that allows extending the scope of Secrets. Currently there are test failures for the API updating devices. This work does not include extending the Secrets to any additional objects, yet. This is an example output from the api:

{
    "id": 1,
    "object": {
        "id": 1,
        "url": "http://localhost:8000/api/dcim/devices/1/",
        "name": "a",
        "display_name": "a",
        "class": "device"
    },
    "role": {
        "id": 1,
        "url": "http://localhost:8000/api/secrets/secret-roles/1/",
        "name": "Login Credentials",
        "slug": "login-credentials"
    },
    "name": "ab",
    "plaintext": "--",
    "hash": "------",
    "tags": [],
    "custom_fields": {},
    "created": "2018-08-10",
    "last_updated": "2018-08-10T18:00:23.899052Z"
}

The 'device' node is replaced with 'object' which includes the 'class' of 'device'

@AndyGauge
Copy link
Author

I thought maybe recreating the PR with the same code would resolve the netbox database does not exist issue. Alas, not.

@AndyGauge AndyGauge closed this Sep 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the assignment of secrets to objects other than devices
1 participant