charms.reactive RelationBase.from_state(...) has disappeared in 0.6.0*

Bug #1737715 reported by Alex Kavanagh on 2017-12-12
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Barbican Charm
Medium
Unassigned
OpenStack Designate Charm
Medium
Unassigned
OpenStack Manila Charm
Medium
Unassigned
OpenStack Manila Generic Backend Charm
Medium
Unassigned
OpenStack Tempest Charm
Medium
Unassigned
charms.openstack
Medium
Alex Kavanagh

Bug Description

The upcoming release (0.6.0) of charms.reactive has renamed the 'from_state' class method from the RelationBase to 'from_flag'. This breaks charms.openstack, and probably a few OpenStack reactive charms.

The "probably" replacement is to use charms.reactive.relations.endpoint_from_flag() as the equivalent (and more stable) API call.

A quick search of the code bases on 2017-12-12 indicates:

charms.openstack:

charms_openstack/charm/classes.py
657: amqp_ssl = reactive.RelationBase.from_state('amqp.available.ssl')

charms_openstack/charm/core.py
54: return args + tuple(ri for ri in (reactive.RelationBase.from_state(i)
377: interface = reactive.RelationBase.from_state(state)

charms_openstack/adapters.py
1168: cluster_rel = reactive.RelationBase.from_state('cluster.connected')

And in the charms:

charm-designate/src/reactive/designate_handlers.py
126: cluster = reactive.RelationBase.from_state('cluster.available')
129: dns_backend = reactive.RelationBase.from_state('dns-backend.available')
162: cluster = reactive.RelationBase.from_state('cluster.available')
165: dns_backend = reactive.RelationBase.from_state('dns-backend.available')

charm-barbican/src/actions/actions.py
39: hsm = reactive.RelationBase.from_state('hsm.available')
54: hsm = reactive.RelationBase.from_state('hsm.available')

charm-manila-generic/src/lib/charm/openstack/manila_generic.py
202: manila_plugin = charms.reactive.RelationBase.from_state(

charm-tempest/src/actions/run-tempest.py
16: identity_int = reactive.RelationBase.from_state('identity-admin.available')

charm-manila/src/reactive/manila_handlers.py
108: manila_plugin = charms.reactive.RelationBase.from_state(

charm-manila/unit_tests/test_manila_handlers.py
89: self.patch('charms.reactive.RelationBase.from_state',

Changed in charm-barbican:
importance: Undecided → Critical
Changed in charm-designate:
importance: Undecided → Critical
Changed in charm-barbican:
importance: Critical → High
Changed in charm-designate:
importance: Critical → High
Changed in charm-manila:
importance: Undecided → High
Changed in charm-manila-generic:
importance: Undecided → High
Changed in charm-tempest:
importance: Undecided → High
Changed in charms.openstack:
importance: Undecided → High
Changed in charms.openstack:
status: New → Triaged
assignee: nobody → Alex Kavanagh (ajkavanagh)
status: Triaged → In Progress
Changed in charm-tempest:
status: New → Triaged
Changed in charm-manila-generic:
status: New → Triaged
Changed in charm-manila:
status: New → Triaged
Changed in charm-designate:
status: New → Triaged
Changed in charm-barbican:
status: New → Triaged
James Page (james-page) wrote :

Reactive charms are not (yet) broken so pushing down to a medium priority.

Changed in charm-barbican:
importance: High → Medium
Changed in charm-designate:
importance: High → Medium
Changed in charm-manila:
importance: High → Medium
Changed in charm-manila-generic:
importance: High → Medium
Changed in charm-tempest:
importance: High → Medium
Changed in charms.openstack:
importance: High → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers