@@ -166,26 +166,23 @@ def stop(self):
166166 """
167167 Stop -- Stop the running server.
168168
169- :returns: A Response object and an instance of
170- novaclient.base.TupleWithMeta
169+ :returns: An instance of novaclient.base.TupleWithMeta
171170 """
172171 return self .manager .stop (self )
173172
174173 def force_delete (self ):
175174 """
176175 Force delete -- Force delete a server.
177176
178- :returns: A Response object and an instance of
179- novaclient.base.TupleWithMeta
177+ :returns: An instance of novaclient.base.TupleWithMeta
180178 """
181179 return self .manager .force_delete (self )
182180
183181 def restore (self ):
184182 """
185183 Restore -- Restore a server in 'soft-deleted' state.
186184
187- :returns: A Response object and an instance of
188- novaclient.base.TupleWithMeta
185+ :returns: An instance of novaclient.base.TupleWithMeta
189186 """
190187 return self .manager .restore (self )
191188
@@ -251,8 +248,7 @@ def rescue(self, password=None, image=None):
251248
252249 :param password: The admin password to be set in the rescue instance.
253250 :param image: The :class:`Image` to rescue with.
254- :returns: A Response object and an instance of
255- novaclient.base.DictWithMeta
251+ :returns: An instance of novaclient.base.TupleWithMeta
256252 """
257253 return self .manager .rescue (self , password , image )
258254
@@ -494,8 +490,7 @@ def evacuate(self, host=None, on_shared_storage=None, password=None):
494490 parameter must have its default value of None.
495491 :param password: string to set as admin password on the evacuated
496492 server.
497- :returns: A Response object and an instance of
498- novaclient.base.TupleWithMeta
493+ :returns: An instance of novaclient.base.TupleWithMeta
499494 """
500495 if api_versions .APIVersion ("2.14" ) <= self .manager .api_version :
501496 if on_shared_storage is not None :
@@ -974,34 +969,31 @@ def stop(self, server):
974969 Stop the server.
975970
976971 :param server: The :class:`Server` (or its ID) to stop
977- :returns: A Response object and an instance of
978- novaclient.base.TupleWithMeta
972+ :returns: An instance of novaclient.base.TupleWithMeta
979973 """
980974 resp , body = self ._action_return_resp_and_body ('os-stop' , server , None )
981- return resp , self . convert_into_with_meta ( body , resp )
975+ return base . TupleWithMeta (( resp , body ) , resp )
982976
983977 def force_delete (self , server ):
984978 """
985979 Force delete the server.
986980
987981 :param server: The :class:`Server` (or its ID) to force delete
988- :returns: A Response object and an instance of
989- novaclient.base.TupleWithMeta
982+ :returns: An instance of novaclient.base.TupleWithMeta
990983 """
991984 resp , body = self ._action_return_resp_and_body ('forceDelete' , server ,
992985 None )
993- return resp , self . convert_into_with_meta ( body , resp )
986+ return base . TupleWithMeta (( resp , body ) , resp )
994987
995988 def restore (self , server ):
996989 """
997990 Restore soft-deleted server.
998991
999992 :param server: The :class:`Server` (or its ID) to restore
1000- :returns: A Response object and an instance of
1001- novaclient.base.TupleWithMeta
993+ :returns: An instance of novaclient.base.TupleWithMeta
1002994 """
1003995 resp , body = self ._action_return_resp_and_body ('restore' , server , None )
1004- return resp , self . convert_into_with_meta ( body , resp )
996+ return base . TupleWithMeta (( resp , body ) , resp )
1005997
1006998 def start (self , server ):
1007999 """
@@ -1073,8 +1065,7 @@ def rescue(self, server, password=None, image=None):
10731065 :param server: The :class:`Server` to rescue.
10741066 :param password: The admin password to be set in the rescue instance.
10751067 :param image: The :class:`Image` to rescue with.
1076- :returns: A Response object and an instance of
1077- novaclient.base.DictWithMeta
1068+ :returns: An instance of novaclient.base.TupleWithMeta
10781069 """
10791070 info = {}
10801071 if password :
@@ -1083,8 +1074,7 @@ def rescue(self, server, password=None, image=None):
10831074 info ['rescue_image_ref' ] = base .getid (image )
10841075 resp , body = self ._action_return_resp_and_body ('rescue' , server ,
10851076 info or None )
1086- # For compatibility, return Response object as a first return value
1087- return resp , base .DictWithMeta (body , resp )
1077+ return base .TupleWithMeta ((resp , body ), resp )
10881078
10891079 def unrescue (self , server ):
10901080 """
@@ -1142,13 +1132,11 @@ def diagnostics(self, server):
11421132
11431133 :param server: The :class:`Server` (or its ID) for which
11441134 diagnostics to be returned
1145- :returns: A Respose object and an instance of
1146- novaclient.base.DictWithMeta
1135+ :returns: An instance of novaclient.base.TupleWithMeta
11471136 """
11481137 resp , body = self .api .client .get ("/servers/%s/diagnostics" %
11491138 base .getid (server ))
1150- # For compatibility, return Response object as a first return value
1151- return resp , base .DictWithMeta (body , resp )
1139+ return base .TupleWithMeta ((resp , body ), resp )
11521140
11531141 def create (self , name , image , flavor , meta = None , files = None ,
11541142 reservation_id = None , min_count = None ,
@@ -1605,8 +1593,7 @@ def evacuate(self, server, host=None, on_shared_storage=True,
16051593 :param on_shared_storage: Specifies whether instance files located
16061594 on shared storage
16071595 :param password: string to set as password on the evacuated server.
1608- :returns: A Response object and an instance of
1609- novaclient.base.TupleWithMeta
1596+ :returns: An instance of novaclient.base.TupleWithMeta
16101597 """
16111598
16121599 body = {'onSharedStorage' : on_shared_storage }
@@ -1618,7 +1605,7 @@ def evacuate(self, server, host=None, on_shared_storage=True,
16181605
16191606 resp , body = self ._action_return_resp_and_body ('evacuate' , server ,
16201607 body )
1621- return resp , self . convert_into_with_meta ( body , resp )
1608+ return base . TupleWithMeta (( resp , body ) , resp )
16221609
16231610 @api_versions .wraps ("2.14" )
16241611 def evacuate (self , server , host = None , password = None ):
@@ -1628,6 +1615,7 @@ def evacuate(self, server, host=None, password=None):
16281615 :param server: The :class:`Server` (or its ID) to share onto.
16291616 :param host: Name of the target host.
16301617 :param password: string to set as password on the evacuated server.
1618+ :returns: An instance of novaclient.base.TupleWithMeta
16311619 """
16321620
16331621 body = {}
@@ -1639,7 +1627,7 @@ def evacuate(self, server, host=None, password=None):
16391627
16401628 resp , body = self ._action_return_resp_and_body ('evacuate' , server ,
16411629 body )
1642- return resp , self . convert_into_with_meta ( body , resp )
1630+ return base . TupleWithMeta (( resp , body ) , resp )
16431631
16441632 def interface_list (self , server ):
16451633 """
0 commit comments