Пример #1
0
 def describeMachines(self, params):
     """
     This method gets the status of all the instances of ec2
     """
     # add calls to the infrastructure manager for getting details of
     # machines
     logging.info("describeMachines : inside method with params : %s", str(params))
     try:
         i = InfrastructureManager()
         res = i.describe_instances(params, [], backendservices.KEYPREFIX)
         logging.info("describeMachines : exiting method with result : %s", str(res))
         return res
     except Exception, e:
         logging.error("describeMachines : exiting method with error : %s", str(e))
         return None
Пример #2
0
 def describeMachines(self, params):
     '''
     This method gets the status of all the instances of ec2
     '''
     # add calls to the infrastructure manager for getting details of
     # machines
     logging.info("describeMachines : inside method with params : %s", str(params))
     try:
         i = InfrastructureManager()
         secret =[]
         res = i.describe_instances(params, secret)
         logging.info("describeMachines : exiting method with result : %s", str(res))
         return res
     except Exception, e:
         logging.error("describeMachines : exiting method with error : %s", str(e))
         return None
Пример #3
0
 def describeMachines(self, params):
     '''
     This method gets the status of all the instances of ec2
     '''
     # add calls to the infrastructure manager for getting details of
     # machines
     logging.info("describeMachines : inside method with params : %s", str(params))
     key_prefix = ""
     if "key_prefix" in params:
         key_prefix = params["key_prefix"]
         if not key_prefix.startswith(self.KEYPREFIX):
             key_prefix = self.KEYPREFIX + key_prefix
     else:
         key_prefix = self.KEYPREFIX
     try:
         i = InfrastructureManager()
         res = i.describe_instances(params, [], key_prefix)
         logging.info("describeMachines : exiting method with result : %s", str(res))
         return res
     except Exception, e:
         logging.error("describeMachines : exiting method with error : %s", str(e))
         return None