return list(tags)
-def _Tags_POST(kind, tags, name=""):
+def _Tags_PUT(kind, tags, name=""):
"""Helper function to set tags.
"""
return baserlib.BuildUriList(instanceslist, "/2/instances/%s",
uri_fields=("id", "uri"))
- def PUT(self):
+ def POST(self):
"""Create an instance.
Returns:
DOC_URI = "/2/instances/[instance_name]/reboot"
- def GET(self):
+ def POST(self):
"""Reboot an instance.
The URI takes type=[hard|soft|full] and
DOC_URI = "/2/instances/[instance_name]/startup"
- def GET(self):
+ def PUT(self):
"""Startup an instance.
The URI takes force=[False|True] parameter to start the instance if even if
DOC_URI = "/2/instances/[instance_name]/shutdown"
- def GET(self):
+ def PUT(self):
"""Shutdown an instance.
"""
"""
return baserlib._Tags_GET(constants.TAG_INSTANCE, name=self.items[0])
- def POST(self):
+ def PUT(self):
"""Add a set of tags to the instance.
- The request as a list of strings should be POST to this URI. And you'll have
+ The request as a list of strings should be PUT to this URI. And you'll have
back a job id.
"""
- return baserlib._Tags_POST(constants.TAG_INSTANCE,
+ return baserlib._Tags_PUT(constants.TAG_INSTANCE,
self.post_data, name=self.items[0])
def DELETE(self):