Merge "Remove os-*-hostname variables" into main

This commit is contained in:
Zuul
2024-05-13 04:15:03 +00:00
committed by Gerrit Code Review
23 changed files with 11 additions and 341 deletions

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: cinder.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the cinder volume provider.
type: string
os-internal-hostname:
default: cinder.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the cinder volume provider.
type: string
os-public-hostname:
default: cinder.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the cinder volume provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -42,6 +42,10 @@ class _CinderOperatorCharm(charm.CinderOperatorCharm):
super().configure_charm(event) super().configure_charm(event)
self._log_event(event) self._log_event(event)
@property
def public_ingress_address(self):
return "cinder.juju"
class TestCinderOperatorCharm(test_utils.CharmTestCase): class TestCinderOperatorCharm(test_utils.CharmTestCase):
"""Unit tests for Cinder Operator.""" """Unit tests for Cinder Operator."""

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: designate.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the designate image provider.
type: string
os-internal-hostname:
default: designate.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the designate image provider.
type: string
os-public-hostname:
default: designate.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the designate image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default:
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: heat.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: heat.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: heat.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
session-timeout: session-timeout:
type: int type: int
default: 3600 default: 3600

View File

@@ -24,24 +24,6 @@ options:
description: Name of tenant to associate with service credentials description: Name of tenant to associate with service credentials
type: string type: string
os-admin-hostname:
default:
description: |
The hostname or address of the admin endpoints that should be advertised
in the keystone identity provider.
type: string
os-internal-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the keystone identity provider.
type: string
os-public-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the keystone identity provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -1392,11 +1392,9 @@ export OS_AUTH_VERSION=3
@property @property
def admin_endpoint(self): def admin_endpoint(self):
"""Admin endpoint for keystone api.""" """Admin endpoint for keystone api."""
admin_hostname = self.model.config.get("os-admin-hostname") admin_hostname = self.model.get_binding(
if not admin_hostname: self.IDSVC_RELATION_NAME
admin_hostname = self.model.get_binding( ).network.ingress_address
self.IDSVC_RELATION_NAME
).network.ingress_address
return f"http://{admin_hostname}:{self.service_port}/v3" return f"http://{admin_hostname}:{self.service_port}/v3"
@property @property
@@ -1405,11 +1403,9 @@ export OS_AUTH_VERSION=3
if self.ingress_internal and self.ingress_internal.url: if self.ingress_internal and self.ingress_internal.url:
return self.ingress_internal.url + "/v3" return self.ingress_internal.url + "/v3"
internal_hostname = self.model.config.get("os-internal-hostname") internal_hostname = self.model.get_binding(
if not internal_hostname: self.IDSVC_RELATION_NAME
internal_hostname = self.model.get_binding( ).network.ingress_address
self.IDSVC_RELATION_NAME
).network.ingress_address
return f"http://{internal_hostname}:{self.service_port}/v3" return f"http://{internal_hostname}:{self.service_port}/v3"
@property @property

View File

@@ -13,24 +13,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: magnum.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: magnum.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: magnum.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -12,24 +12,6 @@ options:
will not enable internal cloud dns resolution. This value should end will not enable internal cloud dns resolution. This value should end
with a '.', e.g. 'cloud.example.org.'. with a '.', e.g. 'cloud.example.org.'.
type: string type: string
os-admin-hostname:
default:
description: |
The hostname or address of the admin endpoints that should be advertised
in the neutron image provider.
type: string
os-internal-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the neutron image provider.
type: string
os-public-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the neutron image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default:
description: |
The hostname or address of the admin endpoints that should be advertised
in the nova image provider.
type: string
os-internal-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the nova image provider.
type: string
os-public-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the nova image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: octavia.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the loadbalancer provider.
type: string
os-internal-hostname:
default: octavia.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the loadbalancer provider.
type: string
os-public-hostname:
default: octavia.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the loadbalancer provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -48,24 +48,6 @@ config:
description: | description: |
The maximum number of images to keep in sync per version. The maximum number of images to keep in sync per version.
type: int type: int
os-admin-hostname:
default: openstack-images-sync.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the openstack image sync.
type: string
os-internal-hostname:
default: openstack-images-sync.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the openstack image sync.
type: string
os-public-hostname:
default: openstack-images-sync.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the openstack image sync.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -1,11 +0,0 @@
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
#
options:
os-public-hostname:
default: ovn-relay.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the neutron image provider.
type: string

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default:
description: |
The hostname or address of the admin endpoints that should be advertised
in the placement image provider.
type: string
os-internal-hostname:
default:
description: |
The hostname or address of the internal endpoints that should be advertised
in the placement image provider.
type: string
os-public-hostname:
default:
description: |
The hostname or address of the public endpoints that should be advertised
in the placement image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -54,8 +54,6 @@ applications:
channel: edge channel: edge
scale: 1 scale: 1
trust: true trust: true
options:
os-public-hostname:
ovn-central: ovn-central:
charm: ch:ovn-central-k8s charm: ch:ovn-central-k8s
channel: edge channel: edge

View File

@@ -55,8 +55,6 @@ applications:
channel: edge channel: edge
scale: 1 scale: 1
trust: true trust: true
options:
os-public-hostname:
ovn-central: ovn-central:
charm: ch:ovn-central-k8s charm: ch:ovn-central-k8s
channel: edge channel: edge

View File

@@ -229,12 +229,7 @@ class OSBaseOperatorCharm(ops.charm.CharmBase):
def get_domain_name_sans(self) -> List[str]: def get_domain_name_sans(self) -> List[str]:
"""Get Domain names for service.""" """Get Domain names for service."""
domain_name_sans = [] return []
for binding_config in ["admin", "internal", "public"]:
hostname = self.config.get(f"os-{binding_config}-hostname")
if hostname:
domain_name_sans.append(hostname)
return domain_name_sans
def check_leader_ready(self): def check_leader_ready(self):
"""Check the leader is reporting as ready.""" """Check the leader is reporting as ready."""
@@ -798,10 +793,6 @@ class OSBaseOperatorAPICharm(OSBaseOperatorCharmK8S):
@property @property
def public_ingress_address(self) -> str: def public_ingress_address(self) -> str:
"""IP address or hostname for access to this service.""" """IP address or hostname for access to this service."""
svc_hostname = self.model.config.get("os-public-hostname")
if svc_hostname:
return svc_hostname
client = Client() client = Client()
charm_service = client.get( charm_service = client.get(
Service, name=self.app.name, namespace=self.model.name Service, name=self.app.name, namespace=self.model.name

View File

@@ -2,24 +2,6 @@
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region

View File

@@ -3,24 +3,6 @@ options:
default: False default: False
description: Enable debug logging. description: Enable debug logging.
type: boolean type: boolean
os-admin-hostname:
default: glance.juju
description: |
The hostname or address of the admin endpoints that should be advertised
in the glance image provider.
type: string
os-internal-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
os-public-hostname:
default: glance.juju
description: |
The hostname or address of the internal endpoints that should be advertised
in the glance image provider.
type: string
region: region:
default: RegionOne default: RegionOne
description: Name of the OpenStack region description: Name of the OpenStack region