Power parameters for VMware in MaaS CLIWhy no maas-cli for 12.04 LTS?Add Nodes to MAAS for JUJU BundleCan't commission node in MAAS due to “Failed to power on node” errorMAAS - CLI or API for deployhow to set MAAS for “power type” on VM created with VMware FusionHow to control power of MAAS nodes via the CLI?MAAS IPMI power passwordWhat are the power parameters for MAAS when using Cisco UCS blades for machinesHow do you access the MAAS CLI?Can commission virsh VM with MaaS Pod, but deploy fails with timeout

What is the term when two people sing in harmony, but they aren't singing the same notes?

For airliners, what prevents wing strikes on landing in bad weather?

Superhero words!

How will losing mobility of one hand affect my career as a programmer?

A car is moving at 40 km/h. A fly at 100 km/h, starts from wall towards the car(20 km away)flies to car and back. How many trips can it make?

Can a Bard use an arcane focus?

node command while defining a coordinate in TikZ

Is the next prime number always the next number divisible by the current prime number, except for any numbers previously divisible by primes?

Can somebody explain Brexit in a few child-proof sentences?

What would you call a finite collection of unordered objects that are not necessarily distinct?

Lifted its hind leg on or lifted its hind leg towards?

Meta programming: Declare a new struct on the fly

What does the "3am" section means in manpages?

Identify a stage play about a VR experience in which participants are encouraged to simulate performing horrific activities

Partial sums of primes

What if somebody invests in my application?

How did Monica know how to operate Carol's "designer"?

Calculating the number of days between 2 dates in Excel

How to interpret the phrase "t’en a fait voir à toi"?

When is separating the total wavefunction into a space part and a spin part possible?

Could solar power be utilized and substitute coal in the 19th century?

Why is delta-v is the most useful quantity for planning space travel?

What to do when my ideas aren't chosen, when I strongly disagree with the chosen solution?

Bob has never been a M before



Power parameters for VMware in MaaS CLI


Why no maas-cli for 12.04 LTS?Add Nodes to MAAS for JUJU BundleCan't commission node in MAAS due to “Failed to power on node” errorMAAS - CLI or API for deployhow to set MAAS for “power type” on VM created with VMware FusionHow to control power of MAAS nodes via the CLI?MAAS IPMI power passwordWhat are the power parameters for MAAS when using Cisco UCS blades for machinesHow do you access the MAAS CLI?Can commission virsh VM with MaaS Pod, but deploy fails with timeout













0















I am playing with MaaS in a vSphere environment so I can simulate large clusters. I have finished my auto-provisioning PowerShell script, where I can provision a bunch of virtual machines to be added to the MaaS controller. I can add these nodes manually in the Controller GUI and I was able to commission them accordingly. I'm currently trying to figure out how to add the machines via the MaaS CLI, and I'm stuck on the power_parameters parameter. Based off the MaaS API documentation, I have to add everything as a key=value type.



Where I'm stuck is on how to add that parameter in the CLI. If I don't pass power_parameters, I get this error:



400 BAD REQUEST

Content-Type: application/json; charset=utf-8
Date: Mon, 25 Mar 2019 21:01:03 GMT
Server: TwistedWeb/16.0.0
Status: 400
Transfer-Encoding: chunked
Vary: Cookie
X-Frame-Options: SAMEORIGIN

"power_parameters": ["This field is required."]


But I cannot figure out the proper string formatting for the parameter. I have tried several combos:



# tried adding it as a string as the docs say
maas <user> machines create -d
...
power_parameters="power_vm_name=<vmname> power_uuid=<vmuuid>"

# tried query string separating
maas <user> machines create -d
...
power_parameters="power_vm_name=<vmname>&power_uuid=<vmuuid>"

# tried comma separating
maas <user> machines create -d
...
power_parameters=power_vm_name=<vmname>,power_uuid=<vmuuid>

# tried individual parameters
maas <user> machines create -d
...
power_vm_name=<vmname> power_uuid=<vmuuid>


I get this error with every permutation I've tried:



400 BAD REQUEST

Content-Type: text/plain; charset=utf-8
Date: Mon, 25 Mar 2019 20:54:24 GMT
Server: TwistedWeb/16.0.0
Status: 400
Transfer-Encoding: chunked
Vary: Cookie
X-Frame-Options: SAMEORIGIN

Failed to parse JSON power_parameters


I know I can send the raw JSON payload via REST, but I don't really want to implement a REST client in PowerShell for MaaS.



What is the proper string formatting for adding power_parameters in the MaaS CLI?










share|improve this question


























    0















    I am playing with MaaS in a vSphere environment so I can simulate large clusters. I have finished my auto-provisioning PowerShell script, where I can provision a bunch of virtual machines to be added to the MaaS controller. I can add these nodes manually in the Controller GUI and I was able to commission them accordingly. I'm currently trying to figure out how to add the machines via the MaaS CLI, and I'm stuck on the power_parameters parameter. Based off the MaaS API documentation, I have to add everything as a key=value type.



    Where I'm stuck is on how to add that parameter in the CLI. If I don't pass power_parameters, I get this error:



    400 BAD REQUEST

    Content-Type: application/json; charset=utf-8
    Date: Mon, 25 Mar 2019 21:01:03 GMT
    Server: TwistedWeb/16.0.0
    Status: 400
    Transfer-Encoding: chunked
    Vary: Cookie
    X-Frame-Options: SAMEORIGIN

    "power_parameters": ["This field is required."]


    But I cannot figure out the proper string formatting for the parameter. I have tried several combos:



    # tried adding it as a string as the docs say
    maas <user> machines create -d
    ...
    power_parameters="power_vm_name=<vmname> power_uuid=<vmuuid>"

    # tried query string separating
    maas <user> machines create -d
    ...
    power_parameters="power_vm_name=<vmname>&power_uuid=<vmuuid>"

    # tried comma separating
    maas <user> machines create -d
    ...
    power_parameters=power_vm_name=<vmname>,power_uuid=<vmuuid>

    # tried individual parameters
    maas <user> machines create -d
    ...
    power_vm_name=<vmname> power_uuid=<vmuuid>


    I get this error with every permutation I've tried:



    400 BAD REQUEST

    Content-Type: text/plain; charset=utf-8
    Date: Mon, 25 Mar 2019 20:54:24 GMT
    Server: TwistedWeb/16.0.0
    Status: 400
    Transfer-Encoding: chunked
    Vary: Cookie
    X-Frame-Options: SAMEORIGIN

    Failed to parse JSON power_parameters


    I know I can send the raw JSON payload via REST, but I don't really want to implement a REST client in PowerShell for MaaS.



    What is the proper string formatting for adding power_parameters in the MaaS CLI?










    share|improve this question
























      0












      0








      0








      I am playing with MaaS in a vSphere environment so I can simulate large clusters. I have finished my auto-provisioning PowerShell script, where I can provision a bunch of virtual machines to be added to the MaaS controller. I can add these nodes manually in the Controller GUI and I was able to commission them accordingly. I'm currently trying to figure out how to add the machines via the MaaS CLI, and I'm stuck on the power_parameters parameter. Based off the MaaS API documentation, I have to add everything as a key=value type.



      Where I'm stuck is on how to add that parameter in the CLI. If I don't pass power_parameters, I get this error:



      400 BAD REQUEST

      Content-Type: application/json; charset=utf-8
      Date: Mon, 25 Mar 2019 21:01:03 GMT
      Server: TwistedWeb/16.0.0
      Status: 400
      Transfer-Encoding: chunked
      Vary: Cookie
      X-Frame-Options: SAMEORIGIN

      "power_parameters": ["This field is required."]


      But I cannot figure out the proper string formatting for the parameter. I have tried several combos:



      # tried adding it as a string as the docs say
      maas <user> machines create -d
      ...
      power_parameters="power_vm_name=<vmname> power_uuid=<vmuuid>"

      # tried query string separating
      maas <user> machines create -d
      ...
      power_parameters="power_vm_name=<vmname>&power_uuid=<vmuuid>"

      # tried comma separating
      maas <user> machines create -d
      ...
      power_parameters=power_vm_name=<vmname>,power_uuid=<vmuuid>

      # tried individual parameters
      maas <user> machines create -d
      ...
      power_vm_name=<vmname> power_uuid=<vmuuid>


      I get this error with every permutation I've tried:



      400 BAD REQUEST

      Content-Type: text/plain; charset=utf-8
      Date: Mon, 25 Mar 2019 20:54:24 GMT
      Server: TwistedWeb/16.0.0
      Status: 400
      Transfer-Encoding: chunked
      Vary: Cookie
      X-Frame-Options: SAMEORIGIN

      Failed to parse JSON power_parameters


      I know I can send the raw JSON payload via REST, but I don't really want to implement a REST client in PowerShell for MaaS.



      What is the proper string formatting for adding power_parameters in the MaaS CLI?










      share|improve this question














      I am playing with MaaS in a vSphere environment so I can simulate large clusters. I have finished my auto-provisioning PowerShell script, where I can provision a bunch of virtual machines to be added to the MaaS controller. I can add these nodes manually in the Controller GUI and I was able to commission them accordingly. I'm currently trying to figure out how to add the machines via the MaaS CLI, and I'm stuck on the power_parameters parameter. Based off the MaaS API documentation, I have to add everything as a key=value type.



      Where I'm stuck is on how to add that parameter in the CLI. If I don't pass power_parameters, I get this error:



      400 BAD REQUEST

      Content-Type: application/json; charset=utf-8
      Date: Mon, 25 Mar 2019 21:01:03 GMT
      Server: TwistedWeb/16.0.0
      Status: 400
      Transfer-Encoding: chunked
      Vary: Cookie
      X-Frame-Options: SAMEORIGIN

      "power_parameters": ["This field is required."]


      But I cannot figure out the proper string formatting for the parameter. I have tried several combos:



      # tried adding it as a string as the docs say
      maas <user> machines create -d
      ...
      power_parameters="power_vm_name=<vmname> power_uuid=<vmuuid>"

      # tried query string separating
      maas <user> machines create -d
      ...
      power_parameters="power_vm_name=<vmname>&power_uuid=<vmuuid>"

      # tried comma separating
      maas <user> machines create -d
      ...
      power_parameters=power_vm_name=<vmname>,power_uuid=<vmuuid>

      # tried individual parameters
      maas <user> machines create -d
      ...
      power_vm_name=<vmname> power_uuid=<vmuuid>


      I get this error with every permutation I've tried:



      400 BAD REQUEST

      Content-Type: text/plain; charset=utf-8
      Date: Mon, 25 Mar 2019 20:54:24 GMT
      Server: TwistedWeb/16.0.0
      Status: 400
      Transfer-Encoding: chunked
      Vary: Cookie
      X-Frame-Options: SAMEORIGIN

      Failed to parse JSON power_parameters


      I know I can send the raw JSON payload via REST, but I don't really want to implement a REST client in PowerShell for MaaS.



      What is the proper string formatting for adding power_parameters in the MaaS CLI?







      command-line juju maas






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      mxplusbmxplusb

      12317




      12317




















          1 Answer
          1






          active

          oldest

          votes


















          1














          So, I ripped apart the MaaS CLI code base, and I saw lots of references to power_parameters_<param> in the code base, which led me to believe it's looking for a specific key formatting.



          This is what ended up working for me:



          maas <user> machines create -d \
          architecture=amd64
          mac_addresses=<mac>
          domain=<domain>
          hostname=<name>
          power_type=vmware
          power_parameters_power_vm_name=<vm_name>
          power_parameters_power_uuid=<vm_uuid>
          power_parameters_power_address=<vcenter_host_name>
          power_parameters_power_user='<maas_user_in_quotes>'
          power_parameters_power_pass='<password_in_quotes>'
          power_parameters_power_port=443
          power_parameters_power_protocol=https+unverified


          I was then able to see the machine in the Controller UI.






          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128658%2fpower-parameters-for-vmware-in-maas-cli%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            So, I ripped apart the MaaS CLI code base, and I saw lots of references to power_parameters_<param> in the code base, which led me to believe it's looking for a specific key formatting.



            This is what ended up working for me:



            maas <user> machines create -d \
            architecture=amd64
            mac_addresses=<mac>
            domain=<domain>
            hostname=<name>
            power_type=vmware
            power_parameters_power_vm_name=<vm_name>
            power_parameters_power_uuid=<vm_uuid>
            power_parameters_power_address=<vcenter_host_name>
            power_parameters_power_user='<maas_user_in_quotes>'
            power_parameters_power_pass='<password_in_quotes>'
            power_parameters_power_port=443
            power_parameters_power_protocol=https+unverified


            I was then able to see the machine in the Controller UI.






            share|improve this answer



























              1














              So, I ripped apart the MaaS CLI code base, and I saw lots of references to power_parameters_<param> in the code base, which led me to believe it's looking for a specific key formatting.



              This is what ended up working for me:



              maas <user> machines create -d \
              architecture=amd64
              mac_addresses=<mac>
              domain=<domain>
              hostname=<name>
              power_type=vmware
              power_parameters_power_vm_name=<vm_name>
              power_parameters_power_uuid=<vm_uuid>
              power_parameters_power_address=<vcenter_host_name>
              power_parameters_power_user='<maas_user_in_quotes>'
              power_parameters_power_pass='<password_in_quotes>'
              power_parameters_power_port=443
              power_parameters_power_protocol=https+unverified


              I was then able to see the machine in the Controller UI.






              share|improve this answer

























                1












                1








                1







                So, I ripped apart the MaaS CLI code base, and I saw lots of references to power_parameters_<param> in the code base, which led me to believe it's looking for a specific key formatting.



                This is what ended up working for me:



                maas <user> machines create -d \
                architecture=amd64
                mac_addresses=<mac>
                domain=<domain>
                hostname=<name>
                power_type=vmware
                power_parameters_power_vm_name=<vm_name>
                power_parameters_power_uuid=<vm_uuid>
                power_parameters_power_address=<vcenter_host_name>
                power_parameters_power_user='<maas_user_in_quotes>'
                power_parameters_power_pass='<password_in_quotes>'
                power_parameters_power_port=443
                power_parameters_power_protocol=https+unverified


                I was then able to see the machine in the Controller UI.






                share|improve this answer













                So, I ripped apart the MaaS CLI code base, and I saw lots of references to power_parameters_<param> in the code base, which led me to believe it's looking for a specific key formatting.



                This is what ended up working for me:



                maas <user> machines create -d \
                architecture=amd64
                mac_addresses=<mac>
                domain=<domain>
                hostname=<name>
                power_type=vmware
                power_parameters_power_vm_name=<vm_name>
                power_parameters_power_uuid=<vm_uuid>
                power_parameters_power_address=<vcenter_host_name>
                power_parameters_power_user='<maas_user_in_quotes>'
                power_parameters_power_pass='<password_in_quotes>'
                power_parameters_power_port=443
                power_parameters_power_protocol=https+unverified


                I was then able to see the machine in the Controller UI.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                mxplusbmxplusb

                12317




                12317



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128658%2fpower-parameters-for-vmware-in-maas-cli%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

                    fallocate: fallocate failed: Text file busy in Ubuntu 17.04? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)defragmenting and increasing performance of old lubuntu system with swap partitionIssue with increasing the root partition from the swapthis /usr/bin/dpkg returned error || ubuntu-16.04, 64bitDefault 17.04 swap file locationHow to Resize Ubuntu 17.04 Zesty Swap file size?Ubuntu freezes from online formsMy Laptop is not starting after upgrade ubuntu 16.04 (Kernel 4.8.0-38 to 04.10.0-36)hcp: ERROR: FALLOCATE FAILED!Not sure my swap is being usedWine 3.0 asking for more virtual free swap

                    Where else does the Shulchan Aruch quote an authority by name?Parashat Metzora+HagadolPesach/PassoverShulchan Aruch UTF-8Anonymous glosses in the Shulchan AruchWhy is the Shulchan Aruch definitive?Siman 32, Kitzur Shulchan Aruch: UntranslatedLitvaks/Yeshivish and Shulchan AruchBuying a Shulchan AruchEnglish version of SHULCHAN ARUCHIs there any place where Shulchan Aruch rules with the Rosh against the Rif and Rambam?Are there practices where Sepharadim do not hold by Shulchan Aruch?5th part of the shulchan aruch