octavia_tempest_plugin.services.load_balancer.v2 package

Submodules

octavia_tempest_plugin.services.load_balancer.v2.amphora_client module

class AmphoraClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

amphora_failover(amphora_id)[source]

Failover an amphora.

Parameters:

amphora_id – The ID of the amphora to failover.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

base_uri = '/v2.0/octavia/{object}'
get_amphora_stats(amphora_id, query_params=None, return_object_only=True)[source]

Get amphora statistics.

Parameters:
  • amphora_id – The amphora ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An amphora statistics object.

list_amphorae(query_params=None, return_object_only=True)[source]

Get a list of amphora objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of amphora objects.

list_root_tag = 'amphorae'
root_tag = 'amphora'
show_amphora(amphora_id, query_params=None, return_object_only=True)[source]

Get amphora details.

Parameters:
  • amphora_id – The amphora ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An amphora object.

stats_root_tag = 'amphora_stats'
update_amphora_config(amphora_id)[source]

Update the amphora agent configuration.

Parameters:

amphora_id – The ID of the amphora to update.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

octavia_tempest_plugin.services.load_balancer.v2.availability_zone_capabilities_client module

class AvailabilityZoneCapabilitiesClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

list_availability_zone_capabilities(provider, query_params=None, return_object_only=True)[source]

Get a list of provider availability zone capability objects.

Parameters:
  • provider – The provider to query for availability zone capabilities.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone capability objects.

list_root_tag = 'availability_zone_capabilities'

octavia_tempest_plugin.services.load_balancer.v2.availability_zone_client module

class AvailabilityZoneClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_an_availability_zone(availability_zone_name)[source]

Delete an availability zone for tempest cleanup.

We cannot use the cleanup_availability_zone method as availability zones do not have a provisioning_status.

Parameters:

availability_zone_name – The availability zone name to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_availability_zone(name, availability_zone_profile_id, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create an availability zone.

Parameters:
  • name – Human-readable name of the resource.

  • availability_zone_profile_id – The ID of the associated availability zone profile.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use. The default is True.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

delete_availability_zone(availability_zone_name, ignore_errors=False)[source]

Delete an availability zone.

Parameters:
  • availability_zone_name – The availability zone name to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_availability_zones(query_params=None, return_object_only=True)[source]

Get a list of availability zone objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone objects.

list_root_tag = 'availability_zones'
resource_path = 'availabilityzones'
root_tag = 'availability_zone'
show_availability_zone(availability_zone_name, query_params=None, return_object_only=True)[source]

Get the availability zone details.

Parameters:
  • availability_zone_name – The availability zone name to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

update_availability_zone(availability_zone_name, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update an availability zone.

Parameters:
  • availability_zone_name – The availability zone name to update.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

octavia_tempest_plugin.services.load_balancer.v2.availability_zone_profile_client module

class AvailabilityZoneProfileClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_availability_zone_profile(availability_zone_profile_id)[source]

Delete an availability zone profile for tempest cleanup.

We cannot use the cleanup_availability_zone_profile method as availability zone profiles do not have a provisioning_status.

Parameters:

availability_zone_profile_id – The availability zone profile ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_availability_zone_profile(name, provider_name, availability_zone_data, return_object_only=True)[source]

Create an availability zone profile.

Parameters:
  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • availability_zone_data – The JSON string containing the availability zone metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

delete_availability_zone_profile(availability_zone_profile_id, ignore_errors=False)[source]

Delete an availability zone profile.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_availability_zone_profiles(query_params=None, return_object_only=True)[source]

Get a list of availability zone profile objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone profile objects.

list_root_tag = 'availability_zone_profiles'
resource_path = 'availabilityzoneprofiles'
root_tag = 'availability_zone_profile'
show_availability_zone_profile(availability_zone_profile_id, query_params=None, return_object_only=True)[source]

Get the availability zone profile details.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

update_availability_zone_profile(availability_zone_profile_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider_name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, availability_zone_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update an availability zone profile.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to update.

  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • availability_zone_data – The JSON string containing the availability zone metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

octavia_tempest_plugin.services.load_balancer.v2.base_client module

class BaseLBaaSClient(auth_provider, service, region, **kwargs)[source]

Bases: RestClient

base_uri = '/v2.0/lbaas/{object}'
get_max_api_version()[source]

Get the maximum version available on the API endpoint.

Returns:

Maximum version string available on the endpoint.

is_resource_deleted(id)[source]

Check if the object is deleted.

Parameters:

id – The object ID to check.

Returns:

boolean state representing the object’s deleted state

is_version_supported(api_version, version)[source]

Check if a version is supported by the API.

Parameters:
  • api_version – Reference endpoint API version.

  • version – Version to check against API version.

Returns:

boolean if the version is supported.

list_root_tag = None
root_tag = None
class Unset[source]

Bases: object

octavia_tempest_plugin.services.load_balancer.v2.flavor_capabilities_client module

class FlavorCapabilitiesClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

list_flavor_capabilities(provider, query_params=None, return_object_only=True)[source]

Get a list of provider flavor capability objects.

Parameters:
  • provider – The provider to query for flavor capabilities.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor capability objects.

list_root_tag = 'flavor_capabilities'

octavia_tempest_plugin.services.load_balancer.v2.flavor_client module

class FlavorClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_a_flavor(flavor_id)[source]

Delete a flavor for tempest cleanup.

We cannot use the cleanup_flavor method as flavors do not have a provisioning_status.

Parameters:

flavor_id – The flavor ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_flavor(name, flavor_profile_id, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a flavor.

Parameters:
  • name – Human-readable name of the resource.

  • flavor_profile_id – The ID of the associated flavor profile.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use. The default is True.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

delete_flavor(flavor_id, ignore_errors=False)[source]

Delete a flavor.

Parameters:
  • flavor_id – The flavor ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_flavors(query_params=None, return_object_only=True)[source]

Get a list of flavor objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor objects.

list_root_tag = 'flavors'
root_tag = 'flavor'
show_flavor(flavor_id, query_params=None, return_object_only=True)[source]

Get the flavor details.

Parameters:
  • flavor_id – The flavor ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

update_flavor(flavor_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a flavor.

Parameters:
  • flavor_id – The flavor ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

octavia_tempest_plugin.services.load_balancer.v2.flavor_profile_client module

class FlavorProfileClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_flavor_profile(flavorprofile_id)[source]

Delete a flavor profile for tempest cleanup.

We cannot use the cleanup_flavorprofile method as flavor profiles do not have a provisioning_status.

Parameters:

flavorprofile_id – The flavor profile ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_flavor_profile(name, provider_name, flavor_data, return_object_only=True)[source]

Create a flavor profile.

Parameters:
  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • flavor_data – The JSON string containing the flavor metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

delete_flavor_profile(flavorprofile_id, ignore_errors=False)[source]

Delete a flavor profile.

Parameters:
  • flavorprofile_id – The flavor profile ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_flavor_profiles(query_params=None, return_object_only=True)[source]

Get a list of flavor profile objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor profile objects.

list_root_tag = 'flavorprofiles'
root_tag = 'flavorprofile'
show_flavor_profile(flavorprofile_id, query_params=None, return_object_only=True)[source]

Get the flavor profile details.

Parameters:
  • flavorprofile_id – The flavor profile ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

update_flavor_profile(flavorprofile_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider_name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, flavor_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a flavor profile.

Parameters:
  • flavorprofile_id – The flavor profile ID to update.

  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • flavor_data – The JSON string containing the flavor metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

octavia_tempest_plugin.services.load_balancer.v2.healthmonitor_client module

class HealthMonitorClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_healthmonitor(pool_id, type, delay, timeout, max_retries, max_retries_down=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, http_method=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, url_path=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, expected_codes=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a healthmonitor.

Parameters:
  • pool_id – The ID of the pool.

  • type – The type of health monitor.

  • delay – The time, in seconds, between sending probes to members.

  • timeout – The maximum time, in seconds, that a monitor waits to connect before it times out.

  • max_retries – The number of successful checks before changing the operating status of the member to ONLINE.

  • max_retries_down – The number of allowed check failures before changing the operating status of the member to ERROR.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • http_method – The HTTP method that the health monitor uses for requests.

  • url_path – The HTTP URL path of the request sent by the monitor to test the health of a backend member.

  • expected_codes – The list of HTTP status codes expected in response from the member to declare it healthy.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

delete_healthmonitor(healthmonitor_id, ignore_errors=False)[source]

Delete a healthmonitor.

Parameters:
  • healthmonitor_id – The healthmonitor ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_healthmonitors(query_params=None, return_object_only=True)[source]

Get a list of healthmonitor objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of healthmonitor objects.

list_root_tag = 'healthmonitors'
resource_name = 'healthmonitor'
root_tag = 'healthmonitor'
show_healthmonitor(healthmonitor_id, query_params=None, return_object_only=True)[source]

Get healthmonitor details.

Parameters:
  • healthmonitor_id – The healthmonitor ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

update_healthmonitor(healthmonitor_id, delay=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, max_retries=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, max_retries_down=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, http_method=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, url_path=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, expected_codes=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a healthmonitor.

Parameters:
  • healthmonitor_id – The healthmonitor ID to update.

  • delay – The time, in seconds, between sending probes to members.

  • timeout – The maximum time, in seconds, that a monitor waits to connect before it times out.

  • max_retries – The number of successful checks before changing the operating status of the member to ONLINE.

  • max_retries_down – The number of allowed check failures before changing the operating status of the member to ERROR.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • http_method – The HTTP method that the health monitor uses for requests.

  • url_path – The HTTP URL path of the request sent by the monitor to test the health of a backend member.

  • expected_codes – The list of HTTP status codes expected in response from the member to declare it healthy.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

octavia_tempest_plugin.services.load_balancer.v2.l7policy_client module

class L7PolicyClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_l7policy(listener_id, action, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, position=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_url=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a l7policy.

Parameters:
  • listener_id – The ID of the listener for the l7policy.

  • action – The l7policy action.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • position – The position of this policy on the listener.

  • redirect_pool_id – Requests matching this policy will be redirected to the pool with this ID.

  • redirect_url – Requests matching this policy will be redirected to this URL.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

delete_l7policy(l7policy_id, ignore_errors=False)[source]

Delete a l7policy.

Parameters:
  • l7policy_id – The l7policy ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_l7policies(query_params=None, return_object_only=True)[source]

Get a list of l7policy objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of l7policy objects.

list_root_tag = 'l7policies'
resource_name = 'l7policy'
root_tag = 'l7policy'
show_l7policy(l7policy_id, query_params=None, return_object_only=True)[source]

Get l7policy details.

Parameters:
  • l7policy_id – The l7policy ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

update_l7policy(l7policy_id, action=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, position=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_url=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a l7policy.

Parameters:
  • l7policy_id – The l7policy ID to update.

  • action – The l7policy action.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • position – The position of this policy on the listener.

  • redirect_pool_id – Requests matching this policy will be redirected to the pool with this ID.

  • redirect_url – Requests matching this policy will be redirected to this URL.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

octavia_tempest_plugin.services.load_balancer.v2.l7rule_client module

class L7RuleClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_l7rule(l7rule_id, l7policy_id, lb_client=None, lb_id=None)[source]
create_l7rule(l7policy_id, type, value, compare_type, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, key=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, invert=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a l7rule.

Parameters:
  • l7policy_id – The ID of the l7policy for the l7rule.

  • type – The L7 rule type.

  • value – The value to use for the comparison.

  • compare_type – The comparison type for the L7 rule.

  • tags – The tags of the L7 rule.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • key – The key to use for the comparison.

  • invert – When true the logic of the rule is inverted.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

delete_l7rule(l7rule_id, l7policy_id, ignore_errors=False)[source]

Delete a l7rule.

Parameters:
  • l7rule_id – The l7rule ID to delete.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

is_resource_deleted(id)[source]

Check if the object is deleted.

Parameters:

id – The object ID to check.

Returns:

boolean state representing the object’s deleted state

list_l7rules(l7policy_id, query_params=None, return_object_only=True)[source]

Get a list of l7rule objects.

Parameters:
  • l7policy_id – The ID of the l7policy for the l7rule.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of l7rule objects.

list_root_tag = 'rules'
resource_name = 'l7rule'
root_tag = 'rule'
show_l7rule(l7rule_id, l7policy_id, query_params=None, return_object_only=True)[source]

Get l7rule details.

Parameters:
  • l7rule_id – The l7rule ID to query.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

update_l7rule(l7rule_id, l7policy_id, type=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, value=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, compare_type=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, key=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, invert=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a l7rule.

Parameters:
  • l7rule_id – The l7rule ID to update.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • type – The L7 rule type.

  • value – The value to use for the comparison.

  • compare_type – The comparison type for the L7 rule.

  • tags – The tags of the L7 rule.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • key – The key to use for the comparison.

  • invert – When true the logic of the rule is inverted.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

octavia_tempest_plugin.services.load_balancer.v2.listener_client module

class ListenerClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_listener(protocol, protocol_port, loadbalancer_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, connection_limit=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_client_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_connect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_tcp_inspect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, insert_headers=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, sni_container_refs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_authentication=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, allowed_cidrs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_max_age=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_include_subdomains=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_preload=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a listener.

Parameters:
  • protocol – The protocol for the resource.

  • protocol_port – The protocol port number for the resource.

  • loadbalancer_id – The ID of the load balancer.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • connection_limit – The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections.

  • timeout_client_data – Frontend client inactivity timeout in milliseconds.

  • timeout_member_connect – Backend member connection timeout in milliseconds.

  • timeout_member_data – Backend member inactivity timeout in milliseconds.

  • timeout_tcp_inspect – Time, in milliseconds, to wait for additional TCP packets for content inspection.

  • insert_headers – A dictionary of optional headers to insert into the request before it is sent to the backend member.

  • default_pool_id – The ID of the pool used by the listener if no L7 policies match.

  • default_tls_container_ref – The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners.

  • sni_container_refs – A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners.

  • client_authentication – The TLS client authentication mode. One of the options NONE, OPTIONAL or MANDATORY.

  • client_ca_tls_container_ref – The ref of the key manager service secret containing a PEM format client CA certificate bundle for TERMINATED_HTTPS listeners.

  • client_crl_container_ref – The URI of the key manager service secret containing a PEM format CA revocation list file for TERMINATED_HTTPS listeners.

  • allowed_cidrs – A list of IPv4 or IPv6 CIDRs.

  • alpn_protocols – A list of ALPN protocols for TERMINATED_HTTPS listeners.

  • hsts_include_subdomains – Defines whether the include_subdomains directive is used for HSTS or not

  • hsts_max_age – Enables HTTP Strict Transport Security (HSTS) and sets the max_age directive to given value

  • hsts_preload – Defines whether the hsts_preload directive is used for HSTS or not

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

delete_listener(listener_id, ignore_errors=False)[source]

Delete a listener.

Parameters:
  • listener_id – The listener ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

get_listener_stats(listener_id, query_params=None, return_object_only=True)[source]

Get listener statistics.

Parameters:
  • listener_id – The listener ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener statistics object.

list_listeners(query_params=None, return_object_only=True)[source]

Get a list of listener objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of listener objects.

list_root_tag = 'listeners'
root_tag = 'listener'
show_listener(listener_id, query_params=None, return_object_only=True)[source]

Get listener details.

Parameters:
  • listener_id – The listener ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

update_listener(listener_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, connection_limit=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_client_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_connect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_tcp_inspect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, insert_headers=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, sni_container_refs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_authentication=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, allowed_cidrs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_max_age=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_include_subdomains=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_preload=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a listener.

Parameters:
  • listener_id – The listener ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • connection_limit – The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections.

  • timeout_client_data – Frontend client inactivity timeout in milliseconds.

  • timeout_member_connect – Backend member connection timeout in milliseconds.

  • timeout_member_data – Backend member inactivity timeout in milliseconds.

  • timeout_tcp_inspect – Time, in milliseconds, to wait for additional TCP packets for content inspection.

  • insert_headers – A dictionary of optional headers to insert into the request before it is sent to the backend member.

  • default_pool_id – The ID of the pool used by the listener if no L7 policies match.

  • default_tls_container_ref – The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners.

  • sni_container_refs – A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners.

  • client_authentication – The TLS client authentication mode. One of the options NONE, OPTIONAL or MANDATORY.

  • client_ca_tls_container_ref – The ref of the key manager service secret containing a PEM format client CA certificate bundle for TERMINATED_HTTPS listeners.

  • client_crl_container_ref – The URI of the key manager service secret containing a PEM format CA revocation list file for TERMINATED_HTTPS listeners.

  • allowed_cidrs – A list of IPv4 or IPv6 CIDRs.

  • alpn_protocols – A list of ALPN protocols for TERMINATED_HTTPS listeners.

  • hsts_include_subdomains – Defines whether the include_subdomains directive is used for HSTS or not

  • hsts_max_age – Enables HTTP Strict Transport Security (HSTS) and sets the max_age directive to given value

  • hsts_preload – Defines whether the hsts_preload directive is used for HSTS or not

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

octavia_tempest_plugin.services.load_balancer.v2.loadbalancer_client module

class LoadbalancerClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_loadbalancer(name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, flavor_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, listeners=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, project_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_network_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_port_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_qos_policy_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_subnet_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>)[source]

Create a loadbalancer.

Parameters:
  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • flavor – The loadbalancer flavor ID.

  • listeners – A list of listner dictionaries.

  • project_id – The ID of the project owning this resource.

  • provider – Provider name for the loadbalancer.

  • vip_address – The IP address of the Virtual IP (VIP).

  • vip_network_id – The ID of the network for the Virtual IP (VIP).

  • vip_port_id – The ID of the Virtual IP (VIP) port.

  • vip_qos_policy_id – The ID of the QoS Policy which will apply to the Virtual IP (VIP).

  • vip_subnet_id – The ID of the subnet for the Virtual IP (VIP).

  • tags – A human-readable tags of the resource.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

delete_loadbalancer(lb_id, cascade=False, ignore_errors=False)[source]

Delete a loadbalancer.

Parameters:
  • lb_id – The loadbalancer ID to delete.

  • ignore_errors – True if errors should be ignored.

  • cascade – If true will delete all child objects of an object, if that object supports it.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

failover_loadbalancer(lb_id)[source]

Failover a loadbalancer.

Parameters:

lb_id – The loadbalancer ID to query.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

get_loadbalancer_stats(lb_id, query_params=None, return_object_only=True)[source]

Get loadbalancer statistics.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer statistics object.

get_loadbalancer_status(lb_id, query_params=None, return_object_only=True)[source]

Get a loadbalancer status tree.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer statuses object.

list_loadbalancers(query_params=None, return_object_only=True)[source]

Get a list of loadbalancer objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of loadbalancer objects.

list_root_tag = 'loadbalancers'
root_tag = 'loadbalancer'
show_loadbalancer(lb_id, query_params=None, return_object_only=True)[source]

Get loadbalancer details.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

update_loadbalancer(lb_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_qos_policy_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a loadbalancer.

Parameters:
  • lb_id – The loadbalancer ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • vip_qos_policy_id – The ID of the QoS Policy which will apply to the Virtual IP (VIP).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

octavia_tempest_plugin.services.load_balancer.v2.member_client module

class MemberClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_member(member_id, pool_id, lb_client=None, lb_id=None)[source]
create_member(pool_id, address, protocol_port, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, weight=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, backup=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, subnet_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_port=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a member.

Parameters:
  • pool_id – The ID of the pool where the member will live.

  • address – The IP address of the resource.

  • protocol_port – The protocol port number for the resource.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • weight – The weight of a member determines the portion of requests or connections it services compared to the other members of the pool.

  • backup – Is the member a backup?

  • subnet_id – The subnet ID which the member service is accessible from

  • monitor_address – An alternate IP address used for health monitoring a backend member.

  • monitor_port – An alternate protocol port used for health monitoring a backend member.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

delete_member(member_id, pool_id, ignore_errors=False)[source]

Delete a member.

Parameters:
  • member_id – The member ID to delete.

  • pool_id – The ID of the pool where the member lives.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

is_resource_deleted(id)[source]

Check if the object is deleted.

Parameters:

id – The object ID to check.

Returns:

boolean state representing the object’s deleted state

list_members(pool_id, query_params=None, return_object_only=True)[source]

Get a list of member objects.

Parameters:
  • pool_id – The ID of the pool where the members live.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of member objects.

list_root_tag = 'members'
root_tag = 'member'
show_member(member_id, pool_id, query_params=None, return_object_only=True)[source]

Get member details.

Parameters:
  • member_id – The member ID to query.

  • pool_id – The ID of the pool where the member lives.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

update_member(member_id, pool_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, weight=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, backup=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_port=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a member.

Parameters:
  • member_id – The member ID to update.

  • pool_id – The ID of the pool where the member lives.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • weight – The weight of a member determines the portion of requests or connections it services compared to the other members of the pool.

  • backup – Is the member a backup?

  • monitor_address – An alternate IP address used for health monitoring a backend member.

  • monitor_port – An alternate protocol port used for health monitoring a backend member.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

update_members(pool_id, members_list)[source]

Batch update all members on a pool.

Parameters:
  • pool_id – The ID of the pool where the members live.

  • members_list – The list of members to enforce on the pool.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

octavia_tempest_plugin.services.load_balancer.v2.pool_client module

class PoolClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_pool(protocol, lb_algorithm, loadbalancer_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, listener_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, session_persistence=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a pool.

Parameters:
  • protocol – The protocol for the resource.

  • lb_algorithm – The load balancing algorithm for the pool.

  • loadbalancer_id – The ID of the load balancer for the pool.

  • listener_id – The ID of the listener for the pool.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • session_persistence – A JSON object specifying the session persistence for the pool or null for no session persistence.

  • ca_tls_container_ref – The key manager ref for a secret containing the PEM encoded CA certificate to validate pool members against.

  • crl_container_ref – The key manager ref for a secret containing the PEM encoded CRL to use when validating pool members.

  • tls_enabled – A boolean, True when the pool should connect to members using TLS.

  • tls_container_ref – The key manager ref for a secret containing a PKCS12 bundle with the client authentication certificate and key used when connecting to pool members over TLS.

  • alpn_protocols – A list of ALPN protocols for TLS enabled pools.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

delete_pool(pool_id, ignore_errors=False)[source]

Delete a pool.

Parameters:
  • pool_id – The pool ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_pools(query_params=None, return_object_only=True)[source]

Get a list of pool objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of pool objects.

list_root_tag = 'pools'
resource_name = 'pool'
root_tag = 'pool'
show_pool(pool_id, query_params=None, return_object_only=True)[source]

Get pool details.

Parameters:
  • pool_id – The pool ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

update_pool(pool_id, lb_algorithm=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, session_persistence=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a pool.

Parameters:
  • pool_id – The pool ID to update.

  • lb_algorithm – The load balancing algorithm for the pool.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • session_persistence – A JSON object specifying the session persistence for the pool or null for no session persistence.

  • ca_tls_container_ref – The key manager ref for a secret containing the PEM encoded CA certificate to validate pool members against.

  • crl_container_ref – The key manager ref for a secret containing the PEM encoded CRL to use when validating pool members.

  • tls_enabled – A boolean, True when the pool should connect to members using TLS.

  • tls_container_ref – The key manager ref for a secret containing a PKCS12 bundle with the client authentication certificate and key used when connecting to pool members over TLS.

  • alpn_protocols – A list of ALPN protocols for TLS enabled pools.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

octavia_tempest_plugin.services.load_balancer.v2.provider_client module

class ProviderClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

list_providers(query_params=None, return_object_only=True)[source]

Get a list of provider objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of provider objects.

list_root_tag = 'providers'

Module contents

class AmphoraClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

amphora_failover(amphora_id)[source]

Failover an amphora.

Parameters:

amphora_id – The ID of the amphora to failover.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

base_uri = '/v2.0/octavia/{object}'
get_amphora_stats(amphora_id, query_params=None, return_object_only=True)[source]

Get amphora statistics.

Parameters:
  • amphora_id – The amphora ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An amphora statistics object.

list_amphorae(query_params=None, return_object_only=True)[source]

Get a list of amphora objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of amphora objects.

list_root_tag = 'amphorae'
root_tag = 'amphora'
show_amphora(amphora_id, query_params=None, return_object_only=True)[source]

Get amphora details.

Parameters:
  • amphora_id – The amphora ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An amphora object.

stats_root_tag = 'amphora_stats'
update_amphora_config(amphora_id)[source]

Update the amphora agent configuration.

Parameters:

amphora_id – The ID of the amphora to update.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

class AvailabilityZoneCapabilitiesClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

list_availability_zone_capabilities(provider, query_params=None, return_object_only=True)[source]

Get a list of provider availability zone capability objects.

Parameters:
  • provider – The provider to query for availability zone capabilities.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone capability objects.

list_root_tag = 'availability_zone_capabilities'
class AvailabilityZoneClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_an_availability_zone(availability_zone_name)[source]

Delete an availability zone for tempest cleanup.

We cannot use the cleanup_availability_zone method as availability zones do not have a provisioning_status.

Parameters:

availability_zone_name – The availability zone name to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_availability_zone(name, availability_zone_profile_id, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create an availability zone.

Parameters:
  • name – Human-readable name of the resource.

  • availability_zone_profile_id – The ID of the associated availability zone profile.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use. The default is True.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

delete_availability_zone(availability_zone_name, ignore_errors=False)[source]

Delete an availability zone.

Parameters:
  • availability_zone_name – The availability zone name to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_availability_zones(query_params=None, return_object_only=True)[source]

Get a list of availability zone objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone objects.

list_root_tag = 'availability_zones'
resource_path = 'availabilityzones'
root_tag = 'availability_zone'
show_availability_zone(availability_zone_name, query_params=None, return_object_only=True)[source]

Get the availability zone details.

Parameters:
  • availability_zone_name – The availability zone name to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

update_availability_zone(availability_zone_name, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update an availability zone.

Parameters:
  • availability_zone_name – The availability zone name to update.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone object.

class AvailabilityZoneProfileClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_availability_zone_profile(availability_zone_profile_id)[source]

Delete an availability zone profile for tempest cleanup.

We cannot use the cleanup_availability_zone_profile method as availability zone profiles do not have a provisioning_status.

Parameters:

availability_zone_profile_id – The availability zone profile ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_availability_zone_profile(name, provider_name, availability_zone_data, return_object_only=True)[source]

Create an availability zone profile.

Parameters:
  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • availability_zone_data – The JSON string containing the availability zone metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

delete_availability_zone_profile(availability_zone_profile_id, ignore_errors=False)[source]

Delete an availability zone profile.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_availability_zone_profiles(query_params=None, return_object_only=True)[source]

Get a list of availability zone profile objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of availability zone profile objects.

list_root_tag = 'availability_zone_profiles'
resource_path = 'availabilityzoneprofiles'
root_tag = 'availability_zone_profile'
show_availability_zone_profile(availability_zone_profile_id, query_params=None, return_object_only=True)[source]

Get the availability zone profile details.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

update_availability_zone_profile(availability_zone_profile_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider_name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, availability_zone_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update an availability zone profile.

Parameters:
  • availability_zone_profile_id – The availability zone profile ID to update.

  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • availability_zone_data – The JSON string containing the availability zone metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

An availability zone profile object.

class FlavorCapabilitiesClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

list_flavor_capabilities(provider, query_params=None, return_object_only=True)[source]

Get a list of provider flavor capability objects.

Parameters:
  • provider – The provider to query for flavor capabilities.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor capability objects.

list_root_tag = 'flavor_capabilities'
class FlavorClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_a_flavor(flavor_id)[source]

Delete a flavor for tempest cleanup.

We cannot use the cleanup_flavor method as flavors do not have a provisioning_status.

Parameters:

flavor_id – The flavor ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_flavor(name, flavor_profile_id, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a flavor.

Parameters:
  • name – Human-readable name of the resource.

  • flavor_profile_id – The ID of the associated flavor profile.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use. The default is True.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

delete_flavor(flavor_id, ignore_errors=False)[source]

Delete a flavor.

Parameters:
  • flavor_id – The flavor ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_flavors(query_params=None, return_object_only=True)[source]

Get a list of flavor objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor objects.

list_root_tag = 'flavors'
root_tag = 'flavor'
show_flavor(flavor_id, query_params=None, return_object_only=True)[source]

Get the flavor details.

Parameters:
  • flavor_id – The flavor ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

update_flavor(flavor_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a flavor.

Parameters:
  • flavor_id – The flavor ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • enabled – If the resource is available for use.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor object.

class FlavorProfileClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_flavor_profile(flavorprofile_id)[source]

Delete a flavor profile for tempest cleanup.

We cannot use the cleanup_flavorprofile method as flavor profiles do not have a provisioning_status.

Parameters:

flavorprofile_id – The flavor profile ID to delete.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

create_flavor_profile(name, provider_name, flavor_data, return_object_only=True)[source]

Create a flavor profile.

Parameters:
  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • flavor_data – The JSON string containing the flavor metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

delete_flavor_profile(flavorprofile_id, ignore_errors=False)[source]

Delete a flavor profile.

Parameters:
  • flavorprofile_id – The flavor profile ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_flavor_profiles(query_params=None, return_object_only=True)[source]

Get a list of flavor profile objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of flavor profile objects.

list_root_tag = 'flavorprofiles'
root_tag = 'flavorprofile'
show_flavor_profile(flavorprofile_id, query_params=None, return_object_only=True)[source]

Get the flavor profile details.

Parameters:
  • flavorprofile_id – The flavor profile ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

update_flavor_profile(flavorprofile_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider_name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, flavor_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a flavor profile.

Parameters:
  • flavorprofile_id – The flavor profile ID to update.

  • name – Human-readable name of the resource.

  • provider_name – The octavia provider name.

  • flavor_data – The JSON string containing the flavor metadata.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A flavor profile object.

class HealthMonitorClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_healthmonitor(pool_id, type, delay, timeout, max_retries, max_retries_down=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, http_method=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, url_path=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, expected_codes=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a healthmonitor.

Parameters:
  • pool_id – The ID of the pool.

  • type – The type of health monitor.

  • delay – The time, in seconds, between sending probes to members.

  • timeout – The maximum time, in seconds, that a monitor waits to connect before it times out.

  • max_retries – The number of successful checks before changing the operating status of the member to ONLINE.

  • max_retries_down – The number of allowed check failures before changing the operating status of the member to ERROR.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • http_method – The HTTP method that the health monitor uses for requests.

  • url_path – The HTTP URL path of the request sent by the monitor to test the health of a backend member.

  • expected_codes – The list of HTTP status codes expected in response from the member to declare it healthy.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

delete_healthmonitor(healthmonitor_id, ignore_errors=False)[source]

Delete a healthmonitor.

Parameters:
  • healthmonitor_id – The healthmonitor ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_healthmonitors(query_params=None, return_object_only=True)[source]

Get a list of healthmonitor objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of healthmonitor objects.

list_root_tag = 'healthmonitors'
resource_name = 'healthmonitor'
root_tag = 'healthmonitor'
show_healthmonitor(healthmonitor_id, query_params=None, return_object_only=True)[source]

Get healthmonitor details.

Parameters:
  • healthmonitor_id – The healthmonitor ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

update_healthmonitor(healthmonitor_id, delay=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, max_retries=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, max_retries_down=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, http_method=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, url_path=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, expected_codes=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a healthmonitor.

Parameters:
  • healthmonitor_id – The healthmonitor ID to update.

  • delay – The time, in seconds, between sending probes to members.

  • timeout – The maximum time, in seconds, that a monitor waits to connect before it times out.

  • max_retries – The number of successful checks before changing the operating status of the member to ONLINE.

  • max_retries_down – The number of allowed check failures before changing the operating status of the member to ERROR.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • http_method – The HTTP method that the health monitor uses for requests.

  • url_path – The HTTP URL path of the request sent by the monitor to test the health of a backend member.

  • expected_codes – The list of HTTP status codes expected in response from the member to declare it healthy.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A healthmonitor object.

class L7PolicyClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_l7policy(listener_id, action, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, position=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_url=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a l7policy.

Parameters:
  • listener_id – The ID of the listener for the l7policy.

  • action – The l7policy action.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • position – The position of this policy on the listener.

  • redirect_pool_id – Requests matching this policy will be redirected to the pool with this ID.

  • redirect_url – Requests matching this policy will be redirected to this URL.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

delete_l7policy(l7policy_id, ignore_errors=False)[source]

Delete a l7policy.

Parameters:
  • l7policy_id – The l7policy ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_l7policies(query_params=None, return_object_only=True)[source]

Get a list of l7policy objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of l7policy objects.

list_root_tag = 'l7policies'
resource_name = 'l7policy'
root_tag = 'l7policy'
show_l7policy(l7policy_id, query_params=None, return_object_only=True)[source]

Get l7policy details.

Parameters:
  • l7policy_id – The l7policy ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

update_l7policy(l7policy_id, action=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, position=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, redirect_url=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a l7policy.

Parameters:
  • l7policy_id – The l7policy ID to update.

  • action – The l7policy action.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • position – The position of this policy on the listener.

  • redirect_pool_id – Requests matching this policy will be redirected to the pool with this ID.

  • redirect_url – Requests matching this policy will be redirected to this URL.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7policy object.

class L7RuleClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_l7rule(l7rule_id, l7policy_id, lb_client=None, lb_id=None)[source]
create_l7rule(l7policy_id, type, value, compare_type, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, key=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, invert=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a l7rule.

Parameters:
  • l7policy_id – The ID of the l7policy for the l7rule.

  • type – The L7 rule type.

  • value – The value to use for the comparison.

  • compare_type – The comparison type for the L7 rule.

  • tags – The tags of the L7 rule.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • key – The key to use for the comparison.

  • invert – When true the logic of the rule is inverted.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

delete_l7rule(l7rule_id, l7policy_id, ignore_errors=False)[source]

Delete a l7rule.

Parameters:
  • l7rule_id – The l7rule ID to delete.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

is_resource_deleted(id)[source]

Check if the object is deleted.

Parameters:

id – The object ID to check.

Returns:

boolean state representing the object’s deleted state

list_l7rules(l7policy_id, query_params=None, return_object_only=True)[source]

Get a list of l7rule objects.

Parameters:
  • l7policy_id – The ID of the l7policy for the l7rule.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of l7rule objects.

list_root_tag = 'rules'
resource_name = 'l7rule'
root_tag = 'rule'
show_l7rule(l7rule_id, l7policy_id, query_params=None, return_object_only=True)[source]

Get l7rule details.

Parameters:
  • l7rule_id – The l7rule ID to query.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

update_l7rule(l7rule_id, l7policy_id, type=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, value=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, compare_type=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, key=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, invert=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a l7rule.

Parameters:
  • l7rule_id – The l7rule ID to update.

  • l7policy_id – The ID of the l7policy for the l7rule.

  • type – The L7 rule type.

  • value – The value to use for the comparison.

  • compare_type – The comparison type for the L7 rule.

  • tags – The tags of the L7 rule.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • key – The key to use for the comparison.

  • invert – When true the logic of the rule is inverted.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A l7rule object.

class ListenerClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_listener(protocol, protocol_port, loadbalancer_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, connection_limit=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_client_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_connect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_tcp_inspect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, insert_headers=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, sni_container_refs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_authentication=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, allowed_cidrs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_max_age=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_include_subdomains=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_preload=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a listener.

Parameters:
  • protocol – The protocol for the resource.

  • protocol_port – The protocol port number for the resource.

  • loadbalancer_id – The ID of the load balancer.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • connection_limit – The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections.

  • timeout_client_data – Frontend client inactivity timeout in milliseconds.

  • timeout_member_connect – Backend member connection timeout in milliseconds.

  • timeout_member_data – Backend member inactivity timeout in milliseconds.

  • timeout_tcp_inspect – Time, in milliseconds, to wait for additional TCP packets for content inspection.

  • insert_headers – A dictionary of optional headers to insert into the request before it is sent to the backend member.

  • default_pool_id – The ID of the pool used by the listener if no L7 policies match.

  • default_tls_container_ref – The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners.

  • sni_container_refs – A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners.

  • client_authentication – The TLS client authentication mode. One of the options NONE, OPTIONAL or MANDATORY.

  • client_ca_tls_container_ref – The ref of the key manager service secret containing a PEM format client CA certificate bundle for TERMINATED_HTTPS listeners.

  • client_crl_container_ref – The URI of the key manager service secret containing a PEM format CA revocation list file for TERMINATED_HTTPS listeners.

  • allowed_cidrs – A list of IPv4 or IPv6 CIDRs.

  • alpn_protocols – A list of ALPN protocols for TERMINATED_HTTPS listeners.

  • hsts_include_subdomains – Defines whether the include_subdomains directive is used for HSTS or not

  • hsts_max_age – Enables HTTP Strict Transport Security (HSTS) and sets the max_age directive to given value

  • hsts_preload – Defines whether the hsts_preload directive is used for HSTS or not

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

delete_listener(listener_id, ignore_errors=False)[source]

Delete a listener.

Parameters:
  • listener_id – The listener ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

get_listener_stats(listener_id, query_params=None, return_object_only=True)[source]

Get listener statistics.

Parameters:
  • listener_id – The listener ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener statistics object.

list_listeners(query_params=None, return_object_only=True)[source]

Get a list of listener objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of listener objects.

list_root_tag = 'listeners'
root_tag = 'listener'
show_listener(listener_id, query_params=None, return_object_only=True)[source]

Get listener details.

Parameters:
  • listener_id – The listener ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

update_listener(listener_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, connection_limit=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_client_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_connect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_member_data=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, timeout_tcp_inspect=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, insert_headers=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_pool_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, default_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, sni_container_refs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_authentication=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, client_crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, allowed_cidrs=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_max_age=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_include_subdomains=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, hsts_preload=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a listener.

Parameters:
  • listener_id – The listener ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • connection_limit – The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections.

  • timeout_client_data – Frontend client inactivity timeout in milliseconds.

  • timeout_member_connect – Backend member connection timeout in milliseconds.

  • timeout_member_data – Backend member inactivity timeout in milliseconds.

  • timeout_tcp_inspect – Time, in milliseconds, to wait for additional TCP packets for content inspection.

  • insert_headers – A dictionary of optional headers to insert into the request before it is sent to the backend member.

  • default_pool_id – The ID of the pool used by the listener if no L7 policies match.

  • default_tls_container_ref – The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners.

  • sni_container_refs – A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners.

  • client_authentication – The TLS client authentication mode. One of the options NONE, OPTIONAL or MANDATORY.

  • client_ca_tls_container_ref – The ref of the key manager service secret containing a PEM format client CA certificate bundle for TERMINATED_HTTPS listeners.

  • client_crl_container_ref – The URI of the key manager service secret containing a PEM format CA revocation list file for TERMINATED_HTTPS listeners.

  • allowed_cidrs – A list of IPv4 or IPv6 CIDRs.

  • alpn_protocols – A list of ALPN protocols for TERMINATED_HTTPS listeners.

  • hsts_include_subdomains – Defines whether the include_subdomains directive is used for HSTS or not

  • hsts_max_age – Enables HTTP Strict Transport Security (HSTS) and sets the max_age directive to given value

  • hsts_preload – Defines whether the hsts_preload directive is used for HSTS or not

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A listener object.

class LoadbalancerClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_loadbalancer(name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, flavor_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, listeners=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, project_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, provider=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_network_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_port_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_qos_policy_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_subnet_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>)[source]

Create a loadbalancer.

Parameters:
  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • flavor – The loadbalancer flavor ID.

  • listeners – A list of listner dictionaries.

  • project_id – The ID of the project owning this resource.

  • provider – Provider name for the loadbalancer.

  • vip_address – The IP address of the Virtual IP (VIP).

  • vip_network_id – The ID of the network for the Virtual IP (VIP).

  • vip_port_id – The ID of the Virtual IP (VIP) port.

  • vip_qos_policy_id – The ID of the QoS Policy which will apply to the Virtual IP (VIP).

  • vip_subnet_id – The ID of the subnet for the Virtual IP (VIP).

  • tags – A human-readable tags of the resource.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

delete_loadbalancer(lb_id, cascade=False, ignore_errors=False)[source]

Delete a loadbalancer.

Parameters:
  • lb_id – The loadbalancer ID to delete.

  • ignore_errors – True if errors should be ignored.

  • cascade – If true will delete all child objects of an object, if that object supports it.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

failover_loadbalancer(lb_id)[source]

Failover a loadbalancer.

Parameters:

lb_id – The loadbalancer ID to query.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None

get_loadbalancer_stats(lb_id, query_params=None, return_object_only=True)[source]

Get loadbalancer statistics.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer statistics object.

get_loadbalancer_status(lb_id, query_params=None, return_object_only=True)[source]

Get a loadbalancer status tree.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer statuses object.

list_loadbalancers(query_params=None, return_object_only=True)[source]

Get a list of loadbalancer objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of loadbalancer objects.

list_root_tag = 'loadbalancers'
root_tag = 'loadbalancer'
show_loadbalancer(lb_id, query_params=None, return_object_only=True)[source]

Get loadbalancer details.

Parameters:
  • lb_id – The loadbalancer ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

update_loadbalancer(lb_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, vip_qos_policy_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a loadbalancer.

Parameters:
  • lb_id – The loadbalancer ID to update.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • vip_qos_policy_id – The ID of the QoS Policy which will apply to the Virtual IP (VIP).

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A loadbalancer object.

class MemberClient(*args, **kwargs)[source]

Bases: BaseLBaaSClient

cleanup_member(member_id, pool_id, lb_client=None, lb_id=None)[source]
create_member(pool_id, address, protocol_port, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, weight=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, backup=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, subnet_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_port=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a member.

Parameters:
  • pool_id – The ID of the pool where the member will live.

  • address – The IP address of the resource.

  • protocol_port – The protocol port number for the resource.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • weight – The weight of a member determines the portion of requests or connections it services compared to the other members of the pool.

  • backup – Is the member a backup?

  • subnet_id – The subnet ID which the member service is accessible from

  • monitor_address – An alternate IP address used for health monitoring a backend member.

  • monitor_port – An alternate protocol port used for health monitoring a backend member.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

delete_member(member_id, pool_id, ignore_errors=False)[source]

Delete a member.

Parameters:
  • member_id – The member ID to delete.

  • pool_id – The ID of the pool where the member lives.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

is_resource_deleted(id)[source]

Check if the object is deleted.

Parameters:

id – The object ID to check.

Returns:

boolean state representing the object’s deleted state

list_members(pool_id, query_params=None, return_object_only=True)[source]

Get a list of member objects.

Parameters:
  • pool_id – The ID of the pool where the members live.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of member objects.

list_root_tag = 'members'
root_tag = 'member'
show_member(member_id, pool_id, query_params=None, return_object_only=True)[source]

Get member details.

Parameters:
  • member_id – The member ID to query.

  • pool_id – The ID of the pool where the member lives.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

update_member(member_id, pool_id, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, weight=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, backup=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_address=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, monitor_port=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a member.

Parameters:
  • member_id – The member ID to update.

  • pool_id – The ID of the pool where the member lives.

  • name – Human-readable name of the resource.

  • tags – Human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • weight – The weight of a member determines the portion of requests or connections it services compared to the other members of the pool.

  • backup – Is the member a backup?

  • monitor_address – An alternate IP address used for health monitoring a backend member.

  • monitor_port – An alternate protocol port used for health monitoring a backend member.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

update_members(pool_id, members_list)[source]

Batch update all members on a pool.

Parameters:
  • pool_id – The ID of the pool where the members live.

  • members_list – The list of members to enforce on the pool.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A member object.

class PoolClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

create_pool(protocol, lb_algorithm, loadbalancer_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, listener_id=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, session_persistence=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Create a pool.

Parameters:
  • protocol – The protocol for the resource.

  • lb_algorithm – The load balancing algorithm for the pool.

  • loadbalancer_id – The ID of the load balancer for the pool.

  • listener_id – The ID of the listener for the pool.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • session_persistence – A JSON object specifying the session persistence for the pool or null for no session persistence.

  • ca_tls_container_ref – The key manager ref for a secret containing the PEM encoded CA certificate to validate pool members against.

  • crl_container_ref – The key manager ref for a secret containing the PEM encoded CRL to use when validating pool members.

  • tls_enabled – A boolean, True when the pool should connect to members using TLS.

  • tls_container_ref – The key manager ref for a secret containing a PKCS12 bundle with the client authentication certificate and key used when connecting to pool members over TLS.

  • alpn_protocols – A list of ALPN protocols for TLS enabled pools.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

delete_pool(pool_id, ignore_errors=False)[source]

Delete a pool.

Parameters:
  • pool_id – The pool ID to delete.

  • ignore_errors – True if errors should be ignored.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

None if ignore_errors is True, the response status code if not.

list_pools(query_params=None, return_object_only=True)[source]

Get a list of pool objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of pool objects.

list_root_tag = 'pools'
resource_name = 'pool'
root_tag = 'pool'
show_pool(pool_id, query_params=None, return_object_only=True)[source]

Get pool details.

Parameters:
  • pool_id – The pool ID to query.

  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

update_pool(pool_id, lb_algorithm=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, name=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, description=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tags=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, admin_state_up=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, session_persistence=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, ca_tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, crl_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_enabled=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, tls_container_ref=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, alpn_protocols=<class 'octavia_tempest_plugin.services.load_balancer.v2.base_client.Unset'>, return_object_only=True)[source]

Update a pool.

Parameters:
  • pool_id – The pool ID to update.

  • lb_algorithm – The load balancing algorithm for the pool.

  • name – Human-readable name of the resource.

  • description – A human-readable description for the resource.

  • tags – A human-readable tags of the resource.

  • admin_state_up – The administrative state of the resource, which is up (true) or down (false).

  • session_persistence – A JSON object specifying the session persistence for the pool or null for no session persistence.

  • ca_tls_container_ref – The key manager ref for a secret containing the PEM encoded CA certificate to validate pool members against.

  • crl_container_ref – The key manager ref for a secret containing the PEM encoded CRL to use when validating pool members.

  • tls_enabled – A boolean, True when the pool should connect to members using TLS.

  • tls_container_ref – The key manager ref for a secret containing a PKCS12 bundle with the client authentication certificate and key used when connecting to pool members over TLS.

  • alpn_protocols – A list of ALPN protocols for TLS enabled pools.

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A pool object.

class ProviderClient(auth_provider, service, region, **kwargs)[source]

Bases: BaseLBaaSClient

list_providers(query_params=None, return_object_only=True)[source]

Get a list of provider objects.

Parameters:
  • query_params – The optional query parameters to append to the request. Ex. fields=id&fields=name

  • return_object_only – If True, the response returns the object inside the root tag. False returns the full response from the API.

Raises:
  • AssertionError – if the expected_code isn’t a valid http success response code

  • BadRequest – If a 400 response code is received

  • Conflict – If a 409 response code is received

  • Forbidden – If a 403 response code is received

  • Gone – If a 410 response code is received

  • InvalidContentType – If a 415 response code is received

  • InvalidHTTPResponseBody – The response body wasn’t valid JSON

  • InvalidHttpSuccessCode – if the read code isn’t an expected http success code

  • NotFound – If a 404 response code is received

  • NotImplemented – If a 501 response code is received

  • OverLimit – If a 413 response code is received and over_limit is not in the response body

  • RateLimitExceeded – If a 413 response code is received and over_limit is in the response body

  • ServerFault – If a 500 response code is received

  • Unauthorized – If a 401 response code is received

  • UnexpectedContentType – If the content-type of the response isn’t an expect type

  • UnexpectedResponseCode – If a response code above 400 is received and it doesn’t fall into any of the handled checks

  • UnprocessableEntity – If a 422 response code is received and couldn’t be parsed

Returns:

A list of provider objects.

list_root_tag = 'providers'