New clusters file, replacing old ones
This commit is contained in:
45
senlinclient/v1/clusters.py
Normal file
45
senlinclient/v1/clusters.py
Normal file
@@ -0,0 +1,45 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack import resource
|
||||
from senlinclient.openstack.clustering import clustering_service
|
||||
|
||||
|
||||
class Cluster(resource.Resource):
|
||||
resource_key = 'cluster'
|
||||
resources_key = 'clusters'
|
||||
base_path = '/clusters'
|
||||
service = clustering_service.ClusteringService()
|
||||
|
||||
# capabilities
|
||||
allow_create = True
|
||||
allow_retrieve = True
|
||||
allow_update = True
|
||||
allow_delete = True
|
||||
allow_list = True
|
||||
|
||||
# Properties
|
||||
links = resource.prop('links', type=dict)
|
||||
name = resource.prop('name')
|
||||
profile_id = resource.prop('profile_id')
|
||||
user = resource.prop('user')
|
||||
project = resource.prop('project')
|
||||
domain = resource.prop('domain')
|
||||
parent = resource.prop('parent')
|
||||
created_time = resource.prop('created_time')
|
||||
updated_time = resource.prop('updated_time')
|
||||
deleted_time = resource.prop('deleted_time')
|
||||
size = resource.prop('size', type=int)
|
||||
timeout = resource.prop('timeout')
|
||||
status = resource.prop('status')
|
||||
status_reason = resource.prop('status_reason')
|
||||
tags = resource.prop('tags', type=dict)
|
||||
Reference in New Issue
Block a user