Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1216004

Summary: It isn't possible to disable VM SSO
Product: [oVirt] ovirt-engine-cli Reporter: Juan Hernández <juan.hernandez>
Component: GeneralAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, gklein, juwu, kboumedh, lsurette, oourfali, rbalakri, srevivo, ykaul
Target Milestone: ---Flags: sbonazzo: ovirt-4.1-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 10:17:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Hernández 2015-04-28 10:49:50 UTC
Currently the RESTAPI supports disabling SSO for a VM sending an empty list of SSO methods:

---8<---
#!/bin/sh -ex

url="https://engine.example.com/ovirt-engine/api"
user="admin@internal"
password="******"

curl \
--insecure \
--user "${user}:${password}" \
--request PUT \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '
<vm>
  <sso>
    <methods/>
  </sso>
</vm>
' \
"${url}/vms/7db0f6c8-7328-4cd3-ac06-1ac875511bb3"
--->8---

But this isn't possible with the CLI, as using an empty value for the "--sso-methods-method" option produces an error:

---8<---
[oVirt shell (connected)]# update vm myvm --sso-methods-method ""
============================ ERROR =========================
invalid syntax at "--sso-methods-method", see help on
collection based arguments for more details.
============================================================
--->8---

This happens for any element that allows an empty list of values, not just for SSO methods.

In these cases, when given an empty value, the CLI should send an empty list.

Comment 3 Juan Hernández 2016-05-10 10:17:55 UTC
There aren't plans to update the CLI, so this won't be fixed.