def _load_context(self): """ Set the context of the execution. It should be called only from the plugin manager once it has the context loaded. """ log.debug("Loading context for plugin execution") self._context = ContextLoader(self._config_overrides()).load()
def list(self, args): """ List physical machines from abiquo """ context = ContextLoader().load() try: admin = context.getAdministrationService() machines = admin.listMachines() pprint_machines(machines) except (AbiquoException, AuthorizationException), ex: print "Error %s" % ex.getMessage()