Beispiel #1
0
 def _get_instance(self, strict=False):
     conn = self.conn
     i = util.get_instance_by_name(self.NAME, conn)
     if strict and i is None:
         err = "Could not acquire instance! Is the name '{0}' correct?"
         err = err.format(self.NAME)
         self.report(err)
         raise SystemExit(1)
     return i
Beispiel #2
0
 def _get_instance(self, strict=False):
     conn = self.conn
     i = util.get_instance_by_name(self.NAME, conn)
     if strict and i is None:
         err = "Could not acquire instance! Is the name '{0}' correct?"
         err = err.format(self.NAME)
         self.report(err)
         raise SystemExit(1)
     return i
Beispiel #3
0
 def _status(self):
     """ retrieves service status information.
         use this instead of self.status() if you want to quietly
         retrieve information for use without actually displaying it
     """
     instance = util.get_instance_by_name(self.NAME, self.conn)
     result = dict(
         instanceance=None, ip=None,
         private_ip=None, tags=[],
         status='terminated?',)
     if instance:
         result.update(
             dict(
                 instance=instance,
                 tags=instance.tags,
                 status=instance.update(),
                 ip=instance.ip_address,
                 private_ip=instance.private_ip_address,
             ))
     return result
Beispiel #4
0
 def _status(self):
     """ retrieves service status information.
         use this instead of self.status() if you want to quietly
         retrieve information for use without actually displaying it
     """
     instance = util.get_instance_by_name(self.NAME, self.conn)
     result = dict(
         instanceance=None,
         ip=None,
         private_ip=None,
         tags=[],
         status='terminated?',
     )
     if instance:
         result.update(
             dict(
                 instance=instance,
                 tags=instance.tags,
                 status=instance.update(),
                 ip=instance.ip_address,
                 private_ip=instance.private_ip_address,
             ))
     return result