Merge "cluster: Use typed props instead of *_id"
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.cluster import cluster_service
|
from openstack.cluster import cluster_service
|
||||||
|
from openstack.cluster.v1 import profile as _profile
|
||||||
from openstack import resource
|
from openstack import resource
|
||||||
from openstack import utils
|
from openstack import utils
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ class Cluster(resource.Resource):
|
|||||||
#: The name of the cluster.
|
#: The name of the cluster.
|
||||||
name = resource.prop('name')
|
name = resource.prop('name')
|
||||||
#: The ID of the profile used by this cluster.
|
#: The ID of the profile used by this cluster.
|
||||||
profile_id = resource.prop('profile_id')
|
profile = resource.prop('profile_id', type=_profile.Profile)
|
||||||
#: The ID of the user who created this cluster, thus the owner of it.
|
#: The ID of the user who created this cluster, thus the owner of it.
|
||||||
user = resource.prop('user')
|
user = resource.prop('user')
|
||||||
#: The ID of the project this cluster belongs to.
|
#: The ID of the project this cluster belongs to.
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.cluster import cluster_service
|
from openstack.cluster import cluster_service
|
||||||
|
from openstack.cluster.v1 import cluster as _cluster
|
||||||
|
from openstack.cluster.v1 import profile as _profile
|
||||||
from openstack import resource
|
from openstack import resource
|
||||||
from openstack import utils
|
from openstack import utils
|
||||||
|
|
||||||
@@ -37,9 +39,9 @@ class Node(resource.Resource):
|
|||||||
physical_id = resource.prop('physical_id')
|
physical_id = resource.prop('physical_id')
|
||||||
#: The ID of the cluster in which this node is a member.
|
#: The ID of the cluster in which this node is a member.
|
||||||
#: A node is an orphan node if this field is empty.
|
#: A node is an orphan node if this field is empty.
|
||||||
cluster_id = resource.prop('cluster_id')
|
cluster = resource.prop('cluster_id', type=_cluster.Cluster)
|
||||||
#: The ID of the profile used by this node.
|
#: The ID of the profile used by this node.
|
||||||
profile_id = resource.prop('profile_id')
|
profile = resource.prop('profile_id', type=_profile.Profile)
|
||||||
#: The ID of the project this node belongs to.
|
#: The ID of the project this node belongs to.
|
||||||
project = resource.prop('project')
|
project = resource.prop('project')
|
||||||
#: The name of the profile used by this node.
|
#: The name of the profile used by this node.
|
||||||
|
Reference in New Issue
Block a user