Add missing cloud/region/az/host_id info to nodes
To the greatest extent possible within the limitation of each provider, this adds cloud, region, az, and host_id to nodes. Each of AWS, Azure, GCE, IBMVPC have the cloud name hard-coded to a value that makes sense for each driver given that each of these are singleton clouds. Their region and az values are added as appropriate. The k8s, openshift, and openshiftpods all have their cloud names set to the k8s context name, which is the closest approximation of what the "cloud" attribute means in its existing usage in the OpenStack driver. If pods are launched, the host_id value is set to the k8s host node name, which is an approximation of the existing usage in the OpenStack driver (where it is typically an opaque uuid that uniquely identifies the hypervisor). Change-Id: I53765fc3914a84d2519f5d4dda4f8dc8feda72f2
This commit is contained in:
@@ -157,6 +157,7 @@ class StateMachineNodeLauncher(stats.StatsReporter):
|
||||
node.public_ipv4 = instance.public_ipv4
|
||||
node.private_ipv4 = instance.private_ipv4
|
||||
node.public_ipv6 = instance.public_ipv6
|
||||
node.cloud = instance.cloud
|
||||
node.region = instance.region
|
||||
node.az = instance.az
|
||||
node.driver_data = instance.driver_data
|
||||
@@ -737,6 +738,7 @@ class Instance:
|
||||
* public_ipv4: str
|
||||
* public_ipv6: str
|
||||
* private_ipv4: str
|
||||
* cloud: str
|
||||
* az: str
|
||||
* region: str
|
||||
* driver_data: any
|
||||
@@ -759,6 +761,7 @@ class Instance:
|
||||
self.public_ipv6 = None
|
||||
self.private_ipv4 = None
|
||||
self.interface_ip = None
|
||||
self.cloud = None
|
||||
self.az = None
|
||||
self.region = None
|
||||
self.metadata = {}
|
||||
|
||||
Reference in New Issue
Block a user