Просмотр исходного кода

Implement the missing network properties

The properties are "external" and "state".
Ehsan Chiniforooshan 8 лет назад
Родитель
Сommit
ac2931a6f8
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      cloudbridge/cloud/providers/gce/resources.py

+ 9 - 2
cloudbridge/cloud/providers/gce/resources.py

@@ -1213,11 +1213,18 @@ class GCENetwork(BaseNetwork):
 
     @property
     def external(self):
-        raise NotImplementedError("To be implemented")
+        """
+        All GCP networks can be connected to the Internet.
+        """
+        return True
 
     @property
     def state(self):
-        raise NotImplementedError("To be implemented")
+        """
+        When a GCP network created by the CloudBridge API, we wait until the
+        network is ready.
+        """
+        return NetworkState.AVAILABLE
 
     @property
     def cidr_block(self):