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

Delivery Services ID result return null when doing GET Request for Federations Users #4065

Closed
2 of 16 tasks
dpham692 opened this issue Nov 1, 2019 · 1 comment · Fixed by #4066
Closed
2 of 16 tasks
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops

Comments

@dpham692
Copy link
Contributor

dpham692 commented Nov 1, 2019

I'm submitting a ...

  • bug report
  • new feature / enhancement request
  • improvement request (usability, performance, tech debt, etc.)
  • other

Traffic Control components affected ...

  • CDN in a Box
  • Documentation
  • Grove
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • unknown

Current behavior:

First create a Federation with a Delivery Service on TP. If using TO please do this:
Create a federation POST Request:
https://{{TO_BASE_URL}}/api/{{api_version}}/cdns/999/federations
With this json payload:

{
        "cname": "test.quest.",
        "ttl": 48,
        "description": "A test federation"
}

Add Delivery Services to Federations. POST Request:
https://{{TO_BASE_URL}}/api/{{api_version}}/federations/{{federationsID}}/deliveryservices
With this json payload:

{
        "dsIds": [1],
        "replace": true
}

So now we have a Federations with a Delivery Service. Check again with GET Request:
https://{{TO_BASE_URL}}/api/{{api_version}}/federations/{{fedID}}/deliveryservices It will display the CDN connecting to that Delivery Service.
Now add a Users that already connected to a Delivery Services to Federations. POST Request:
https://{{TO_BASE_URL}}/api/{{api_version}}/federations/{{fedID}}//users
And now is the error, when return the users information with GET Request:
https://{{TO_BASE_URL}}/api/{{api_version}}/federations/{{fedID}}//users
The dsIds will be null.

{
    "response": [
        {
            "dsIds": null,
            "email": null,
            "fullName": null,
            "id": 2,
            "role": "admin",
            "username": "admin"
        }
    ]
}

Expected / new behavior:

When do a GET Request for the users should return format like this:
https://{{TO_BASE_URL}}/api/{{api_version}}/federations/{{fedID}}//users

{ "response": [
        {
                "fullName": null,
                "email": null,
                "id": 2,
                "role": "admin",
                "company": null,
                "username": "admin"
        }
]}

Minimal reproduction of the problem with instructions:

Anything else:

@mhoppa
Copy link
Contributor

mhoppa commented Nov 1, 2019

Talked to @dandypham on the rewrite the wrong json tag was used for company https://github.com/apache/trafficcontrol/blob/master/lib/go-tc/federation.go#L171.

Needs to be fixed to company. PR coming soon

@mitchell852 mitchell852 added Traffic Ops related to Traffic Ops bug something isn't working as intended regression bug a bug in existing functionality introduced by a new version labels Nov 1, 2019
@mitchell852 mitchell852 removed the bug something isn't working as intended label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants