Remove new unit_ips from mp, will add in as a seperate mp
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user