Description of problem: following operation definition from rsdl_metadata.yaml is not valid. * datacenter.version.major: 'xs:int' and datacenter.version.minor: 'xs:int' isn't actually mandatory — when called without them, code will neigher complaint nor fail. * datacenter.local: xs:boolean is actually mandatory, since call will fail when not specified. That makes it mandatory argument *and* probably corrupts backward compatibility, since formerly optional argument is now mandatory. - name: /datacenters|rel=add description: add a new data center to the system request: body: parameterType: DataCenter signatures: - mandatoryArguments: {datacenter.name: 'xs:string', datacenter.version.major: 'xs:int', datacenter.version.minor: 'xs:int'} optionalArguments: datacenter.storage_type--DEPRECATED: xs:string datacenter.local: xs:boolean datacenter.description: xs:string datacenter.comment: xs:string datacenter.storage_format: xs:string description: add a new data center to the system urlparams: {} headers: Content-Type: {value: application/xml|json, required: true} Expect: {value: 201-created, required: false} Correlation-Id: {value: 'any string', required: false} Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. issue respective posts (which probably should be puts) to .../api/datacenters
Eli, I think that the version has been made optional in the backend recently. Can you update the RESTAPI metadata as well?
Tal, I'm not sure about the "local" property, we are explicitly checking it, but only if not present, that is a bit strange. I guess that it is mandatory in the backend. Can you confirm?
I'm changing the bug to the storage whiteboard because I think that the more relevant issue here is the mandatory/optional status of the "local" property.
It is mandatory basically since we need to know whether it's a local DC or a shared one, we can have a default behavior and then make it optional
Then we need to fix the RSDL metadata, something like this: diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml index 40b331f..8091876 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml @@ -1937,10 +1937,9 @@ actions: body: parameterType: DataCenter signatures: - - mandatoryArguments: {datacenter.name: 'xs:string', datacenter.version.major: 'xs:int', datacenter.version.minor: 'xs:int'} + - mandatoryArguments: {datacenter.name: 'xs:string', datacenter.version.major: 'xs:int', datacenter.version.minor: 'xs:int', datacenter.local: 'xs:boolean'} optionalArguments: datacenter.storage_type--DEPRECATED: xs:string - datacenter.local: xs:boolean datacenter.description: xs:string datacenter.comment: xs:string datacenter.storage_format: xs:string
According to the previous comments the version number is optional and the "local" attribute is mandatory.
Verified - POST body: (No local) <data_center> <name>dc1</name> <storage_format>v3</storage_format> </data_center> Response body: <fault> <reason>Incomplete parameters</reason> <detail>DataCenter [local] required for add</detail> </fault>
Please supply doc text
RHEV-M 3.5.0 has been released, closing this bug.