cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject [1/3] CLOUDSTACK-2232: Adding automation test cases for Persistent Networks feature
Date Fri, 21 Feb 2014 12:18:15 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.3-forward c6a8659ac -> c03fd70ed


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c03fd70e/tools/marvin/marvin/config/config.cfg
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/config.cfg b/tools/marvin/marvin/config/config.cfg
index 5849fe8..ec41c10 100644
--- a/tools/marvin/marvin/config/config.cfg
+++ b/tools/marvin/marvin/config/config.cfg
@@ -146,6 +146,239 @@
         "ostype": "CentOS 5.3 (64-bit)",
         "sleep": 90,
         "timeout": 10,
+        "netscaler_VPX": {
+                                      "ipaddress": "10.223.240.174",
+                                      "username": "nsroot",
+                                      "password": "nsroot",
+                                      "networkdevicetype": "NetscalerVPXLoadBalancer",
+                                      "publicinterface": "1/1",
+                                      "privateinterface": "1/2",
+                                      "numretries": 2,
+                                      "lbdevicededicated": "True",
+                                      "lbdevicecapacity": 2,
+                                      "port": 22
+                        },
+                         "nw_offering_shared_persistent": {
+                                    "name": "Network offering for Shared Persistent Network",
+                                    "displaytext": "Network offering-DA services",
+                                    "guestiptype": "Shared",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "True",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Vpn": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "VirtualRouter",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        }
+                         },
+                        "nw_off_isolated_persistent": {
+                                    "name": "Network offering for Isolated Persistent Network",
+                                    "displaytext": "Network Offering for Isolated Persistent
Network",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype":"GUEST",
+                                    "availability":"Optional",
+                                    "ispersistent": "True",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Vpn": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "VirtualRouter",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        }
+                         },
+                        "nw_off_isolated_persistent_netscaler": {
+                                    "name": "Network offering for Isolated Persistent Network",
+                                    "displaytext": "Network Offering for Isolated Persistent
Network",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "True",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Vpn": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "Netscaler",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        }
+                         },
+                         "nw_offering_isolated": {
+                                    "name": "Network offering for Isolated Persistent Network",
+                                    "displaytext": "Network offering-DA services",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Vpn": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "VirtualRouter",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        }
+                         },
+                        "nw_off_isolated_netscaler": {
+                                    "name": "Network offering for Isolated Persistent Network",
+                                    "displaytext": "Network offering-DA services",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Vpn": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "Netscaler",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        }
+                         },
+                         "nw_off_persistent_RVR": {
+                                    "name": "Network offering-RVR services",
+                                    "displaytext": "Network off-RVR services",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Vpn,Dhcp,Dns,SourceNat,PortForwarding,Firewall,Lb,UserData,StaticNat",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "True",
+                                    "serviceProviderList": {
+                                            "Vpn": "VirtualRouter",
+                                            "Dhcp": "VirtualRouter",
+                                            "Dns": "VirtualRouter",
+                                            "SourceNat": "VirtualRouter",
+                                            "PortForwarding": "VirtualRouter",
+                                            "Firewall": "VirtualRouter",
+                                            "Lb": "VirtualRouter",
+                                            "UserData": "VirtualRouter",
+                                            "StaticNat": "VirtualRouter"
+                                        },
+                                    "serviceCapabilityList": {
+                                        "SourceNat": {
+                                            "SupportedSourceNatTypes": "peraccount",
+                                            "RedundantRouter": "true"
+                                        },
+                                        "lb": {
+                                               "SupportedLbIsolation": "dedicated"
+                                        }
+                                    }
+                         },
+                        "nw_off_persistent_VPCVR_NoLB": {
+                                    "name": "Persistent Network VPC No LB",
+                                    "displaytext": "Persistent Network VPC No LB",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,UserData,StaticNat,NetworkACL",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "False",
+                                    "useVpc": "on",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VpcVirtualRouter",
+                                            "Dns": "VpcVirtualRouter",
+                                            "SourceNat": "VpcVirtualRouter",
+                                            "PortForwarding": "VpcVirtualRouter",
+                                            "Vpn": "VpcVirtualRouter",
+                                            "UserData": "VpcVirtualRouter",
+                                            "StaticNat": "VpcVirtualRouter",
+                                            "NetworkACL": "VpcVirtualRouter"
+                                        }
+                         },
+                        "nw_off_persistent_VPCVR_LB": {
+                                    "name": "Persistent Network VPC with LB",
+                                    "displaytext": "Persistent Network VPC No LB",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat,NetworkACL",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "False",
+                                    "useVpc": "on",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VpcVirtualRouter",
+                                            "Dns": "VpcVirtualRouter",
+                                            "SourceNat": "VpcVirtualRouter",
+                                            "PortForwarding": "VpcVirtualRouter",
+                                            "Vpn": "VpcVirtualRouter",
+                                            "Lb": "VpcVirtualRouter",
+                                            "UserData": "VpcVirtualRouter",
+                                            "StaticNat": "VpcVirtualRouter",
+                                            "NetworkACL": "VpcVirtualRouter"
+                                        }
+                         },
+        "nw_offering_isolated_vpc": {
+                                    "name": "Isolated Network for VPC",
+                                    "displaytext": "Isolated Network for VPC",
+                                    "guestiptype": "Isolated",
+                                    "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,UserData,StaticNat,NetworkACL",
+                                    "traffictype": "GUEST",
+                                    "availability": "Optional",
+                                    "ispersistent": "False",
+                                    "useVpc": "on",
+                                    "serviceProviderList": {
+                                            "Dhcp": "VpcVirtualRouter",
+                                            "Dns": "VpcVirtualRouter",
+                                            "SourceNat": "VpcVirtualRouter",
+                                            "PortForwarding": "VpcVirtualRouter",
+                                            "Vpn": "VpcVirtualRouter",
+                                            "UserData": "VpcVirtualRouter",
+                                            "StaticNat": "VpcVirtualRouter",
+                                            "NetworkACL": "VpcVirtualRouter"
+                                        }
+                         },
+                         "natrule": {
+                                     "privateport": 22,
+                                     "publicport": 22,
+                                     "startport": 22,
+                                     "endport": 22,
+                                     "protocol": "TCP",
+                                     "cidrlist": "0.0.0.0/0"
+                                    },
+                         "fwrule": {
+                                     "startport": 22,
+                                     "endport": 22,
+                                     "cidr": "0.0.0.0/0",
+                                     "protocol": "TCP"
+                                    },
+                         "lbrule": {
+                                    "name": "SSH",
+                                    "alg": "leastconn",
+                                    # Algorithm used for load balancing
+                                    "privateport": 22,
+                                    "publicport": 22,
+                                    "openfirewall": "False",
+                                    "startport": 22,
+                                    "endport": 22,
+                                    "protocol": "TCP",
+                                    "cidrlist": "0.0.0.0/0"
+                                    },
+                        "icmprule": {
+                                      "icmptype": -1,
+                                      "icmpcode": -1,
+                                      "cidrlist": "0.0.0.0/0",
+                                      "protocol": "ICMP"
+                         },
+                         "host_password": "password",
         "advanced_sg": {
                          "zone": {
                                     "name": "",

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c03fd70e/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index f76f07e..d25b6f7 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -131,6 +131,13 @@ class Account:
         [setattr(cmd, k, v) for k, v in kwargs.items()]
         return(apiclient.listAccounts(cmd))
 
+    def disable(self, apiclient, lock=False):
+        """Disable an account"""
+        cmd = disableAccount.disableAccountCmd()
+        cmd.id = self.id
+        cmd.lock = lock
+        apiclient.disableAccount(cmd)
+
 
 class User:
     """ User Life Cycle """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c03fd70e/tools/marvin/marvin/integration/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py
index 5b56c73..b2da3ff 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -64,7 +64,8 @@ from marvin.integration.lib.base import (Configurations,
                                          PhysicalNetwork,
                                          Host,
                                          PublicIPAddress,
-                                         NetworkOffering)
+                                         NetworkOffering,
+                                         Network)
 from marvin.integration.lib.utils import (get_process_status,
                                           xsplit,
                                           validateList)
@@ -969,3 +970,13 @@ def shouldTestBeSkipped(networkType, zoneType):
             and (zoneType.lower() == BASIC_ZONE)):
         skipIt = True
     return skipIt
+
+def verifyNetworkState(apiclient, networkid, state):
+    """List networks and check if the network state matches the given state"""
+    try:
+        networks = Network.list(apiclient, id=networkid)
+    except Exception as e:
+        raise Exception("Failed while fetching network list with error: %s" % e)
+    assert validateList(networks)[0] == PASS, "Networks list validation failed, list is %s"
% networks
+    assert str(networks[0].state).lower() == state, "network state should be %s, it is %s"
% (state, networks[0].state)
+    return


Mime
View raw message