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

Indicate supported instance types when querying /1.0 #12662

Merged
merged 5 commits into from
Jan 19, 2024

Conversation

MusicDin
Copy link
Member

@MusicDin MusicDin commented Dec 12, 2023

Add ServerEnvironment field for instance_type indicating which instance types are supported by the server.

node-1:~# lxc query /1.0 | jq '.environment | {server_name, instance_types}'
{
  "server_name": "node-1",
  "instance_types": [
    "virtual-machine",
    "container"
  ]
}


node-1:~# lxc query /1.0?target=node-2 | jq '.environment | {server_name, instance_types}'
{
  "server_name": "node-2",
  "instance_types": [
    "virtual-machine",
    "container"
  ]
}

c2:~# lxc query /1.0 | jq '.environment | {server_name, instance_types}'
{
  "server_name": "c2",
  "instance_types": [
    "container"
  ]
}

API extension is named server_instance_type_info.

@MusicDin MusicDin requested a review from tomponline as a code owner December 12, 2023 10:05
@github-actions github-actions bot added the API Changes to the REST API label Dec 12, 2023
@MusicDin MusicDin force-pushed the feature/member-virt-indication branch from a3f8fff to 618dde2 Compare December 12, 2023 10:27
@github-actions github-actions bot added the Documentation Documentation needs updating label Dec 12, 2023
@MusicDin MusicDin force-pushed the feature/member-virt-indication branch from 618dde2 to 14dbc81 Compare December 12, 2023 10:59
@MusicDin MusicDin changed the title Indicate virtualization support when querying /1.0 Indicate supported instance types when querying /1.0 Dec 12, 2023
tomponline
tomponline previously approved these changes Dec 15, 2023
@tomponline
Copy link
Member

@MusicDin please can you add a test to check for the container instance type support? Thanks

Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@tomponline
Copy link
Member

@MusicDin needs a rebase please

@MusicDin MusicDin force-pushed the feature/member-virt-indication branch 2 times, most recently from 2101720 to 88aa7f3 Compare January 18, 2024 14:28
@tomponline
Copy link
Member

@MusicDin needs a rebase again please

@MusicDin MusicDin force-pushed the feature/member-virt-indication branch from 91cfe8c to f3e2858 Compare January 18, 2024 22:14
@tomponline tomponline merged commit 4d5ac96 into canonical:main Jan 19, 2024
25 checks passed
@MusicDin MusicDin deleted the feature/member-virt-indication branch January 19, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants