示例#1
0
 def delete_user(self, instance, username):
     return self.api.users.delete(base.getid(instance), username)
示例#2
0
 def get_instance(self, instanceid):
     return self._get("/instances/%s" % \
                      base.getid(instanceid), "instance")
示例#3
0
 def list_users(self, instance):
     return self.api.users.list(base.getid(instance))
示例#4
0
 def create_user(self, instance, username, password, databases):
     return self.api.users.create(base.getid(instance), username, password,
                                  databases)
示例#5
0
 def create_databases(self, instance, databases):
     body = {"databases": databases}
     return self._post("/instances/%s/databases" % base.getid(instance),
                       body)
示例#6
0
 def get_instance(self, instanceid):
     return self._get("/instances/%s" % base.getid(instanceid), "instance")
示例#7
0
 def list_users(self, instance):
     return self.api.users.list(base.getid(instance))
示例#8
0
 def resize_instance(self, instanceid, size):
     body = {"resize": {"volume": {"size": size}}}
     self._resize("/instances/%s/action" % base.getid(instanceid), body)
示例#9
0
 def get_databases(self, instance):
     return self.api.databases.get_databases(base.getid(instance))
示例#10
0
 def create_databases(self, instance, databases):
     body = {"databases": databases}
     return self._post("/instances/%s/databases" % base.getid(instance), body)
示例#11
0
 def resize_instance(self, instanceid, size):
     body = {"resize": {"volume": {"size": size}}}
     self._resize("/instances/%s/action" % base.getid(instanceid), body)
示例#12
0
 def restart_instance(self, instanceid):
     body = {"restart": {}}
     self._restart("/instances/%s/action" % base.getid(instanceid), body)
示例#13
0
 def delete_instance(self, instanceid):
     self.api.client.authenticate()
     self._delete("/instances/%s" % base.getid(instanceid))
示例#14
0
 def delete_instance(self, instanceid):
     self.api.client.authenticate()
     self._delete("/instances/%s" % base.getid(instanceid))
示例#15
0
 def create_user(self, instance, username, password, databases):
     return self.api.users.create(base.getid(instance), username, password, databases)
示例#16
0
 def restart_instance(self, instanceid):
     body = {"restart": {}}
     self._restart("/instances/%s/action" % base.getid(instanceid), body)
示例#17
0
 def delete_user(self, instance, username):
     return self.api.users.delete(base.getid(instance), username)
示例#18
0
 def get_databases(self, instance):
     return self.api.databases.get_databases(base.getid(instance))
示例#19
0
 def delete(self, instanceid, username):
     self._delete("/instances/%s/users/%s" % (base.getid(instanceid), username))
示例#20
0
 def get_flavor(self, flavorid):
     return self._get("/flavors/%s" % base.getid(flavorid), "flavor")
示例#21
0
 def delete(self, instanceid, username):
     self._delete("/instances/%s/users/%s" %
                  (base.getid(instanceid), username))