本文整理匯總了Python中boto.sdb.db.model.Model類的典型用法代碼示例。如果您正苦於以下問題:Python Model類的具體用法?Python Model怎麽用?Python Model使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Model類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self, id=None, **kw):
Model.__init__(self, id, **kw)
self._reservation = None
self._instance = None
self._ssh_client = None
self._pkey = None
self._config = None
示例2: __init__
def __init__(self, id=None, **kw):
Model.__init__(self, id, **kw)
self.ssh_key_file = None
self.ec2 = None
self._cmdshell = None
self._reservation = None
self._instance = None
self._setup_ec2()
示例3: delete
def delete(self, delete_ebs_volume=False):
if delete_ebs_volume:
self.detach()
ec2 = self.get_ec2_connection()
ec2.delete_volume(self.volume_id)
Model.delete(self)
示例4: delete
def delete(self):
if self.production:
raise ValueError("Can't delete a production server")
#self.stop()
Model.delete(self)
示例5: put
def put(self):
Model.put(self)
self._setup_ec2()
示例6: __init__
def __init__(self, id=None, **kw):
Model.__init__(self, id, **kw)
self.hourly = self.hour == '*'
self.daily = self.hour != '*'
self.now = datetime.datetime.utcnow()