summaryrefslogtreecommitdiff
path: root/glanceclient/v2/schemas.py
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-07-14 01:11:22 +0000
committerBrian Waldon <bcwaldon@gmail.com>2012-07-13 18:38:41 -0700
commitc398af18b0b8fb5fb075be22563812e179290b2a (patch)
treebd5d428318e6e1e64a5289d581e7286786e52a0a /glanceclient/v2/schemas.py
parentb6cef9d145f870dd717843751f0c5d68867e07d5 (diff)
downloadpython-glanceclient-c398af18b0b8fb5fb075be22563812e179290b2a.tar.gz
Replace static v2 Image model with warlock model
* Add warlock v0.1.0 as a dependency * Generate a pythonic, self-validating Image model using warlock * Add raw method to Schema model * Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a04
Diffstat (limited to 'glanceclient/v2/schemas.py')
-rw-r--r--glanceclient/v2/schemas.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/glanceclient/v2/schemas.py b/glanceclient/v2/schemas.py
index b4ed61c..6e178d2 100644
--- a/glanceclient/v2/schemas.py
+++ b/glanceclient/v2/schemas.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import copy
+
from glanceclient import exc
@@ -40,6 +42,9 @@ class Schema(object):
raw_properties = raw_schema['properties']
self.properties = translate_schema_properties(raw_properties)
+ def raw(self):
+ return copy.deepcopy(self._raw_schema)
+
class Controller(object):
def __init__(self, http_client):