Updated distcloud for subcloud region_name changes
[pti/o2.git] / tests / integration-ocloud / test_clientdriver_stx.py
index 24de6c4..a9f404b 100644 (file)
@@ -89,6 +89,20 @@ def test_get_k8s_list(real_stx_aio_client):
         assert k8s3.id == k8s4.id
 
 
+def test_get_label_list(real_stx_aio_client):
+    stxClientImp = StxClientImp(real_stx_aio_client)
+    assert stxClientImp is not None
+    hostlist = stxClientImp.getPserverList()
+    assert len(hostlist) > 0
+
+    print(hostlist[0].id)
+
+    labellist = stxClientImp.getLabelList(hostid=hostlist[0].id)
+    assert len(labellist) > 0
+    label1 = labellist[0]
+    assert label1.id == "test"
+
+
 def test_get_cpu_list(real_stx_aio_client):
     stxClientImp = StxClientImp(real_stx_aio_client)
     assert stxClientImp is not None
@@ -162,6 +176,20 @@ def test_get_if_port_list(real_stx_aio_client):
     assert port1.id == port2.id
 
 
+def test_get_device_list(real_stx_aio_client):
+    stxClientImp = StxClientImp(real_stx_aio_client)
+    assert stxClientImp is not None
+    hostlist = stxClientImp.getPserverList()
+    assert len(hostlist) > 0
+
+    devicelist = stxClientImp.getDeviceList(hostid=hostlist[0].id)
+    assert len(devicelist) > 0
+    dev1 = devicelist[0]
+    dev2 = stxClientImp.getDevice(dev1.id)
+    assert dev1 != dev2
+    assert dev1.id == dev2.id
+
+
 def test_get_res_pool_list(real_stx_aio_client, real_stx_dc_client):
     stxClientImp = StxClientImp(real_stx_aio_client, real_stx_dc_client)
     assert stxClientImp is not None