Topic
1 reply Latest Post - ‏2013-04-26T09:29:51Z by 932H_Dominik_Jall
jmayers
jmayers
3 Posts
ACCEPTED ANSWER

Pinned topic Resources Sliders

‏2012-10-02T18:56:36Z |
How can you modifiy the values on the Resources Sliders in SimpleSRM?
  • 932H_Dominik_Jall
    932H_Dominik_Jall
    1 Post
    ACCEPTED ANSWER

    Re: Resources Sliders

    ‏2013-04-26T09:29:51Z  in response to jmayers

    Hi,

     

    the APi for the resource sliders is described in the TSAM infocenter here:

    http://pic.dhe.ibm.com/infocenter/tivihelp/v10r1/topic/com.ibm.tsam_7.2.4.1.doc/ext/r_ext_ui_rest_createproj.html

     

    here is an example. you can also find it in the "sample" folder of custom_web in the file "Offering_simplify_SML_sample.js" shipped with TSAM 7.2.4.0

    <code>

            var sd = this.tsamGetPage("Page ServerDetails");
            sd.tsamGetField("Virtual CPU Slider").tsamCall("setValue", vcpu);
            sd.tsamGetField("Physical CPU Slider").tsamCall("setValue", pcpu);
            sd.tsamGetField("Memory Slider").tsamCall("setValue", mem);
            sd.tsamGetField("Disk Slider").tsamCall("setValue", disk);
     

    </code>

     

    The code assumes the variables defined:

    vcpu (virtual cpus - integer),

    pcpu (physical cpu shares - float like 0.1, 0.2 etc.),

    mem (memory - integer in MB)

    disk (disk size - integer in GB)

     

    Please note that this will only try to set the slider values and might still result in different values being set depending on the available resources in the selected resource pool. You can't set 16 vcpus if your pool has only 8 for example.