Blackify openstack.container_infrastructure_management

Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: I61806ea3ab9fa60466fa777fb403d1c07f23543c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-05-05 11:05:19 +01:00
parent 570b81f0ec
commit 073abda5a9
5 changed files with 22 additions and 19 deletions

View File

@ -11,16 +11,16 @@
# under the License. # under the License.
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
cluster as _cluster cluster as _cluster,
) )
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
cluster_certificate as _cluster_cert cluster_certificate as _cluster_cert,
) )
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
cluster_template as _cluster_template cluster_template as _cluster_template,
) )
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
service as _service service as _service,
) )
from openstack import proxy from openstack import proxy
@ -30,7 +30,7 @@ class Proxy(proxy.Proxy):
_resource_registry = { _resource_registry = {
"cluster": _cluster.Cluster, "cluster": _cluster.Cluster,
"cluster_template": _cluster_template.ClusterTemplate, "cluster_template": _cluster_template.ClusterTemplate,
"service": _service.Service "service": _service.Service,
} }
def create_cluster(self, **attrs): def create_cluster(self, **attrs):

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
cluster_certificate cluster_certificate,
) )
from openstack.tests.unit import base from openstack.tests.unit import base
@ -19,7 +19,7 @@ EXAMPLE = {
"cluster_uuid": "0b4b766f-1500-44b3-9804-5a6e12fe6df4", "cluster_uuid": "0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"pem": "-----BEGIN CERTIFICATE-----\nMIICzDCCAbSgAwIBAgIQOOkVcEN7TNa9E80G", "pem": "-----BEGIN CERTIFICATE-----\nMIICzDCCAbSgAwIBAgIQOOkVcEN7TNa9E80G",
"bay_uuid": "0b4b766f-1500-44b3-9804-5a6e12fe6df4", "bay_uuid": "0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIEfzCCAmcCAQAwFDESMBAGA1UE" "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIEfzCCAmcCAQAwFDESMBAGA1UE",
} }

View File

@ -67,12 +67,14 @@ class TestClusterTemplate(base.TestCase):
self.assertEqual(EXAMPLE['cluster_distro'], sot.cluster_distro) self.assertEqual(EXAMPLE['cluster_distro'], sot.cluster_distro)
self.assertEqual(EXAMPLE['coe'], sot.coe) self.assertEqual(EXAMPLE['coe'], sot.coe)
self.assertEqual(EXAMPLE['created_at'], sot.created_at) self.assertEqual(EXAMPLE['created_at'], sot.created_at)
self.assertEqual(EXAMPLE['docker_storage_driver'], self.assertEqual(
sot.docker_storage_driver) EXAMPLE['docker_storage_driver'], sot.docker_storage_driver
)
self.assertEqual(EXAMPLE['docker_volume_size'], sot.docker_volume_size) self.assertEqual(EXAMPLE['docker_volume_size'], sot.docker_volume_size)
self.assertEqual(EXAMPLE['dns_nameserver'], sot.dns_nameserver) self.assertEqual(EXAMPLE['dns_nameserver'], sot.dns_nameserver)
self.assertEqual(EXAMPLE['external_network_id'], self.assertEqual(
sot.external_network_id) EXAMPLE['external_network_id'], sot.external_network_id
)
self.assertEqual(EXAMPLE['fixed_network'], sot.fixed_network) self.assertEqual(EXAMPLE['fixed_network'], sot.fixed_network)
self.assertEqual(EXAMPLE['fixed_subnet'], sot.fixed_subnet) self.assertEqual(EXAMPLE['fixed_subnet'], sot.fixed_subnet)
self.assertEqual(EXAMPLE['flavor_id'], sot.flavor_id) self.assertEqual(EXAMPLE['flavor_id'], sot.flavor_id)
@ -80,11 +82,13 @@ class TestClusterTemplate(base.TestCase):
self.assertEqual(EXAMPLE['https_proxy'], sot.https_proxy) self.assertEqual(EXAMPLE['https_proxy'], sot.https_proxy)
self.assertEqual(EXAMPLE['image_id'], sot.image_id) self.assertEqual(EXAMPLE['image_id'], sot.image_id)
self.assertEqual(EXAMPLE['insecure_registry'], sot.insecure_registry) self.assertEqual(EXAMPLE['insecure_registry'], sot.insecure_registry)
self.assertEqual(EXAMPLE['floating_ip_enabled'], self.assertEqual(
sot.is_floating_ip_enabled) EXAMPLE['floating_ip_enabled'], sot.is_floating_ip_enabled
)
self.assertEqual(EXAMPLE['hidden'], sot.is_hidden) self.assertEqual(EXAMPLE['hidden'], sot.is_hidden)
self.assertEqual(EXAMPLE['master_lb_enabled'], self.assertEqual(
sot.is_master_lb_enabled) EXAMPLE['master_lb_enabled'], sot.is_master_lb_enabled
)
self.assertEqual(EXAMPLE['tls_disabled'], sot.is_tls_disabled) self.assertEqual(EXAMPLE['tls_disabled'], sot.is_tls_disabled)
self.assertEqual(EXAMPLE['public'], sot.is_public) self.assertEqual(EXAMPLE['public'], sot.is_public)
self.assertEqual(EXAMPLE['registry_enabled'], sot.is_registry_enabled) self.assertEqual(EXAMPLE['registry_enabled'], sot.is_registry_enabled)

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from openstack.container_infrastructure_management.v1 import ( from openstack.container_infrastructure_management.v1 import (
cluster_certificate cluster_certificate,
) )
from openstack.container_infrastructure_management.v1 import _proxy from openstack.container_infrastructure_management.v1 import _proxy
from openstack.container_infrastructure_management.v1 import cluster from openstack.container_infrastructure_management.v1 import cluster
@ -60,7 +60,7 @@ class TestClusterCertificate(TestMagnumProxy):
def test_cluster_certificate_get(self): def test_cluster_certificate_get(self):
self.verify_get( self.verify_get(
self.proxy.get_cluster_certificate, self.proxy.get_cluster_certificate,
cluster_certificate.ClusterCertificate cluster_certificate.ClusterCertificate,
) )
def test_cluster_certificate_create_attrs(self): def test_cluster_certificate_create_attrs(self):
@ -114,7 +114,6 @@ class TestClusterTemplate(TestMagnumProxy):
class TestService(TestMagnumProxy): class TestService(TestMagnumProxy):
def test_services(self): def test_services(self):
self.verify_list( self.verify_list(
self.proxy.services, self.proxy.services,

View File

@ -21,7 +21,7 @@ EXAMPLE = {
"updated_at": "2016-08-25T01:13:16+00:00", "updated_at": "2016-08-25T01:13:16+00:00",
"host": "magnum-manager", "host": "magnum-manager",
"disabled_reason": None, "disabled_reason": None,
"id": 1 "id": 1,
} }