vikramdoda 9 лет назад
Родитель
Сommit
5d004ec244
2 измененных файлов с 9 добавлено и 9 удалено
  1. 1 1
      .travis.yml
  2. 8 8
      cloudbridge/cloud/providers/azure/resources.py

+ 1 - 1
.travis.yml

@@ -53,7 +53,7 @@ install:
     - pip install coveralls
     - pip install coveralls
     - pip install codecov
     - pip install codecov
 script:
 script:
-    - tox -e $TOX_ENV
+    - travis_wait 110 tox -e $TOX_ENV
 after_success:
 after_success:
     - |
     - |
       case "$TRAVIS_EVENT_TYPE" in
       case "$TRAVIS_EVENT_TYPE" in

+ 8 - 8
cloudbridge/cloud/providers/azure/resources.py

@@ -244,18 +244,18 @@ class AzureSecurityGroupRule(BaseSecurityGroupRule):
 
 
     @property
     @property
     def from_port(self):
     def from_port(self):
-        if self._rule.source_port_range == '*':
-            return self._rule.source_port_range
-        source_port_range = self._rule.source_port_range
-        port_range_split = source_port_range.split('-', 1)
+        if self._rule.destination_port_range == '*':
+            return self._rule.destination_port_range
+        destination_port_range = self._rule.destination_port_range
+        port_range_split = destination_port_range.split('-', 1)
         return port_range_split[0]
         return port_range_split[0]
 
 
     @property
     @property
     def to_port(self):
     def to_port(self):
-        if self._rule.source_port_range == '*':
-            return self._rule.source_port_range
-        source_port_range = self._rule.source_port_range
-        port_range_split = source_port_range.split('-', 1)
+        if self._rule.destination_port_range == '*':
+            return self._rule.destination_port_range
+        destination_port_range = self._rule.destination_port_range
+        port_range_split = destination_port_range.split('-', 1)
         return port_range_split[1]
         return port_range_split[1]
 
 
     @property
     @property