diff --git a/actions/server.list.yaml b/actions/server.list.yaml index 9ea1a649b..3d94b9373 100644 --- a/actions/server.list.yaml +++ b/actions/server.list.yaml @@ -29,7 +29,7 @@ parameters: properties_to_select: default: - "flavor_id" - - "hypervisor_id" + - "hypervisor_name" - "image_id" - "project_id" - "server_creation_date" @@ -43,7 +43,7 @@ parameters: description: " A comma-spaced list of server properties to display for the resulting servers - leave empty for all properties. One of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' diff --git a/actions/server.search.by.datetime.yaml b/actions/server.search.by.datetime.yaml index 016f5c8a8..93ed891a0 100644 --- a/actions/server.search.by.datetime.yaml +++ b/actions/server.search.by.datetime.yaml @@ -29,7 +29,7 @@ parameters: properties_to_select: default: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -43,7 +43,7 @@ parameters: description: " A comma-spaced list of server properties to display for the resulting servers - leave empty for all properties. One of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -125,7 +125,7 @@ parameters: default: null enum: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -140,7 +140,7 @@ parameters: - multiple of the same property will be ignored. Any of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' diff --git a/actions/server.search.by.property.yaml b/actions/server.search.by.property.yaml index 308778f75..c8e855ac1 100644 --- a/actions/server.search.by.property.yaml +++ b/actions/server.search.by.property.yaml @@ -29,7 +29,7 @@ parameters: properties_to_select: default: - "flavor_id" - - "hypervisor_id" + - "hypervisor_name" - "image_id" - "project_id" - "server_creation_date" @@ -43,7 +43,7 @@ parameters: description: " A comma-spaced list of server properties to display for the resulting servers - leave empty for all properties. One of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -75,7 +75,7 @@ parameters: description: "choose property to search by (acts as OR for each)" enum: - "flavor_id" - - "hypervisor_id" + - "hypervisor_name" - "image_id" - "server_description" - "server_id" @@ -113,7 +113,7 @@ parameters: default: null enum: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -128,7 +128,7 @@ parameters: - multiple of the same property will be ignored. Any of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' diff --git a/actions/server.search.by.regex.yaml b/actions/server.search.by.regex.yaml index 6cd26e112..51beaf972 100644 --- a/actions/server.search.by.regex.yaml +++ b/actions/server.search.by.regex.yaml @@ -29,7 +29,7 @@ parameters: properties_to_select: default: - "flavor_id" - - "hypervisor_id" + - "hypervisor_name" - "image_id" - "project_id" - "server_creation_date" @@ -43,7 +43,7 @@ parameters: description: " A comma-spaced list of server properties to display for the resulting servers - leave empty for all properties. One of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -75,7 +75,7 @@ parameters: description: "choose property to search by" enum: - "flavor_id" - - "hypervisor_id" + - "hypervisor_name" - "image_id" - "server_description" - "server_id" @@ -105,7 +105,7 @@ parameters: default: null enum: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' @@ -120,7 +120,7 @@ parameters: - multiple of the same property will be ignored. Any of: - 'flavor_id' - - 'hypervisor_id' + - 'hypervisor_name' - 'image_id' - 'project_id' - 'server_creation_date' diff --git a/lib/email_api/email_template_schemas.yaml b/lib/email_api/email_template_schemas.yaml index fefde9c7e..1a4b642e0 100644 --- a/lib/email_api/email_template_schemas.yaml +++ b/lib/email_api/email_template_schemas.yaml @@ -47,7 +47,7 @@ shutoff_vm: html_filepath: "html/shutoff_vm.html.j2" plaintext_filepath: "plaintext/shutoff_vm.txt.j2" -hypervisor_vm: +vms_on_hypervisor: schema: username: null vm_table: "No VMs" diff --git a/lib/enums/query/props/server_properties.py b/lib/enums/query/props/server_properties.py index 119ce6a64..c53702c62 100644 --- a/lib/enums/query/props/server_properties.py +++ b/lib/enums/query/props/server_properties.py @@ -27,7 +27,10 @@ def _get_aliases(): A method that returns all valid string alias mappings """ return { - ServerProperties.HYPERVISOR_NAME: ["hv_name", "hypervisor_name"], + ServerProperties.HYPERVISOR_NAME: [ + "hv_name", # using hypervisor name as the shared-common property because the hypervisor id + "hypervisor_name", # was inconsistent between servers and hypervisors + ], ServerProperties.SERVER_CREATION_DATE: ["created_at"], ServerProperties.SERVER_DESCRIPTION: [ "description", diff --git a/lib/openstack_query/docs/user_docs/query_docs/SERVERS.md b/lib/openstack_query/docs/user_docs/query_docs/SERVERS.md index 61b2e1c1c..10c8e0d17 100644 --- a/lib/openstack_query/docs/user_docs/query_docs/SERVERS.md +++ b/lib/openstack_query/docs/user_docs/query_docs/SERVERS.md @@ -30,7 +30,7 @@ from enums.query.props.server_properties import ServerProperties | Property Enum | Type | Aliases | Description | |--------------------------|--------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | FLAVOR_ID | `string` | `None` | The ID of the Flavor the Server is using | -| HYPERVISOR_ID | `string` | `None` | The ID of the Hypervisor the Server is being hosted on | +| HYPERVISOR_NAME | `string` | `None` | Name of the Hypervisor the Server is being hosted on | | IMAGE_ID | `string` | `None` | The ID of the Image the Server is using | | PROJECT_ID | `string` | `None` | The ID of the Project the Server is associated with | | SERVER_CREATION_DATE | `string` (x) | "created_at" | Timestamp of when the server was created. | @@ -69,7 +69,7 @@ The following shared-common properties are listed below (as well as the Query ob | ServerProperties.PROJECT_ID | ProjectProperties.PROJECT_ID | Many-to-One | `ServerQuery` to `ProjectQuery` | [PROJECTS.md](PROJECTS.md) | | ServerProperties.FLAVOR_ID | FlavorProperties.FLAVOR_ID | Many-to-One | `ServerQuery` to `FlavorQuery` | [FLAVORS.md](FLAVORS.md) | | ServerProperties.IMAGE_ID | ImageProperties.IMAGE_ID | Many-to-One | `ServerQuery` to `ImageQuery` | [IMAGES.md](IMAGES.md) | -| ServerProperties.HYPERVISOR_ID | HypervisorProperties.HYPERVISOR_ID | Many-to-One | `ServerQuery` to `HypervisorQuery` | [HYPERVISORS.md](HYPERVISORS.md) | +| ServerProperties.HYPERVISOR_NAME | HypervisorProperties.HYPERVISOR_NAME | Many-to-One | `ServerQuery` to `HypervisorQuery` | [HYPERVISORS.md](HYPERVISORS.md) | @@ -82,7 +82,7 @@ Chaining from other `ServerQuery` requires passing `SERVER_QUERY` or any aliases | `ProjectQuery` | ProjectProperties.PROJECT_ID | ServerProperties.PROJECT_ID | One-to-Many | [PROJECTS.md](PROJECTS.md) | | `FlavorQuery` | FlavorProperties.FLAVOR_ID | ServerProperties.FLAVOR_ID | One-to-Many | [FLAVORS.md](FLAVORS.md) | | `ImageQuery` | ImageProperties.IMAGE_ID | ServerProperties.IMAGE_ID | Many-to-One | [IMAGES.md](IMAGES.md) | -| `HypervisorQuery` | HypervisorProperties.HYPERVISOR_ID | ServerProperties.FLAVOR_ID | One-to-Many | [HYPERVISORS.md](HYPERVISORS.md) | +| `HypervisorQuery` | HypervisorProperties.HYPERVISOR_NAME | ServerProperties.FLAVOR_ID | One-to-Many | [HYPERVISORS.md](HYPERVISORS.md) | ## run() meta-parameters diff --git a/tests/enums/props/test_server_properties.py b/tests/enums/props/test_server_properties.py index aab1d092b..36d025862 100644 --- a/tests/enums/props/test_server_properties.py +++ b/tests/enums/props/test_server_properties.py @@ -48,7 +48,7 @@ def test_flavor_id_serialization(val): ) def test_hypervisor_name_serialization(val): """ - Tests that variants of HYPERVISOR_ID can be serialized + Tests that variants of HYPERVISOR_NAME can be serialized """ assert ServerProperties.from_string(val) is ServerProperties.HYPERVISOR_NAME