-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLINT-246] Add pagination support for baremetal conductors (#17026)
* enabled capability and added unit tests for conductors pagination for rest api * fixing metrics and file names * enabled capability and added unit tests for conductors pagination for sdk api * fixed linting * indexing by hostname instead of uuid, and adjusting test cases to match * additional fixes to test files
- Loading branch information
1 parent
30e2b3f
commit 3437025
Showing
14 changed files
with
351 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[PLINT-246] Add pagination support for baremetal conductors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
.../conductors/limit=1/marker=agent-integrations-openstack-ironic-to-next/response-1.80.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic?limit=1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic?limit=1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
], | ||
"previous": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next?limit=1" | ||
} |
20 changes: 20 additions & 0 deletions
20
...al/v1/conductors/limit=1/marker=agent-integrations-openstack-ironic-to-next/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic?limit=1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic?limit=1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
], | ||
"previous": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next?limit=1" | ||
} |
20 changes: 20 additions & 0 deletions
20
openstack_controller/tests/fixtures/GET/baremetal/v1/conductors/limit=1/response-1.80.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
], | ||
"next": "http://127.0.0.1/baremetal/v1/conductors?limit=1&marker=agent-integrations-openstack-ironic" | ||
} |
20 changes: 20 additions & 0 deletions
20
openstack_controller/tests/fixtures/GET/baremetal/v1/conductors/limit=1/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
], | ||
"next": "http://127.0.0.1/baremetal/v1/conductors?limit=1&marker=agent-integrations-openstack-ironic" | ||
} |
34 changes: 34 additions & 0 deletions
34
...stack_controller/tests/fixtures/GET/baremetal/v1/conductors/limit=1000/response-1.80.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next?limit=1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
}, | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic?limit=1000", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic?limit=1000", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
openstack_controller/tests/fixtures/GET/baremetal/v1/conductors/limit=1000/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
}, | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
] | ||
} |
47 changes: 31 additions & 16 deletions
47
openstack_controller/tests/fixtures/GET/baremetal/v1/conductors/response-1.80.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
{ | ||
"conductors": [ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://34.141.226.224/baremetal/v1/conductors/agent-integrations-openstack-ironic", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://34.141.226.224/baremetal/conductors/agent-integrations-openstack-ironic", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
}, | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
] | ||
} | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
openstack_controller/tests/fixtures/GET/baremetal/v1/conductors/response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"conductors": [ | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic-to-next", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic-to-next", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
}, | ||
{ | ||
"hostname": "agent-integrations-openstack-ironic", | ||
"conductor_group": "", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1/baremetal/v1/conductors/agent-integrations-openstack-ironic", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://127.0.0.1/baremetal/conductors/agent-integrations-openstack-ironic", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"alive": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.