Merge pull request #1 from openstack-charmers/dragent-compat

Compatibility with neutron-dynamic-routing
This commit is contained in:
Frode Nordahl 2018-02-09 08:37:22 +01:00 committed by GitHub
commit bee87717bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class BGPEndpoint(reactive.Endpoint):
return asn
def publish_info(self, asn=None):
def publish_info(self, asn=None, passive=False):
"""
Publish the AS Number and IP address of any extra-bindings of this
BGP Endpoint over the relationship.
@ -94,6 +94,7 @@ class BGPEndpoint(reactive.Endpoint):
bind_network['bind-addresses'][0]['addresses'])
relation.to_publish['asn'] = myasn
relation.to_publish['extra_bindings'] = extra_bindings
relation.to_publish['passive'] = passive
ch_core.hookenv.log("to_publish: '{}'".format(relation.to_publish))
def get_received_info(self):
@ -123,5 +124,6 @@ class BGPEndpoint(reactive.Endpoint):
'links': links,
'relation_id': relation.relation_id,
'remote_unit_name': unit.unit_name,
'passive': unit.received['passive'],
})
return neighbors