| from charmhelpers.core.hookenv import network_get | |
| from charms.reactive import set_flag, clear_flag | |
| from charms.reactive import Endpoint | |
| class HttpProvides(Endpoint): | |
| def configure(self, port, interface_name): | |
| """ | |
| Configure the HTTP relation by providing a port and interface_name. | |
| """ | |
| for relation in self.relations: | |
| relation.send['host'] = network_get(interface_name)['ingress-addresses'][0] | |
| relation.send['port'] = port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment