From 762a166b32539335ceecb230ae28e1753f849c11 Mon Sep 17 00:00:00 2001 From: tengqm Date: Fri, 16 Jan 2015 15:22:30 +0800 Subject: [PATCH] Added Versions to the client-side models Versions would be useful for determining whether an API is usable before invocation happens. --- senlinclient/v1/models.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/senlinclient/v1/models.py b/senlinclient/v1/models.py index dd00c320..f89b2493 100644 --- a/senlinclient/v1/models.py +++ b/senlinclient/v1/models.py @@ -14,6 +14,22 @@ from senlinclient.common import sdk as resource from senlinclient.openstack.clustering import clustering_service +class Version(resource.Resource): + resource_key = 'version' + resources_key = 'versions' + base_path = '/' + service = orchestration_service.OrchestrationService( + version=orchestration_service.OrchestrationService.UNVERSIONED + ) + + # capabilities + allow_list = True + + # Properties + links = resource.prop('links') + status = resource.prop('status') + + class BuildInfo(resource.Resource): base_path = '/build_info' service = clustering_service.ClusteringService()