Quellcode durchsuchen

Implement the missing network properties

The properties are "external" and "state".
Ehsan Chiniforooshan vor 8 Jahren
Ursprung
Commit
ac2931a6f8
1 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  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
     @property
     def external(self):
     def external(self):
-        raise NotImplementedError("To be implemented")
+        """
+        All GCP networks can be connected to the Internet.
+        """
+        return True
 
 
     @property
     @property
     def state(self):
     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
     @property
     def cidr_block(self):
     def cidr_block(self):