Procházet zdrojové kódy

On a live cloud, cidr_block includes the network size

Enis Afgan před 9 roky
rodič
revize
5488d73c74
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      test/helpers.py

+ 1 - 1
test/helpers.py

@@ -76,7 +76,7 @@ def create_test_network(provider, name):
     Create a network with one subnet, returning the network and subnet objects.
     """
     net = provider.network.create(name=name)
-    cidr_block = net.cidr_block or '10.0.0.1'
+    cidr_block = (net.cidr_block).split('/')[0] or '10.0.0.1'
     sn = net.create_subnet(cidr_block='{0}/28'.format(cidr_block, name=name))
     return net, sn