summaryrefslogtreecommitdiff
path: root/pycadf/credential.py
diff options
context:
space:
mode:
authorGordon Chung <chungg@ca.ibm.com>2013-10-24 19:04:13 -0400
committerGordon Chung <chungg@ca.ibm.com>2013-10-25 11:39:22 -0400
commit2e436ada18e5b6d37342ff7969b189d4827df45d (patch)
treeec89a381ab2884c5dcb5b63182cfc770f939fe3b /pycadf/credential.py
parent52aa7818bba4c16229d9d2b402009a36d781ea5f (diff)
downloadpycadf-2e436ada18e5b6d37342ff7969b189d4827df45d.tar.gz
improve model validation
- add isset to check "real" attribute and not descriptor - verify only id is set in shortform - verify either resource or resourceId value is set, not both. blueprint improve-validation related-bug: #1242830 Change-Id: Ie9e3f26c5d30cd36e6013a1f0b77c8fe466cb3f7
Diffstat (limited to 'pycadf/credential.py')
-rw-r--r--pycadf/credential.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pycadf/credential.py b/pycadf/credential.py
index f58f6b6..55b85df 100644
--- a/pycadf/credential.py
+++ b/pycadf/credential.py
@@ -46,4 +46,4 @@ class Credential(cadftype.CADFAbstractType):
# TODO(mrutkows): validate this cadf:Credential type against schema
def is_valid(self):
# TODO(mrutkows): validate specific attribute type/format
- return hasattr(self, CRED_KEYNAME_TOKEN)
+ return self._isset(CRED_KEYNAME_TOKEN)