File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ class Volume(Base):
1515 'status' : Property (filterable = True ),
1616 'region' : Property (slug_relationship = Region ),
1717 'tags' : Property (mutable = True ),
18+ 'filesystem_path' : Property (),
19+ 'hardware_type' : Property (),
20+ 'linode_label' : Property (),
1821 }
1922
2023 def attach (self , to_linode , config = None ):
Original file line number Diff line number Diff line change 99 "size" : 40 ,
1010 "updated" : " 2017-08-04T04:00:00" ,
1111 "status" : " active" ,
12- "tags" : [" something" ]
12+ "tags" : [" something" ],
13+ "filesystem_path" : " this/is/a/file/path" ,
14+ "hardware_type" : " hdd" ,
15+ "linode_label" : null
1316 },
1417 {
1518 "id" : 2 ,
2023 "size" : 100 ,
2124 "updated" : " 2017-08-07T04:00:00" ,
2225 "status" : " active" ,
23- "tags" : []
26+ "tags" : [],
27+ "filesystem_path" : " this/is/a/file/path" ,
28+ "hardware_type" : " nvme" ,
29+ "linode_label" : null
2430 },
2531 {
2632 "id" : 3 ,
3137 "size" : 200 ,
3238 "updated" : " 2017-08-07T04:00:00" ,
3339 "status" : " active" ,
34- "tags" : [" attached" ]
40+ "tags" : [" attached" ],
41+ "filesystem_path" : " this/is/a/file/path" ,
42+ "hardware_type" : " nvme" ,
43+ "linode_label" : " some_label"
3544 }
3645 ],
3746 "results" : 3 ,
Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ def test_get_volumes(self):
115115 self .assertEqual (v [1 ].size , 100 )
116116 self .assertEqual (v [2 ].size , 200 )
117117 self .assertEqual (v [2 ].label , 'block3' )
118+ self .assertEqual (v [0 ].filesystem_path , 'this/is/a/file/path' )
119+ self .assertEqual (v [0 ].hardware_type , 'hdd' )
120+ self .assertEqual (v [1 ].filesystem_path , 'this/is/a/file/path' )
121+ self .assertEqual (v [1 ].linode_label , None )
122+ self .assertEqual (v [2 ].filesystem_path , 'this/is/a/file/path' )
123+ self .assertEqual (v [2 ].hardware_type , 'nvme' )
118124
119125 assert v [0 ].tags == ["something" ]
120126 assert v [1 ].tags == []
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ def test_get_volume(self):
2727
2828 assert volume .tags == ["something" ]
2929
30+ self .assertEqual (volume .filesystem_path , 'this/is/a/file/path' )
31+ self .assertEqual (volume .hardware_type , 'hdd' )
32+ self .assertEqual (volume .linode_label , None )
33+
3034 def test_update_volume_tags (self ):
3135 """
3236 Tests that updating tags on an entity send the correct request
You can’t perform that action at this time.
0 commit comments