You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Yiping Zhang <yi...@adobe.com.INVALID> on 2019/05/28 02:56:39 UTC

Error running configureVirtualRouterElement api

Hi, List:



I am trying to run configureVirtualRouterelement API directly, but it throws an error.  Is this a known bug in 4.11.2.0?



I am using the cs python client to run api’s.  Following are the command outputs:







# cs listNetworkServiceProviders name=VirtualRouter physicalnetworkid=a493b1a4-333a-404a-af82-5c4bbdf6a467

{

  "count": 1,

  "networkserviceprovider": [

    {

      "canenableindividualservice": true,

      "id": "b69088bb-ec44-41fa-ab19-3d1a00c11b59",

      "name": "VirtualRouter",

      "physicalnetworkid": "a493b1a4-333a-404a-af82-5c4bbdf6a467",

      "servicelist": [

        "Vpn",

        "Dhcp",

        "Dns",

        "Gateway",

        "Firewall",

        "Lb",

        "SourceNat",

        "StaticNat",

        "PortForwarding",

        "UserData"

      ],

      "state": "Disabled"

    }

  ]

}

#

# cs configureVirtualRouterElement enabled=true id=b69088bb-ec44-41fa-ab19-3d1a00c11b59

CloudStack error: HTTP 431 response from CloudStack

{u'errorcode': 431, u'uuidList': [], u'cserrorcode': 9999, u'errortext': u'Unable to execute API command configurevirtualrouterelement due to invalid value. Invalid parameter id value=b69088bb-ec44-41fa-ab19-3d1a00c11b59 due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.'}

{

  "configurevirtualrouterelementresponse": {

    "cserrorcode": 9999,

    "errorcode": 431,

    "errortext": "Unable to execute API command configurevirtualrouterelement due to invalid value. Invalid parameter id value=b69088bb-ec44-41fa-ab19-3d1a00c11b59 due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.",

    "uuidList": []

  }

}
#

Any one has some clues what’s going on here?

Thanks

Yiping

Re: Error running configureVirtualRouterElement api

Posted by Andrija Panic <an...@gmail.com>.
Hi Yiping,

I believe you are specifying a wrong/unexisting ID.

And here comes into play a new nice and shiny CloudMonkey, 6.0.0, writen in
Go - with AUTOCOMPLETE - which will help you see actually what ID's you can
specify :)

It's always a good idea to verify API behaviour with CloudMonkey, since
it's been rock solid and battle-tested API client:

https://github.com/apache/cloudstack-cloudmonkey/releases

Here you can see a fancy demo - please test it, and later you can do
whatever is needed with cs python client.

Best,
Andrija



On Tue, 28 May 2019 at 04:56, Yiping Zhang <yi...@adobe.com.invalid>
wrote:

> Hi, List:
>
>
>
> I am trying to run configureVirtualRouterelement API directly, but it
> throws an error.  Is this a known bug in 4.11.2.0?
>
>
>
> I am using the cs python client to run api’s.  Following are the command
> outputs:
>
>
>
>
>
>
>
> # cs listNetworkServiceProviders name=VirtualRouter
> physicalnetworkid=a493b1a4-333a-404a-af82-5c4bbdf6a467
>
> {
>
>   "count": 1,
>
>   "networkserviceprovider": [
>
>     {
>
>       "canenableindividualservice": true,
>
>       "id": "b69088bb-ec44-41fa-ab19-3d1a00c11b59",
>
>       "name": "VirtualRouter",
>
>       "physicalnetworkid": "a493b1a4-333a-404a-af82-5c4bbdf6a467",
>
>       "servicelist": [
>
>         "Vpn",
>
>         "Dhcp",
>
>         "Dns",
>
>         "Gateway",
>
>         "Firewall",
>
>         "Lb",
>
>         "SourceNat",
>
>         "StaticNat",
>
>         "PortForwarding",
>
>         "UserData"
>
>       ],
>
>       "state": "Disabled"
>
>     }
>
>   ]
>
> }
>
> #
>
> # cs configureVirtualRouterElement enabled=true
> id=b69088bb-ec44-41fa-ab19-3d1a00c11b59
>
> CloudStack error: HTTP 431 response from CloudStack
>
> {u'errorcode': 431, u'uuidList': [], u'cserrorcode': 9999, u'errortext':
> u'Unable to execute API command configurevirtualrouterelement due to
> invalid value. Invalid parameter id
> value=b69088bb-ec44-41fa-ab19-3d1a00c11b59 due to incorrect long value
> format, or entity does not exist or due to incorrect parameter annotation
> for the field in api cmd class.'}
>
> {
>
>   "configurevirtualrouterelementresponse": {
>
>     "cserrorcode": 9999,
>
>     "errorcode": 431,
>
>     "errortext": "Unable to execute API command
> configurevirtualrouterelement due to invalid value. Invalid parameter id
> value=b69088bb-ec44-41fa-ab19-3d1a00c11b59 due to incorrect long value
> format, or entity does not exist or due to incorrect parameter annotation
> for the field in api cmd class.",
>
>     "uuidList": []
>
>   }
>
> }
> #
>
> Any one has some clues what’s going on here?
>
> Thanks
>
> Yiping
>


-- 

Andrija Panić