Add controller-api and ovsdb relations
This commit is contained in:
parent
792f7b09af
commit
6067343d35
|
@ -0,0 +1 @@
|
|||
odl_controller_hooks.py
|
|
@ -11,7 +11,8 @@ from charmhelpers.core.hookenv import (
|
|||
Hooks,
|
||||
UnregisteredHookError,
|
||||
config,
|
||||
log
|
||||
log,
|
||||
relation_set
|
||||
)
|
||||
|
||||
from charmhelpers.core.host import (
|
||||
|
@ -36,6 +37,10 @@ config = config()
|
|||
def config_changed():
|
||||
write_mvn_config()
|
||||
|
||||
@hooks.hook("controller-api-relation-joined")
|
||||
def controller_api_joined():
|
||||
relation_set(port=8080, username="admin", password="admin")
|
||||
|
||||
@hooks.hook()
|
||||
def install():
|
||||
# install dependencies
|
||||
|
@ -68,6 +73,10 @@ def main():
|
|||
except UnregisteredHookError as e:
|
||||
log("Unknown hook {} - skipping.".format(e))
|
||||
|
||||
@hooks.hook("ovsdb-manager-relation-joined")
|
||||
def ovsdb_manager_joined():
|
||||
relation_set(port=6640, protocol="tcp")
|
||||
|
||||
@hooks.hook("upgrade-charm")
|
||||
def upgrade_charm():
|
||||
pass
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
odl_controller_hooks.py
|
|
@ -8,3 +8,8 @@ description: |
|
|||
This charm provides the controller component.
|
||||
categories:
|
||||
- openstack
|
||||
provides:
|
||||
controller-api:
|
||||
interface: odl-controller-api
|
||||
ovsdb-manager:
|
||||
interface: ovsdb-manager
|
||||
|
|
Loading…
Reference in New Issue