@@ -41,10 +41,10 @@ class Device(base_client.EntityRequest):
4141
4242 def create (self ,
4343 current_pathname ,
44+ media_type ,
4445 device_group_id ,
4546 node_id ,
4647 force = None ,
47- media_type = None ,
4848 name = None ):
4949 """Create PowerFlex device.
5050
@@ -58,8 +58,8 @@ def create(self,
5858 :rtype: dict
5959 """
6060
61- if not all ([current_pathname , device_group_id , node_id ]):
62- msg = 'current_pathname, device_group_id and node_id must be set.'
61+ if not all ([current_pathname , media_type , device_group_id , node_id ]):
62+ msg = 'current_pathname, media_type, device_group_id and node_id must be set.'
6363 raise exceptions .InvalidInput (msg )
6464
6565 params = {
@@ -98,37 +98,8 @@ def rename(self, device_id, name):
9898
9999 return self ._rename_entity (action , device_id , params )
100100
101- def update_pathname (self , device_id , new_pathname ):
102- """Update PowerFlex device pathname.
103- TODO TTHE make sure this API is valid after the latest dev build is ready
104-
105- :type device_id: str
106- :type new_pathname: str
107- :rtype: dict
108- """
109-
110- action = 'updateDeviceOriginalPathname'
111- params = {"updateDeviceOriginalPathname" : new_pathname }
112- r , response = self .send_post_request (self .base_action_url ,
113- action = action ,
114- entity = self .entity ,
115- entity_id = device_id ,
116- params = params )
117- if r .status_code != requests .codes .ok :
118- msg = (
119- f"Failed to update pathname for PowerFlex { self .entity } "
120- f"with id { device_id } . "
121- f"Error: { response } "
122- )
123- LOG .error (msg )
124- raise exceptions .PowerFlexClientException (msg )
125-
126- return self .get (entity_id = device_id )
127-
128101 def set_capacity_limit (self , device_id , capacity_limit_gb ):
129102 """Update PowerFlex device capacity limit in GB.
130- TODO TTHE make sure this API is valid after the latest dev build is ready
131-
132103 :type device_id: str
133104 :type capacity_limit_gb: int
134105 :rtype: dict
@@ -154,9 +125,8 @@ def set_capacity_limit(self, device_id, capacity_limit_gb):
154125
155126 def clear_errors (self , device_id , force = None ):
156127 """Clear PowerFlex device errors.
157- TODO TTHE make sure this field - `forceClear` is valid after the latest dev build is ready
158-
159128 :type device_id: str
129+ :type force: bool
160130 :rtype: dict
161131 """
162132
0 commit comments