@@ -313,6 +313,23 @@ def test_detail_vs_ptr_error(self):
313313 output = json .loads (result .output )
314314 self .assertEqual (output .get ('ptr' , None ), None )
315315
316+ def test_vs_detail_csv_output_format_with_nested_tables (self ):
317+ result = self .run_command (["--format" , "csv" , 'vs' , 'detail' , '100' ])
318+ result_output = result .output .replace ('\r ' , '' ).split ('\n ' )
319+ self .assert_no_fail (result )
320+ self .assertEqual (result_output [0 ], 'name,value' )
321+ self .assertEqual (result_output [1 ], 'id,100' )
322+ self .assertEqual (result_output [16 ], 'drives,"Type,Name,Drive,Capacity"' )
323+ self .assertEqual (result_output [17 ], 'drives,"System,Disk,0,100 GB"' )
324+ self .assertEqual (result_output [18 ], 'drives,"Swap,Disk,1,2 GB"' )
325+ self .assertEqual (result_output [30 ], 'vlans,"type,number,id"' )
326+ self .assertEqual (result_output [31 ], 'vlans,"PUBLIC,23,1"' )
327+ self .assertEqual (result_output [32 ], 'Bandwidth,"Type,In GB,Out GB,Allotment"' )
328+ self .assertEqual (result_output [33 ], 'Bandwidth,"Public,.448,.52157,250"' )
329+ self .assertEqual (result_output [34 ], 'Bandwidth,"Private,.03842,.01822,N/A"' )
330+ self .assertEqual (result_output [35 ], 'security_groups,"interface,id,name"' )
331+ self .assertEqual (result_output [36 ], 'security_groups,"PRIVATE,128321,allow_all"' )
332+
316333 def test_create_options (self ):
317334 result = self .run_command (['vs' , 'create-options' , '--vsi-type' , 'TRANSIENT_CLOUD_SERVER' ])
318335 self .assert_no_fail (result )
0 commit comments