Bug 1149192 - [REGENERATE JAVA SDK] memory_policy - ballooning unable to set
Summary: [REGENERATE JAVA SDK] memory_policy - ballooning unable to set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk-java
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On: 1149188
Blocks: rhev3.5beta3
TreeView+ depends on / blocked
 
Reported: 2014-10-03 13:13 UTC by Juan Hernández
Modified: 2016-02-10 19:31 UTC (History)
13 users (show)

Fixed In Version: rhevm-sdk-java-3.5.0.5-3.el6ev
Doc Type: Bug Fix
Doc Text:
Clone Of: 1149188
Environment:
Last Closed: 2015-02-11 18:11:20 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0184 0 normal SHIPPED_LIVE rhevm-sdk-java bug fix and enhancement update 2015-02-11 22:39:22 UTC

Description Juan Hernández 2014-10-03 13:13:32 UTC
+++ This bug was initially created as a clone of Bug #1149188 +++

Description of problem:

i'd like to set ballooning to False but i can't do it via rhevm-shell.

  add vm --name blabla cluster-name Default --template-name Blank --memory<TAB>

shows

  --memory                     --memory_policy-guaranteed

I would expect to see 'memory' and 'memory_policy' like in api output.

...
<memory_policy><guaranteed>1073741824</guaranteed><ballooning>false</ballooning></memory_policy>
...

I'm not sure but shouldn't be command like this?

  add vm --name blabla cluster-name Default --template-name Blank --memory-policy {ballooning=False}

as 'ballooning' is subparam?

Version-Release number of selected component (if applicable):
rhevm-cli-3.5.0.4-1.el6ev.noarch & rhevm-cli-3.4.0.6-4.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. try to add a vm via cli with ballooning disabled
2.
3.

Actual results:
not possible (??)

Expected results:
should work

Additional info:
i tried to as workaround of BZ1135939

--- Additional comment from Juan Hernández on 2014-10-03 09:09:01 EDT ---

The command should be like this:

  add vm --name blabla --cluster-name Default --template-name Blank --memory_policy-ballooning true

This should work with the current version of the CLI, even if the option isn't offered by the auto-completion mechanism. To fix the auto-completion we need to document the option in the RSDL metadata, and then we need to regenerate the Python SDK.

Comment 2 Ondra Machacek 2014-10-23 12:43:00 UTC
public static void main(String[] args) throws Exception{
        Api api = new Api(URL, user, password, true, false);

        MemoryPolicy mp = new MemoryPolicy();
        mp.setBallooning(false);
        Cluster cl = api.getClusters().get("Global_Cluster0");
        Template tmp = api.getTemplates().get("Blank");
        VM vm = new VM();
        vm.setName("testVm02");
        vm.setCluster(cl);
        vm.setTemplate(tmp);
        vm.setMemoryPolicy(mp);

        api.getVMs().add(vm);
        api.shutdown();
    }

Comment 4 errata-xmlrpc 2015-02-11 18:11:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0184.html


Note You need to log in before you can comment on or make changes to this bug.