JSON format for property modified
Change-Id: I2ae07043a5da8ffb67b671542187c63cc33c6df5
This commit is contained in:
parent
0d32a96f79
commit
f57bf579fc
|
@ -16,11 +16,9 @@
|
|||
import wsme
|
||||
from wsme import types
|
||||
|
||||
from graffiti.api.model.v1.property import Property
|
||||
|
||||
|
||||
class Capability(types.Base):
|
||||
properties = wsme.wsattr([Property], mandatory=True)
|
||||
properties = wsme.wsattr({types.text: types.text}, mandatory=True)
|
||||
capability_type = wsme.wsattr(types.text, mandatory=True)
|
||||
capability_type_namespace = wsme.wsattr(types.text, mandatory=True)
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import wsme
|
|||
from wsme import types
|
||||
|
||||
from graffiti.api.model.v1.capability import Capability
|
||||
from graffiti.api.model.v1.property import Property
|
||||
from graffiti.api.model.v1.provider import Provider
|
||||
from graffiti.api.model.v1.requirement import Requirement
|
||||
|
||||
|
@ -28,7 +27,7 @@ class Resource(types.Base):
|
|||
name = wsme.wsattr(types.text, mandatory=True)
|
||||
description = wsme.wsattr(types.text, mandatory=False)
|
||||
provider = wsme.wsattr(Provider, mandatory=True)
|
||||
properties = wsme.wsattr([Property], mandatory=False)
|
||||
properties = wsme.wsattr({types.text: types.text}, mandatory=False)
|
||||
capabilities = wsme.wsattr([Capability], mandatory=True)
|
||||
requirements = wsme.wsattr([Requirement], mandatory=True)
|
||||
|
||||
|
|
|
@ -10,38 +10,26 @@
|
|||
{
|
||||
"capability_type": "StandardCapability1",
|
||||
"capability_type_namespace": "TEST:RESOURCE:2014-1",
|
||||
"properties": [
|
||||
"properties":
|
||||
{
|
||||
"name": "StandardCapabilityProperty1",
|
||||
"value": "SCP1"
|
||||
},
|
||||
{
|
||||
"name": "StandardCapabilityProperty2",
|
||||
"value": "SCP2"
|
||||
}]
|
||||
"StandardCapabilityProperty1": "SCP1",
|
||||
"StandardCapabilityProperty2": "SCP2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"capability_type": "StandardCapability2",
|
||||
"capability_type_namespace": "TEST:RESOURCE:2014-1",
|
||||
"properties": [
|
||||
"properties":
|
||||
{
|
||||
"name": "StandardCapabilityProperty3",
|
||||
"value": "SCP3"
|
||||
},
|
||||
{
|
||||
"name": "StandardCapabilityProperty4",
|
||||
"value": "SCP4"
|
||||
}]
|
||||
"StandardCapabilityProperty3": "SCP3",
|
||||
"StandardCapabilityProperty4": "SCP4"
|
||||
}
|
||||
}],
|
||||
"properties": [
|
||||
"properties":
|
||||
{
|
||||
"name": "StandardResourceProperty1",
|
||||
"value": "SRP1"
|
||||
"StandardResourceProperty1": "SRP1",
|
||||
"StandardResourceProperty2": "SRP2"
|
||||
},
|
||||
{
|
||||
"name": "StandardResourceProperty2",
|
||||
"value": "SRP2"
|
||||
}],
|
||||
"requirements": [
|
||||
{
|
||||
"capability_type": "StandardRequirement1",
|
||||
|
|
Loading…
Reference in New Issue