self.logger.info("Destroying the machine (%s)", machine_numbers) return self.client.destroy_machines(machine_numbers, force=True) def status(self): """ Get the status of Juju :return: status of Juju as a JSON file """ self.logger.info("Get the status of the system") return self.client.status() def getserviceconfiguration(self, service_name): return self.client.get_service(service_name) def info(self): return self.client.info() if __name__ == '__main__': address = "10.0.3.1" port = 17070 token = "d36784462a74d471e34176613652cb15" print "env login" environment = Environment("wss://" + address + ":" + str(port)) environment.login(token) print "env logged" # print environment.add_local_charm("/home/ubuntu/charms/trusty/torquepbs2.zip", "trusty") print environment.deploy("apache2", "local:trusty/torquepbs-1")