You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/02/23 12:26:06 UTC

[GitHub] [cloudstack] borisstoyanov commented on a change in pull request #4304: Storage plugin for Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)

borisstoyanov commented on a change in pull request #4304:
URL: https://github.com/apache/cloudstack/pull/4304#discussion_r573580121



##########
File path: test/integration/plugins/scaleio/test_scaleio_volumes.py
##########
@@ -0,0 +1,1213 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import logging
+import random
+import time
+
+# All tests inherit from cloudstackTestCase
+from marvin.cloudstackTestCase import cloudstackTestCase
+
+# Import Integration Libraries
+# base - contains all resources as entities and defines create, delete, list operations on them
+from marvin.lib.base import Account, DiskOffering, ServiceOffering, Snapshot, StoragePool, Template, User, VirtualMachine, Volume
+
+# common - commonly used methods for all tests are listed here
+from marvin.lib.common import get_domain, get_template, get_zone, list_clusters, list_hosts, list_virtual_machines, \
+    list_volumes
+
+# utils - utility classes for common cleanup, external library wrappers, etc.
+from marvin.lib.utils import cleanup_resources, validateList
+from marvin.codes import PASS
+from nose.plugins.attrib import attr
+
+# Prerequisites:
+#  Only one zone
+#  Only one pod
+#  Only one cluster
+#
+#  One PowerFlex/ScaleIO storage pool for basic tests
+#  Only KVM hypervisor is supported for PowerFlex/ScaleIO storage pool
+#  KVM host(s) with ScaleIO Data Client (SDC) installed and connected to Metadata Manager (MDM)
+#
+#  For volume migration tests, additional storage pool(s) are required
+#  One PowerFlex/ScaleIO storage pool on the same ScaleIO storage cluster/instance
+#  One PowerFlex/ScaleIO storage pool on different ScaleIO storage cluster/instance
+#
+
+class TestData():
+    # constants
+    account = "account"
+    clusterId = "clusterId"
+    computeOffering = "computeoffering"
+    diskName = "diskname"
+    diskOffering = "diskoffering"
+    diskOfferingSameInstance = "diskOfferingSameInstance"
+    diskOfferingDistinctInstance = "diskOfferingDistinctInstance"
+    domainId = "domainId"
+    hypervisor = "hypervisor"
+    kvm = "kvm"
+    login = "login"
+    gatewayip = "gatewayip"
+    one_GB_in_bytes = 1073741824
+    password = "password"
+    port = "port"
+    primaryStorage = "primarystorage"
+    primaryStorageSameInstance = "primaryStorageSameInstance"
+    primaryStorageDistinctInstance = "primaryStorageDistinctInstance"
+    provider = "provider"
+    scope = "scope"
+    powerFlex = "powerflex"
+    storageTag = "pflex"
+    storageTagSameInstance = "pflexsame"
+    storageTagDistinctInstance = "pflexdiff"
+    tags = "tags"
+    templateCacheNameKvm = "centos55-x86-64"
+    testAccount = "testaccount"
+    url = "url"
+    user = "user"
+    username = "username"
+    virtualMachine = "virtualmachine"
+    virtualMachine2 = "virtualmachine2"
+    virtualMachine3 = "virtualmachine3"
+    virtualMachine4 = "virtualmachine4"
+    volume_1 = "volume_1"
+    volume_2 = "volume_2"
+    volume_3 = "volume_3"
+    volume_4 = "volume_4"
+    kvm = "kvm"
+    zoneId = "zoneId"
+    migrationTests = "migrationTests"
+
+    # hypervisor type to test
+    hypervisor_type = kvm
+
+    def __init__(self):
+        self.testdata = {
+            TestData.kvm: {
+                TestData.username: "root",
+                TestData.password: "P@ssword123"
+            },
+            TestData.account: {
+                "email": "test1@test1.com",
+                "firstname": "John",
+                "lastname": "Doe",
+                "username": "test1",
+                "password": "test"
+            },
+            TestData.testAccount: {
+                "email": "test2@test2.com",
+                "firstname": "Jane",
+                "lastname": "Doe",
+                "username": "test2",
+                "password": "test"
+            },
+            TestData.user: {
+                "email": "user@test1.com",
+                "firstname": "Jane",
+                "lastname": "Doe",
+                "username": "test1user",
+                "password": "password"
+            },
+            TestData.primaryStorage: {
+                "name": "PowerFlexPool-%d" % random.randint(0, 100),
+                TestData.scope: "ZONE",
+                "url": "powerflex://admin:P%40ssword123@10.10.4.141/cspool01",

Review comment:
       I don't see how this is going to be a reliable and stable instance of running the tests long term. If we don't have an automated method to come up with a PowerFlex instance at the moment, better make it a requirement to run the tests and leave the test unrelated to adding primary storage.

##########
File path: test/integration/plugins/scaleio/test_scaleio_volumes.py
##########
@@ -0,0 +1,1213 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import logging
+import random
+import time
+
+# All tests inherit from cloudstackTestCase
+from marvin.cloudstackTestCase import cloudstackTestCase
+
+# Import Integration Libraries
+# base - contains all resources as entities and defines create, delete, list operations on them
+from marvin.lib.base import Account, DiskOffering, ServiceOffering, Snapshot, StoragePool, Template, User, VirtualMachine, Volume
+
+# common - commonly used methods for all tests are listed here
+from marvin.lib.common import get_domain, get_template, get_zone, list_clusters, list_hosts, list_virtual_machines, \
+    list_volumes
+
+# utils - utility classes for common cleanup, external library wrappers, etc.
+from marvin.lib.utils import cleanup_resources, validateList
+from marvin.codes import PASS
+from nose.plugins.attrib import attr
+
+# Prerequisites:
+#  Only one zone
+#  Only one pod
+#  Only one cluster
+#
+#  One PowerFlex/ScaleIO storage pool for basic tests
+#  Only KVM hypervisor is supported for PowerFlex/ScaleIO storage pool
+#  KVM host(s) with ScaleIO Data Client (SDC) installed and connected to Metadata Manager (MDM)
+#
+#  For volume migration tests, additional storage pool(s) are required
+#  One PowerFlex/ScaleIO storage pool on the same ScaleIO storage cluster/instance
+#  One PowerFlex/ScaleIO storage pool on different ScaleIO storage cluster/instance
+#
+
+class TestData():
+    # constants
+    account = "account"
+    clusterId = "clusterId"
+    computeOffering = "computeoffering"
+    diskName = "diskname"
+    diskOffering = "diskoffering"
+    diskOfferingSameInstance = "diskOfferingSameInstance"
+    diskOfferingDistinctInstance = "diskOfferingDistinctInstance"
+    domainId = "domainId"
+    hypervisor = "hypervisor"
+    kvm = "kvm"
+    login = "login"
+    gatewayip = "gatewayip"
+    one_GB_in_bytes = 1073741824
+    password = "password"
+    port = "port"
+    primaryStorage = "primarystorage"
+    primaryStorageSameInstance = "primaryStorageSameInstance"
+    primaryStorageDistinctInstance = "primaryStorageDistinctInstance"
+    provider = "provider"
+    scope = "scope"
+    powerFlex = "powerflex"
+    storageTag = "pflex"
+    storageTagSameInstance = "pflexsame"
+    storageTagDistinctInstance = "pflexdiff"
+    tags = "tags"
+    templateCacheNameKvm = "centos55-x86-64"
+    testAccount = "testaccount"
+    url = "url"
+    user = "user"
+    username = "username"
+    virtualMachine = "virtualmachine"
+    virtualMachine2 = "virtualmachine2"
+    virtualMachine3 = "virtualmachine3"
+    virtualMachine4 = "virtualmachine4"
+    volume_1 = "volume_1"
+    volume_2 = "volume_2"
+    volume_3 = "volume_3"
+    volume_4 = "volume_4"
+    kvm = "kvm"
+    zoneId = "zoneId"
+    migrationTests = "migrationTests"
+
+    # hypervisor type to test
+    hypervisor_type = kvm
+
+    def __init__(self):
+        self.testdata = {
+            TestData.kvm: {
+                TestData.username: "root",
+                TestData.password: "P@ssword123"
+            },
+            TestData.account: {
+                "email": "test1@test1.com",
+                "firstname": "John",
+                "lastname": "Doe",
+                "username": "test1",
+                "password": "test"
+            },
+            TestData.testAccount: {
+                "email": "test2@test2.com",
+                "firstname": "Jane",
+                "lastname": "Doe",
+                "username": "test2",
+                "password": "test"
+            },
+            TestData.user: {
+                "email": "user@test1.com",
+                "firstname": "Jane",
+                "lastname": "Doe",
+                "username": "test1user",
+                "password": "password"
+            },
+            TestData.primaryStorage: {
+                "name": "PowerFlexPool-%d" % random.randint(0, 100),
+                TestData.scope: "ZONE",
+                "url": "powerflex://admin:P%40ssword123@10.10.4.141/cspool01",
+                TestData.provider: "PowerFlex",
+                TestData.tags: TestData.storageTag + "," + TestData.storageTagSameInstance + "," + TestData.storageTagDistinctInstance,
+                TestData.hypervisor: "KVM"
+            },
+            TestData.virtualMachine: {
+                "name": "TestVM1",
+                "displayname": "Test VM 1"
+            },
+            TestData.virtualMachine2: {
+                "name": "TestVM2",
+                "displayname": "Test VM 2"
+            },
+            TestData.virtualMachine3: {
+                "name": "TestVM3",
+                "displayname": "Test VM 3"
+            },
+            TestData.virtualMachine4: {
+                "name": "TestVM4",
+                "displayname": "Test VM 4"
+            },
+            TestData.computeOffering: {
+                "name": "PowerFlex_Compute",
+                "displaytext": "PowerFlex_Compute",
+                "cpunumber": 1,
+                "cpuspeed": 500,
+                "memory": 512,
+                "storagetype": "shared",
+                TestData.tags: TestData.storageTag
+            },
+            TestData.diskOffering: {
+                "name": "PowerFlex_Disk",
+                "displaytext": "PowerFlex_Disk",
+                "disksize": 8,
+                TestData.tags: TestData.storageTag,
+                "storagetype": "shared"
+            },
+            TestData.volume_1: {
+                TestData.diskName: "test-volume-1",
+            },
+            TestData.volume_2: {
+                TestData.diskName: "test-volume-2",
+            },
+            TestData.volume_3: {
+                TestData.diskName: "test-volume-3",
+            },
+            TestData.volume_4: {
+                TestData.diskName: "test-volume-4",
+            },
+            TestData.zoneId: 1,
+            TestData.clusterId: 1,
+            TestData.domainId: 1,
+            TestData.url: "10.10.3.226",

Review comment:
       Same here, leave the 'Add Storage pool' test scenario maybe...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org