Juan Hernandez has posted comments on this change.
Change subject: restapi: Allow enabling/disabling SSO
......................................................................
Patch Set 4:
(10 comments)
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 1023: </xs:element>
Line 1024: </xs:sequence>
Line 1025: </xs:complexType>
Line 1026:
Line 1027: <xs:element name="sso_methods" type="SsoMethods"/>
Add a blank line here, just to have the same style than the rest of the element
definitions.
Line 1028: <xs:complexType name="SsoMethods">
Line 1029: <xs:sequence>
Line 1030: <xs:element name="sso_method" type="xs:string"
minOccurs="0" maxOccurs="unbounded">
Line 1031: <xs:annotation>
Line 2330: <xs:appinfo>
Line 2331: <jaxb:property name="methods"/>
Line 2332: </xs:appinfo>
Line 2333: </xs:annotation>
Line 2334: <xs:element ref="method" minOccurs="0" maxOccurs="unbounded" />
Use this here:
name="method" type="xs:string"
See the next comment for the reason.
Line 2335: </xs:sequence>
Line 2336: </xs:complexType>
Line 2337:
Line 2338: <xs:element name="method" type="xs:string"/>
Line 2334: <xs:element ref="method" minOccurs="0" maxOccurs="unbounded" />
Line 2335: </xs:sequence>
Line 2336: </xs:complexType>
Line 2337:
Line 2338: <xs:element name="method" type="xs:string"/>
We need this element type definitions in the generator of the Python SDK, but
only when the type is a complex type. In this case it isn't necessary, please
remove it.
Line 2339:
Line 2340: <xs:complexType name="HighAvailability">
Line 2341: <xs:sequence>
Line 2342: <xs:element name="enabled" type="xs:boolean" minOccurs="0"
maxOccurs="1"/>
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
Line 75: vm.description: xs:string
Line 76: vm.comment: xs:string
Line 77: vm.stateless: xs:boolean
Line 78: vm.delete_protected: xs:boolean
Line 79: vm.sso.methods.method:--COLLECTION: {method: 'xs:string'}
This isn't correct, the two dashes need to go inmediatelly after the name:
vm.sso.methods.method--COLLECTION: ...
Line 80: vm.console.enabled: xs:boolean
Line 81: vm.cpu.topology.sockets: xs:int
Line 82: vm.placement_policy.affinity: xs:string
Line 83: vm.placement_policy.host.id|name: xs:string
Line 145: vm.comment: xs:string
Line 146: vm.stateless: xs:boolean
Line 147: vm.permissions.clone: xs:boolean
Line 148: vm.delete_protected: xs:boolean
Line 149: vm.sso.methods.method:--COLLECTION: {method: 'xs:string'}
Same here.
Line 150: vm.console.enabled: xs:boolean
Line 151: vm.cpu.mode: xs:string
Line 152: vm.cpu.topology.sockets: xs:int
Line 153: vm.cpu_shares: xs:int
Line 194: vm.description: xs:string
Line 195: vm.comment: xs:string
Line 196: vm.stateless: xs:boolean
Line 197: vm.delete_protected: xs:boolean
Line 198: vm.sso.methods.method:--COLLECTION: {method: 'xs:string'}
Same here.
Line 199: vm.console.enabled: xs:boolean
Line 200: vm.cpu.topology.sockets: xs:int
Line 201: vm.placement_policy.affinity: xs:string
Line 202: vm.placement_policy.host.id|name: xs:string
Line 236: vm.comment: xs:string
Line 237: vm.stateless: xs:boolean
Line 238: vm.permissions.clone: xs:boolean
Line 239: vm.delete_protected: xs:boolean
Line 240: vm.sso.methods.method:--COLLECTION: {method:
'xs:string'}
Same here.
Line 241: vm.cpu.mode: xs:string
Line 242: vm.cpu.topology.sockets: xs:int
Line 243: vm.placement_policy.affinity: xs:string
Line 244: vm.placement_policy.host.id|name: xs:string
Line 3155: template.domain.name: xs:string
Line 3156: template.type: xs:string
Line 3157: template.stateless: 'xs:boolean'
Line 3158: template.delete_protected: xs:boolean
Line 3159: template.sso.methods.method:--COLLECTION: {method:
'xs:string'}
Same here.
Line 3160: template.console.enabled: xs:boolean
Line 3161: template.placement_policy.affinity: xs:string
Line 3162: template.description: xs:string
Line 3163: template.comment: xs:string
Line 3202: template.domain.name: xs:string
Line 3203: template.type: xs:string
Line 3204: template.stateless: 'xs:boolean'
Line 3205: template.delete_protected: xs:boolean
Line 3206: template.sso.methods.method:--COLLECTION: {method:
'xs:string'}
Same here.
Line 3207: template.console.enabled: xs:boolean
Line 3208: template.placement_policy.affinity: xs:string
Line 3209: template.description: xs:string
Line 3210: template.comment: xs:string
....................................................
File
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SsoMapper.java
Line 26: // set to none if and only if methods list is empty (size 0)
Line 27: if (model != null && model.getMethods() != null &&
model.getMethods().getMethods() != null &&
model.getMethods().getMethods().size() == 0) {
Line 28: return SsoMethod.NONE;
Line 29: }
Line 30:
What happens here if the user sends something like this?
<sso>
<methods>
<method>A_WRONG_METHOD_NAME</method>
</methods>
</sso>
Can you please check it?
Line 31: return SsoMethod.GUEST_AGENT;
Line 32: }
Line 33:
--
To view, visit http://gerrit.ovirt.org/21911
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I25bf94646ea89684152e48f25ad604db6e59e86c
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches