Add endpoint and service to magnum
Change-Id: I8565cef3fc4fd06774942b62ad5a044b7cd00b80
This commit is contained in:
parent
9a3fd00884
commit
e42469ffe8
@ -20,6 +20,7 @@ server for the installation.
|
||||
"""
|
||||
|
||||
from openstack_operator import database
|
||||
from openstack_operator import identity
|
||||
from openstack_operator import utils
|
||||
|
||||
|
||||
@ -54,9 +55,16 @@ def create_or_resume(name, spec, **_):
|
||||
utils.create_or_update('magnum/service.yml.j2',
|
||||
name=name)
|
||||
|
||||
url = None
|
||||
if "ingress" in spec:
|
||||
utils.create_or_update('magnum/ingress.yml.j2',
|
||||
name=name, spec=spec)
|
||||
url = spec["ingress"]["host"]
|
||||
|
||||
# Create service and endpoints
|
||||
identity.ensure_service(name="magnum-api", path="/v1",
|
||||
service_type="container-infra", url=url,
|
||||
desc="Container Infrastructure Management Service")
|
||||
|
||||
|
||||
def update(name, spec, **_):
|
||||
|
Loading…
x
Reference in New Issue
Block a user