Rename nova-spiceproxy-url relation key to spice-proxy-url
snap-openstack-hypervisor config key for spice proxy url is spice-proxy-url. So change the key set in openstack-hypervisor charm to spice-proxy-url. Update the lib nova-service to have same name in relation data for consistency. Fix spiceproxy url to include spice_auto.html Change-Id: I8606519a3266d0105dc1afd7ed2a06fceef87dbe
This commit is contained in:
parent
f0adcefc64
commit
ebd2cf0386
@ -862,7 +862,7 @@ class NovaOperatorCharm(sunbeam_charm.OSBaseOperatorAPICharm):
|
||||
if self.nova_spiceproxy_public_url:
|
||||
self.config_svc.interface.set_config(
|
||||
relation=event.relation,
|
||||
nova_spiceproxy_url=self.nova_spiceproxy_public_url,
|
||||
nova_spiceproxy_url=f"{self.nova_spiceproxy_public_url}/spice_auto.html",
|
||||
)
|
||||
else:
|
||||
logging.debug("Nova spiceproxy not yet set, not sending config")
|
||||
@ -872,7 +872,7 @@ class NovaOperatorCharm(sunbeam_charm.OSBaseOperatorAPICharm):
|
||||
if self.nova_spiceproxy_public_url:
|
||||
self.config_svc.interface.set_config(
|
||||
relation=None,
|
||||
nova_spiceproxy_url=self.nova_spiceproxy_public_url,
|
||||
nova_spiceproxy_url=f"{self.nova_spiceproxy_public_url}/spice_auto.html",
|
||||
)
|
||||
else:
|
||||
logging.debug("Nova spiceproxy not yet set, not sending config")
|
||||
|
@ -505,7 +505,7 @@ class HypervisorOperatorCharm(sunbeam_charm.OSBaseOperatorCharm):
|
||||
try:
|
||||
if contexts.nova_service.nova_spiceproxy_url:
|
||||
return {
|
||||
"compute.nova-spiceproxy-url": contexts.nova_service.nova_spiceproxy_url,
|
||||
"compute.spice-proxy-url": contexts.nova_service.nova_spiceproxy_url,
|
||||
}
|
||||
except AttributeError as e:
|
||||
logger.debug(f"Nova service relation not integrated: {str(e)}")
|
||||
|
@ -115,7 +115,7 @@ class TestCharm(test_utils.CharmTestCase):
|
||||
"nova-service",
|
||||
"nova",
|
||||
app_data={
|
||||
"nova-spiceproxy-url": "http://INGRESS_IP/nova-spiceproxy"
|
||||
"spice-proxy-url": "http://INGRESS_IP/nova-spiceproxy/spice_auto.html"
|
||||
},
|
||||
)
|
||||
|
||||
@ -147,7 +147,7 @@ class TestCharm(test_utils.CharmTestCase):
|
||||
"compute.rbd-user": "nova",
|
||||
"compute.rbd-secret-uuid": "ddd",
|
||||
"compute.rbd-key": "eee",
|
||||
"compute.nova-spiceproxy-url": "http://INGRESS_IP/nova-spiceproxy",
|
||||
"compute.spice-proxy-url": "http://INGRESS_IP/nova-spiceproxy/spice_auto.html",
|
||||
"credentials.ovn-metadata-proxy-shared-secret": metadata,
|
||||
"identity.admin-role": None,
|
||||
"identity.auth-url": "http://10.153.2.45:80/openstack-keystone",
|
||||
@ -206,7 +206,7 @@ class TestCharm(test_utils.CharmTestCase):
|
||||
"nova-service",
|
||||
"nova",
|
||||
app_data={
|
||||
"nova-spiceproxy-url": "http://INGRESS_IP/nova-spiceproxy"
|
||||
"spice-proxy-url": "http://INGRESS_IP/nova-spiceproxy/spiceauto.html"
|
||||
},
|
||||
)
|
||||
|
||||
@ -250,7 +250,7 @@ class TestCharm(test_utils.CharmTestCase):
|
||||
"compute.rbd-user": "nova",
|
||||
"compute.rbd-secret-uuid": "ddd",
|
||||
"compute.rbd-key": "eee",
|
||||
"compute.nova-spiceproxy-url": "http://INGRESS_IP/nova-spiceproxy",
|
||||
"compute.spice-proxy-url": "http://INGRESS_IP/nova-spiceproxy/spiceauto.html",
|
||||
"credentials.ovn-metadata-proxy-shared-secret": metadata,
|
||||
"identity.admin-role": None,
|
||||
"identity.auth-url": "http://10.153.2.45:80/openstack-keystone",
|
||||
|
@ -140,7 +140,7 @@ class NovaServiceProvides(Object):
|
||||
f"{relation.name}/{relation.id}"
|
||||
)
|
||||
relation.data[self.charm.app][
|
||||
"nova-spiceproxy-url"
|
||||
"spice-proxy-url"
|
||||
] = nova_spiceproxy_url
|
||||
|
||||
|
||||
@ -207,4 +207,4 @@ class NovaServiceRequires(Object):
|
||||
@property
|
||||
def nova_spiceproxy_url(self) -> str | None:
|
||||
"""Return the nova_spiceproxy url."""
|
||||
return self.get_remote_app_data("nova-spiceproxy-url")
|
||||
return self.get_remote_app_data("spice-proxy-url")
|
||||
|
Loading…
x
Reference in New Issue
Block a user