Ensure identity credentials are requested
Change-Id: Ib7c541865303204a52d352ef7a180d07db5b145b Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
This commit is contained in:
parent
e632c03547
commit
66d0fd5c2e
@ -628,6 +628,13 @@ class IdentityServiceRequiresHandler(RelationHandler):
|
||||
if self.mandatory:
|
||||
self.status.set(BlockedStatus("integration missing"))
|
||||
|
||||
def update_relation_data(self):
|
||||
"""Update relation outside of relation context."""
|
||||
if self.model.get_relation(self.relation_name):
|
||||
self.interface.register_services(
|
||||
self.service_endpoints, self.region
|
||||
)
|
||||
|
||||
def update_service_endpoints(self, service_endpoints: list[dict]) -> None:
|
||||
"""Update service endpoints on the relation."""
|
||||
self.service_endpoints = service_endpoints
|
||||
@ -1397,6 +1404,11 @@ class IdentityCredentialsRequiresHandler(RelationHandler):
|
||||
if self.mandatory:
|
||||
self.status.set(BlockedStatus("integration missing"))
|
||||
|
||||
def update_relation_data(self):
|
||||
"""Update relation outside of relation context."""
|
||||
if self.model.get_relation(self.relation_name):
|
||||
self.interface.request_credentials()
|
||||
|
||||
@property
|
||||
def ready(self) -> bool:
|
||||
"""Whether handler is ready for use."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user