()
| 769 | |
| 770 | |
| 771 | def descSetupInAdvancedsgMode(): |
| 772 | zs = cloudstackConfiguration() |
| 773 | |
| 774 | for l in range(1): |
| 775 | z = zone() |
| 776 | z.dns1 = "8.8.8.8" |
| 777 | z.dns2 = "8.8.4.4" |
| 778 | z.internaldns1 = "192.168.110.254" |
| 779 | z.internaldns2 = "192.168.110.253" |
| 780 | z.name = "test" + str(l) |
| 781 | z.networktype = 'Advanced' |
| 782 | z.vlan = "100-2000" |
| 783 | z.securitygroupenabled = "true" |
| 784 | |
| 785 | pn = physicalNetwork() |
| 786 | pn.name = "test-network" |
| 787 | pn.traffictypes = [trafficType("Guest"), trafficType("Management")] |
| 788 | |
| 789 | # If security groups are reqd |
| 790 | sgprovider = provider() |
| 791 | sgprovider.broadcastdomainrange = 'ZONE' |
| 792 | sgprovider.name = 'SecurityGroupProvider' |
| 793 | |
| 794 | pn.providers.append(sgprovider) |
| 795 | z.physical_networks.append(pn) |
| 796 | |
| 797 | '''create 10 pods''' |
| 798 | for i in range(2): |
| 799 | p = pod() |
| 800 | p.name = "test" + str(l) + str(i) |
| 801 | p.gateway = "192.168.%d.1" % i |
| 802 | p.netmask = "255.255.255.0" |
| 803 | p.startip = "192.168.%d.200" % i |
| 804 | p.endip = "192.168.%d.220" % i |
| 805 | |
| 806 | '''add 10 clusters''' |
| 807 | for j in range(2): |
| 808 | c = cluster() |
| 809 | c.clustername = "test" + str(l) + str(i) + str(j) |
| 810 | c.clustertype = "CloudManaged" |
| 811 | c.hypervisor = "Simulator" |
| 812 | |
| 813 | '''add 10 hosts''' |
| 814 | for k in range(2): |
| 815 | h = host() |
| 816 | h.username = "root" |
| 817 | h.password = "password" |
| 818 | memory = 8 * 1024 * 1024 * 1024 |
| 819 | localstorage = 1 * 1024 * 1024 * 1024 * 1024 |
| 820 | # h.url = "http://sim/%d%d%d%d/cpucore=1&cpuspeed=8000&\ |
| 821 | # memory=%d&localstorage=%d" % (l, i, j, k, memory, |
| 822 | # localstorage) |
| 823 | h.url = "http://sim/%d%d%d%d" % (l, i, j, k) |
| 824 | c.hosts.append(h) |
| 825 | |
| 826 | '''add 2 primary storages''' |
| 827 | for m in range(2): |
| 828 | primary = primaryStorage() |
no test coverage detected