1111@helpers .authentication_required
1212def describe_instance_attribute ():
1313 """
14+ Describes an instance attribute
1415
15-
16- @return:
16+ @return: Response.
1717 """
1818 instance_id = helpers .get ('InstanceId' )
1919 attribute = helpers .get ('Attribute' )
@@ -36,11 +36,12 @@ def describe_instance_attribute():
3636
3737def _describe_instance_attribute_response (response , attribute , attr_map ):
3838 """
39+ Generates a response for a describe instance attribute request.
3940
40- @param response:
41- @param attribute:
42- @param attr_map:
43- @return:
41+ @param response: Response from Cloudstack.
42+ @param attribute: Attribute to Describe.
43+ @param attr_map: Map of attributes from EC2 to Cloudstack.
44+ @return: Response.
4445 """
4546 response = {
4647 'template_name_or_list' : 'instance_attribute.xml' ,
@@ -56,9 +57,9 @@ def _describe_instance_attribute_response(response, attribute, attr_map):
5657@helpers .authentication_required
5758def describe_instances ():
5859 """
60+ Describe a specific instance or all instances.
5961
60-
61- @return:
62+ @return: Response.
6263 """
6364 args = {'command' : 'listVirtualMachines' }
6465 response = cloudstack .describe_item (
@@ -72,9 +73,10 @@ def describe_instances():
7273
7374def describe_instance_by_id (instance_id ):
7475 """
76+ Describe an instance by Id.
7577
76- @param instance_id:
77- @return:
78+ @param instance_id: Id of the instance.
79+ @return: Response.
7880 """
7981 args = {'id' : instance_id , 'command' : 'listVirtualMachines' }
8082 response = cloudstack .describe_item_request (
@@ -84,6 +86,12 @@ def describe_instance_by_id(instance_id):
8486
8587
8688def _describe_instances_response (response ):
89+ """
90+ Generates a response for a describe instance request
91+
92+ @param response: Response from Cloudstack.
93+ @return: Response.
94+ """
8795 return {
8896 'template_name_or_list' : 'instances.xml' ,
8997 'response_type' : 'DescribeInstancesResponse' ,
@@ -94,9 +102,9 @@ def _describe_instances_response(response):
94102@helpers .authentication_required
95103def run_instance ():
96104 """
105+ Run a instance.
97106
98-
99- @return:
107+ @return: Response.
100108 """
101109 helpers .require_parameters (
102110 ['ImageId' , 'MinCount' , 'MaxCount' ])
@@ -106,9 +114,9 @@ def run_instance():
106114
107115def _run_instance_request ():
108116 """
117+ Request to bring up an instance
109118
110-
111- @return:
119+ @return: Response.
112120 """
113121 args = {}
114122
0 commit comments