Update deps and fix fallout

Update the git submodules and fix fallout:

* Add ops-interface-tls-certificates back in to deps update script
* Charmhelpers has been switched to using pbr which broke the
  update-deps target. The problem seems to be that pbr cannot detect
  the version of charm-helpers when using a submodule and deploying to
  a local dir. To workaround this set PBR_VERSION manually.
* cluster cannot be set as a extra binding anymore ("ERROR cannot
  deploy bundle: charm "ceph-iscsi" has invalid extra bindings:
  relation names (cluster) cannot be used in extra bindings")
* Charm class should no longer provde a `key` argument in __init__ *1
* framework.observe must now pass the method to be invoked as
  the last argument *2

*1 https://github.com/canonical/operator/blob/master/ops/main.py#L309
*2 https://github.com/canonical/operator/blob/master/ops/framework.py#L553
This commit is contained in:
Liam Young 2020-06-30 09:37:14 +00:00
parent d006b03655
commit c8731a07e5
7 changed files with 14 additions and 11 deletions

View File

@ -15,8 +15,12 @@ else
git -C mod/operator pull origin master
git -C mod/ops-openstack pull origin master
git -C mod/ops-interface-ceph-client pull origin master
# git -C mod/ops-interface-tls-certificates pull origin master
git -C mod/ops-interface-tls-certificates pull origin master
git -C mod/charm-helpers pull origin master
# pbr seems unable to detect the current tag when installing
# from a local checkout using a git submodule. To work around this
# manually set the version.
export PBR_VERSION=$(cd mod/charm-helpers; git describe --tags)
pip install -t lib -r build-requirements.txt --upgrade
fi

View File

@ -15,7 +15,6 @@ subordinate: false
min-juju-version: 2.7.6
extra-bindings:
public:
cluster:
requires:
ceph-client:
interface: ceph-client

@ -1 +1 @@
Subproject commit b4aa4e3398e7406dbf0f76a23f91afa6a72aed1a
Subproject commit 87fc7ee50662f14abe55d9fe0d02ec20d128379f

@ -1 +1 @@
Subproject commit ccf1dce276141d1e8641d63382bb6c3055eee731
Subproject commit 59dd09875421668366ffcaff123bec34a0054ec3

@ -1 +1 @@
Subproject commit d03a251e87f02528789af0eb4cce88e471847e68
Subproject commit f6e6ec1b1d6a317aaeb2cb696e3ec7c1a7c3cd09

@ -1 +1 @@
Subproject commit 18b8f1fcfe7bee87217e7d3152e377c2c3e3f2ff
Subproject commit 460b389811d25514c7ac280ff7c8b2f7c17dd790

View File

@ -130,8 +130,8 @@ class CephISCSIGatewayCharmBase(ops_openstack.OSBaseCharm):
release = 'default'
def __init__(self, framework, key):
super().__init__(framework, key)
def __init__(self, framework):
super().__init__(framework)
logging.info("Using {} class".format(self.release))
self.state.set_default(
target_created=False,
@ -156,7 +156,7 @@ class CephISCSIGatewayCharmBase(ops_openstack.OSBaseCharm):
self.render_config)
self.framework.observe(
self.peers.on.has_peers,
self)
self.on_has_peers)
self.framework.observe(
self.peers.on.allowed_ips_changed,
self.render_config)
@ -174,10 +174,10 @@ class CephISCSIGatewayCharmBase(ops_openstack.OSBaseCharm):
self.render_config)
self.framework.observe(
self.on.create_target_action,
self)
self.on_create_target_action)
self.framework.observe(
self.on.add_trusted_ip_action,
self)
self.on_add_trusted_ip_action)
def on_install(self, event):
if ch_host.is_container():