Remove new unit_ips from mp, will add in as a seperate mp

This commit is contained in:
Liam Young
2018-03-22 10:48:29 +00:00
parent b36c9bde25
commit 5e613051bc

View File

@@ -19,22 +19,6 @@ async def deployed(filter=None):
await model.disconnect()
async def _unit_ips(service_name):
# Create a Model instance. We need to connect our Model to a Juju api
# server before we can use it.
model = Model()
# Connect to the currently active Juju model
await model.connect_current()
app = model.applications[service_name]
ips = []
for unit in app.units:
ips.append(unit.public_address)
await model.disconnect()
return ips
def unit_ips(service_name):
return loop.run(_unit_ips(service_name))
def main():
# Run the deploy coroutine in an asyncio event loop, using a helper
# that abstracts loop creation and teardown.