You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Corey, Mike" <mi...@sap.com.INVALID> on 2021/09/27 16:17:55 UTC

API Command Question for "networkids"

Hi,

Our self-service portal developers found that they cannot "port" code from the current landscape running on XenServer with the new VMWare landscape recently built.  There are some APIs that look to have changed and/or are specific to VMware hypervisors.

The two APIs in question are the "networkids" and "nicnetworklist" commands.  The command API "networkids" works from the self-service portal when deploying to XenServer; however that same line of code does NOT configure the correct network settings (assigns to wrong guest network) when deploying to a VMware hypervisor.

Digging into the logs we found that when deploying a VM from the ACS UI to VMware, the command "nicnetworklist" is now used when deploying to VMware hypervisor.

1 - Is there API command that is "hypervisor-agnostic" or can be used against both XenServer and VMware?
2 - The VMware API references a NIC ID of "8" ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS management server (or region, or zone) use a different ID?

  *   This could be a problem if our self-service services multiple regions/zones.
3 - Is there a global setting or other hidden setting that can be set so that ONE API Command works against both XenServer and VMware?

Many thanks!

Mike





Mike Corey

Technology Senior Consultant, IT CS CTW Operation & Virtualization Service US

SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United States

T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com



[cid:image003.png@01D7B399.B29A8C00]



RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Hi, I am running ACS 4.15.1.0.

I will download the template using the “Read VM settings from OVA” and test the deployment from our front-end portal.

Stay tuned!

MC

From: Daan Hoogland <da...@gmail.com>
Sent: Friday, October 15, 2021 4:02 AM
To: Corey, Mike <mi...@sap.com>
Cc: users@cloudstack.apache.org; Rohit Yadav <ro...@shapeblue.com>; dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike,
What version of ACS are your using?
the name in the UI would be :
•  "Read VM settings from OVA"
in the db it is called vm_template.deploy_as_is


On Thu, Oct 14, 2021 at 5:44 PM Corey, Mike <mi...@sap.com>> wrote:
Daan,Rohit,

I don't see the "deployAsIs" in the Register Template UI when downloading/registering an OVA template nor do I see it as an option listed in the template details of an already registered template.  Am I missing something here?

Many thanks!

Mike



-----Original Message-----
From: Daan Hoogland <da...@gmail.com>>
Sent: Thursday, October 14, 2021 2:55 AM
To: Corey, Mike <mi...@sap.com>>
Cc: users@cloudstack.apache.org<ma...@cloudstack.apache.org>; dev@cloudstack.apache.org<ma...@cloudstack.apache.org>
Subject: Re: API Command Question for "networkids"

I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com>> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com<ma...@gmail.com>; users@cloudstack.apache.org<ma...@cloudstack.apache.org>;
> dev@cloudstack.apache.org<ma...@cloudstack.apache.org>
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>>
> Cc: dev@cloudstack.apache.org<ma...@cloudstack.apache.org>
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>>
> > Cc: dev@cloudstack.apache.org<ma...@cloudstack.apache.org>
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org<ma...@cloudstack.apache.org>; users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<ma...@sap.com><mailto:
> > > mike.corey@sap.com<ma...@sap.com>>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


--
Daan


--
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike,
What version of ACS are your using?
the name in the UI would be :
- *"Read VM settings from OVA"*
in the db it is called vm_template.deploy_as_is


On Thu, Oct 14, 2021 at 5:44 PM Corey, Mike <mi...@sap.com> wrote:

> Daan,Rohit,
>
> I don't see the "deployAsIs" in the Register Template UI when
> downloading/registering an OVA template nor do I see it as an option listed
> in the template details of an already registered template.  Am I missing
> something here?
>
> Many thanks!
>
> Mike
>
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Thursday, October 14, 2021 2:55 AM
> To: Corey, Mike <mi...@sap.com>
> Cc: users@cloudstack.apache.org; dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> I just checked the API description and I have been a bit misleading. The
> deployAsIs parameter is issued during template registration, not at
> deploytime. Look at the code for RegisterTemplateCmd. it is not described
> in
> https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
> because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
> we don't allow for API changes for minor versions but in this case it was a
> needed bug-fix.
>
> On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:
>
> > Daan and others,
> >
> > Do you have an example of using the API "deployasis" parameter with
> VMware
> > deployment?
> >
> > Our developer colleague is having trouble finding a solution.
> >
> > Thanks!
> >
> > Mike
> >
> > -----Original Message-----
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, October 4, 2021 12:31 PM
> > To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> > dev@cloudstack.apache.org
> > Subject: [CAUTION] RE: API Command Question for "networkids"
> >
> > Daan,
> >
> > I see from the documentation that this is a new API for ACS 4.15.  Do you
> > have an example command line that I should inject this "deployasis" flag?
> >
> > Thanks!
> >
> > Mike
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 11:18 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike the old (your portal's) way should still work, on vmware you might
> > want to call it with `deployasis=false`
> >
> > On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > That is one thing that caused me to raise this question.  It isn't in
> the
> > > API documentation, but found in the ACS logs when a VM is created via
> > > CloudStack UI or API call from self-service portal.  Our developer is
> > > porting over the code that works from the Self-Service portal
> deploying a
> > > VM to XenServer hypervisor.  However, that same code does not configure
> > the
> > > network device correctly when deploying to VMware hypervisor.
> > >
> > > Example from ACS UI:
> > >
> > >
> > >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> > >
> > > Example from Self-Service API:
> > >
> > >
> > >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> > >
> > >
> > > -----Original Message-----
> > > From: Daan Hoogland <da...@gmail.com>
> > > Sent: Friday, October 1, 2021 9:15 AM
> > > To: users <us...@cloudstack.apache.org>
> > > Cc: dev@cloudstack.apache.org
> > > Subject: Re: API Command Question for "networkids"
> > >
> > > Mike, I don't recognise the commands you talk about, `networkids` and
> > > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> > some
> > > API that are not generic over hypervisors, but these should be well
> > > documented and really only very few.
> > >
> > > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> > >
> > > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mike.corey@sap.com.invalid
> >
> > > wrote:
> > >
> > > > Hello - sending again in hopes of getting some feedback on the API
> > > > question.
> > > >
> > > > Thanks!
> > > >
> > > > Mike
> > > >
> > > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > > Sent: Monday, September 27, 2021 12:18 PM
> > > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > > Subject: [CAUTION] API Command Question for "networkids"
> > > >
> > > > Hi,
> > > >
> > > > Our self-service portal developers found that they cannot "port" code
> > > from
> > > > the current landscape running on XenServer with the new VMWare
> > landscape
> > > > recently built.  There are some APIs that look to have changed and/or
> > are
> > > > specific to VMware hypervisors.
> > > >
> > > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > > commands.  The command API "networkids" works from the self-service
> > > portal
> > > > when deploying to XenServer; however that same line of code does NOT
> > > > configure the correct network settings (assigns to wrong guest
> network)
> > > > when deploying to a VMware hypervisor.
> > > >
> > > > Digging into the logs we found that when deploying a VM from the ACS
> UI
> > > to
> > > > VMware, the command "nicnetworklist" is now used when deploying to
> > VMware
> > > > hypervisor.
> > > >
> > > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > > against both XenServer and VMware?
> > > > 2 - The VMware API references a NIC ID of "8"
> > > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > > management server (or region, or zone) use a different ID?
> > > >
> > > >   *   This could be a problem if our self-service services multiple
> > > > regions/zones.
> > > > 3 - Is there a global setting or other hidden setting that can be set
> > so
> > > > that ONE API Command works against both XenServer and VMware?
> > > >
> > > > Many thanks!
> > > >
> > > > Mike
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Mike Corey
> > > >
> > > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > > Service
> > > > US
> > > >
> > > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073
> United
> > > > States
> > > >
> > > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > > mike.corey@sap.com>
> > > >
> > > >
> > > > [cid:image003.png@01D7B399.B29A8C00]
> > > >
> > > >
> > > >
> > >
> > > --
> > > Daan
> > >
> >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike,
What version of ACS are your using?
the name in the UI would be :
- *"Read VM settings from OVA"*
in the db it is called vm_template.deploy_as_is


On Thu, Oct 14, 2021 at 5:44 PM Corey, Mike <mi...@sap.com> wrote:

> Daan,Rohit,
>
> I don't see the "deployAsIs" in the Register Template UI when
> downloading/registering an OVA template nor do I see it as an option listed
> in the template details of an already registered template.  Am I missing
> something here?
>
> Many thanks!
>
> Mike
>
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Thursday, October 14, 2021 2:55 AM
> To: Corey, Mike <mi...@sap.com>
> Cc: users@cloudstack.apache.org; dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> I just checked the API description and I have been a bit misleading. The
> deployAsIs parameter is issued during template registration, not at
> deploytime. Look at the code for RegisterTemplateCmd. it is not described
> in
> https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
> because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
> we don't allow for API changes for minor versions but in this case it was a
> needed bug-fix.
>
> On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:
>
> > Daan and others,
> >
> > Do you have an example of using the API "deployasis" parameter with
> VMware
> > deployment?
> >
> > Our developer colleague is having trouble finding a solution.
> >
> > Thanks!
> >
> > Mike
> >
> > -----Original Message-----
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, October 4, 2021 12:31 PM
> > To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> > dev@cloudstack.apache.org
> > Subject: [CAUTION] RE: API Command Question for "networkids"
> >
> > Daan,
> >
> > I see from the documentation that this is a new API for ACS 4.15.  Do you
> > have an example command line that I should inject this "deployasis" flag?
> >
> > Thanks!
> >
> > Mike
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 11:18 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike the old (your portal's) way should still work, on vmware you might
> > want to call it with `deployasis=false`
> >
> > On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > That is one thing that caused me to raise this question.  It isn't in
> the
> > > API documentation, but found in the ACS logs when a VM is created via
> > > CloudStack UI or API call from self-service portal.  Our developer is
> > > porting over the code that works from the Self-Service portal
> deploying a
> > > VM to XenServer hypervisor.  However, that same code does not configure
> > the
> > > network device correctly when deploying to VMware hypervisor.
> > >
> > > Example from ACS UI:
> > >
> > >
> > >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> > >
> > > Example from Self-Service API:
> > >
> > >
> > >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> > >
> > >
> > > -----Original Message-----
> > > From: Daan Hoogland <da...@gmail.com>
> > > Sent: Friday, October 1, 2021 9:15 AM
> > > To: users <us...@cloudstack.apache.org>
> > > Cc: dev@cloudstack.apache.org
> > > Subject: Re: API Command Question for "networkids"
> > >
> > > Mike, I don't recognise the commands you talk about, `networkids` and
> > > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> > some
> > > API that are not generic over hypervisors, but these should be well
> > > documented and really only very few.
> > >
> > > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> > >
> > > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mike.corey@sap.com.invalid
> >
> > > wrote:
> > >
> > > > Hello - sending again in hopes of getting some feedback on the API
> > > > question.
> > > >
> > > > Thanks!
> > > >
> > > > Mike
> > > >
> > > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > > Sent: Monday, September 27, 2021 12:18 PM
> > > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > > Subject: [CAUTION] API Command Question for "networkids"
> > > >
> > > > Hi,
> > > >
> > > > Our self-service portal developers found that they cannot "port" code
> > > from
> > > > the current landscape running on XenServer with the new VMWare
> > landscape
> > > > recently built.  There are some APIs that look to have changed and/or
> > are
> > > > specific to VMware hypervisors.
> > > >
> > > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > > commands.  The command API "networkids" works from the self-service
> > > portal
> > > > when deploying to XenServer; however that same line of code does NOT
> > > > configure the correct network settings (assigns to wrong guest
> network)
> > > > when deploying to a VMware hypervisor.
> > > >
> > > > Digging into the logs we found that when deploying a VM from the ACS
> UI
> > > to
> > > > VMware, the command "nicnetworklist" is now used when deploying to
> > VMware
> > > > hypervisor.
> > > >
> > > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > > against both XenServer and VMware?
> > > > 2 - The VMware API references a NIC ID of "8"
> > > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > > management server (or region, or zone) use a different ID?
> > > >
> > > >   *   This could be a problem if our self-service services multiple
> > > > regions/zones.
> > > > 3 - Is there a global setting or other hidden setting that can be set
> > so
> > > > that ONE API Command works against both XenServer and VMware?
> > > >
> > > > Many thanks!
> > > >
> > > > Mike
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Mike Corey
> > > >
> > > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > > Service
> > > > US
> > > >
> > > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073
> United
> > > > States
> > > >
> > > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > > mike.corey@sap.com>
> > > >
> > > >
> > > > [cid:image003.png@01D7B399.B29A8C00]
> > > >
> > > >
> > > >
> > >
> > > --
> > > Daan
> > >
> >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan,Rohit,

I don't see the "deployAsIs" in the Register Template UI when downloading/registering an OVA template nor do I see it as an option listed in the template details of an already registered template.  Am I missing something here?

Many thanks!

Mike

  

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Thursday, October 14, 2021 2:55 AM
To: Corey, Mike <mi...@sap.com>
Cc: users@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Mike, all,

While we discuss and update the apidocs on the website that Daan has referred in previous reply. You can use cmk [1] to sync and get latest APIs discovered for your CloudStack env and use the "<api name> -h" to get latest docs. For example:

> deploy virtualmachine -h
deployVirtualMachine: Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.
This API is asynchronous.
Required params: serviceofferingid, templateid, zoneid,
API Params               Type     Description
==========               ====     ===========
account                  string   an optional account for the virtual machi
                                  ne. Must be used with domainId.
affinitygroupids         list     comma separated list of affinity groups i
                                  d that are going to be applied to the vi
                                  rtual machine. Mutually exclusive with a
                                  ffinitygroupnames parameter
affinitygroupnames       list     comma separated list of affinity groups n
                                  ames that are going to be applied to the
                                   virtual machine.Mutually exclusive with
                                   affinitygroupids parameter
bootintosetup            boolean  Boot into hardware setup or not (ignored
                                  if startVm = false, only valid for vmwar
                                  e)
bootmode                 string   Boot Mode [Legacy] or [Secure] Applicable
                                   when Boot Type Selected is UEFI, otherw
                                  ise Legacy only for BIOS. Not applicable
                                   with VMware, as we honour what is defin
                                  ed in the template.
boottype                 string   Guest VM Boot option either custom[UEFI]
                                  or default boot [BIOS]. Not applicable w
                                  ith VMware, as we honour what is defined
                                   in the template.
clusterid                uuid     destination Cluster ID to deploy the VM t
                                  o - parameter available for root admin o
                                  nly
copyimagetags            boolean  if true the image tags (if any) will be c
                                  opied to the VM, default value is false
customid                 string   an optional field, in case you want to se
                                  t a custom id to the resource. Allowed t
                                  o Root Admins only
datadiskofferinglist     map      datadisk template to disk-offering mappin
                                  g; an optional parameter used to create
                                  additional data disks from datadisk temp
                                  lates; can't be specified with diskOffer
                                  ingId parameter
deploymentplanner        string   Deployment planner to use for vm allocati
                                  on. Available to ROOT admin only
details                  map      used to specify the custom parameters. 'e
                                  xtraconfig' is not allowed to be passed
                                  in details
dhcpoptionsnetworklist   map      DHCP options which are passed to the VM o
                                  n start up Example: dhcpoptionsnetworkli
                                  st[0].dhcp:114=url&dhcpoptionsetworklist
                                  [0].networkid=networkid&dhcpoptionsetwor
                                  klist[0].dhcp:66=www.test.com
diskofferingid           uuid     the ID of the disk offering for the virtu
                                  al machine. If the template is of ISO fo
                                  rmat, the diskOfferingId is for the root
                                   disk volume. Otherwise this parameter i
                                  s used to indicate the offering for the
                                  data disk volume. If the templateId para
                                  meter passed is from a Template object,
                                  the diskOfferingId refers to a DATA Disk
                                   Volume created. If the templateId param
                                  eter passed is from an ISO object, the d
                                  iskOfferingId refers to a ROOT Disk Volu
                                  me created.
displayname              string   an optional user generated name for the v
                                  irtual machine
displayvm                boolean  an optional field, whether to the display
                                   the vm to the end user or not.
domainid                 uuid     an optional domainId for the virtual mach
                                  ine. If the account parameter is used, d
                                  omainId must also be used.
extraconfig              string   an optional URL encoded string that can b
                                  e passed to the virtual machine upon suc
                                  cessful deployment
group                    string   an optional group for the virtual machine

hostid                   uuid     destination Host ID to deploy the VM to -
                                   parameter available for root admin only

hypervisor               string   the hypervisor on which to deploy the vir
                                  tual machine. The parameter is required
                                  and respected only when hypervisor info
                                  is not set on the ISO/Template passed to
                                   the call
ip6address               string   the ipv6 address for default vm's network

ipaddress                string   the ip address for default vm's network
iptonetworklist          map      ip to network mapping. Can't be specified
                                   with networkIds parameter. Example: ipt
                                  onetworklist[0].ip=10.10.10.11&iptonetwo
                                  rklist[0].ipv6=fc00:1234:5678::abcd&ipto
                                  networklist[0].networkid=uuid&iptonetwor
                                  klist[0].mac=aa:bb:cc:dd:ee::ff - reques
                                  ts to use ip 10.10.10.11 in network id=u
                                  uid
keyboard                 string   an optional keyboard device type for the
                                  virtual machine. valid value can be one
                                  of de,de-ch,es,fi,fr,fr-be,fr-ch,is,it,j
                                  p,nl-be,no,pt,uk,us
keypair                  string   name of the ssh key pair used to login to
                                   the virtual machine
macaddress               string   the mac address for default vm's network
name                     string   host name for the virtual machine
networkids               list     list of network ids used by virtual machi
                                  ne. Can't be specified with ipToNetworkL
                                  ist parameter
nicnetworklist           map      VMware only: used to specify network mapp
                                  ing of a vApp VMware template registered
                                   "as-is". Example nicnetworklist[0].ip=N
                                  ic-101&nicnetworklist[0].network=uuid
podid                    uuid     destination Pod ID to deploy the VM to -
                                  parameter available for root admin only
projectid                uuid     Deploy vm for the project
properties               map      used to specify the vApp properties.
rootdisksize             long     Optional field to resize root disk on dep
                                  loy. Value is in GB. Only applies to tem
                                  plate-based deployments. Analogous to de
                                  tails[0].rootdisksize, which takes prece
                                  dence over this parameter if both are pr
                                  ovided
securitygroupids         list     comma separated list of security groups i
                                  d that going to be applied to the virtua
                                  l machine. Should be passed only when vm
                                   is created from a zone with Basic Netwo
                                  rk support. Mutually exclusive with secu
                                  ritygroupnames parameter
securitygroupnames       list     comma separated list of security groups n
                                  ames that going to be applied to the vir
                                  tual machine. Should be passed only when
                                   vm is created from a zone with Basic Ne
                                  twork support. Mutually exclusive with s
                                  ecuritygroupids parameter
serviceofferingid        uuid     the ID of the service offering for the vi
                                  rtual machine
size                     long     the arbitrary size for the DATADISK volum
                                  e. Mutually exclusive with diskOfferingI
                                  d
startvm                  boolean  true if start vm after creating; defaulte
                                  d to true if not specified
templateid               uuid     the ID of the template for the virtual ma
                                  chine
userdata                 string   an optional binary data that can be sent
                                  to the virtual machine upon a successful
                                   deployment. This binary data must be ba
                                  se64 encoded before adding it to the req
                                  uest. Using HTTP GET (via querystring),
                                  you can send up to 2KB of data after bas
                                  e64 encoding. Using HTTP POST(via POST b
                                  ody), you can send up to 32K of data aft
                                  er base64 encoding.
zoneid                   uuid     availability zone for the virtual machine

[1] https://github.com/apache/cloudstack-cloudmonkey


Regards.

________________________________
From: Daan Hoogland <da...@gmail.com>
Sent: Thursday, October 14, 2021 12:25
To: Corey, Mike <mi...@sap.com>
Cc: users@cloudstack.apache.org <us...@cloudstack.apache.org>; dev@cloudstack.apache.org <de...@cloudstack.apache.org>
Subject: Re: API Command Question for "networkids"

I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.


 

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


--
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan,Rohit,

I don't see the "deployAsIs" in the Register Template UI when downloading/registering an OVA template nor do I see it as an option listed in the template details of an already registered template.  Am I missing something here?

Many thanks!

Mike

  

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Thursday, October 14, 2021 2:55 AM
To: Corey, Mike <mi...@sap.com>
Cc: users@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Mike, all,

While we discuss and update the apidocs on the website that Daan has referred in previous reply. You can use cmk [1] to sync and get latest APIs discovered for your CloudStack env and use the "<api name> -h" to get latest docs. For example:

> deploy virtualmachine -h
deployVirtualMachine: Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.
This API is asynchronous.
Required params: serviceofferingid, templateid, zoneid,
API Params               Type     Description
==========               ====     ===========
account                  string   an optional account for the virtual machi
                                  ne. Must be used with domainId.
affinitygroupids         list     comma separated list of affinity groups i
                                  d that are going to be applied to the vi
                                  rtual machine. Mutually exclusive with a
                                  ffinitygroupnames parameter
affinitygroupnames       list     comma separated list of affinity groups n
                                  ames that are going to be applied to the
                                   virtual machine.Mutually exclusive with
                                   affinitygroupids parameter
bootintosetup            boolean  Boot into hardware setup or not (ignored
                                  if startVm = false, only valid for vmwar
                                  e)
bootmode                 string   Boot Mode [Legacy] or [Secure] Applicable
                                   when Boot Type Selected is UEFI, otherw
                                  ise Legacy only for BIOS. Not applicable
                                   with VMware, as we honour what is defin
                                  ed in the template.
boottype                 string   Guest VM Boot option either custom[UEFI]
                                  or default boot [BIOS]. Not applicable w
                                  ith VMware, as we honour what is defined
                                   in the template.
clusterid                uuid     destination Cluster ID to deploy the VM t
                                  o - parameter available for root admin o
                                  nly
copyimagetags            boolean  if true the image tags (if any) will be c
                                  opied to the VM, default value is false
customid                 string   an optional field, in case you want to se
                                  t a custom id to the resource. Allowed t
                                  o Root Admins only
datadiskofferinglist     map      datadisk template to disk-offering mappin
                                  g; an optional parameter used to create
                                  additional data disks from datadisk temp
                                  lates; can't be specified with diskOffer
                                  ingId parameter
deploymentplanner        string   Deployment planner to use for vm allocati
                                  on. Available to ROOT admin only
details                  map      used to specify the custom parameters. 'e
                                  xtraconfig' is not allowed to be passed
                                  in details
dhcpoptionsnetworklist   map      DHCP options which are passed to the VM o
                                  n start up Example: dhcpoptionsnetworkli
                                  st[0].dhcp:114=url&dhcpoptionsetworklist
                                  [0].networkid=networkid&dhcpoptionsetwor
                                  klist[0].dhcp:66=www.test.com
diskofferingid           uuid     the ID of the disk offering for the virtu
                                  al machine. If the template is of ISO fo
                                  rmat, the diskOfferingId is for the root
                                   disk volume. Otherwise this parameter i
                                  s used to indicate the offering for the
                                  data disk volume. If the templateId para
                                  meter passed is from a Template object,
                                  the diskOfferingId refers to a DATA Disk
                                   Volume created. If the templateId param
                                  eter passed is from an ISO object, the d
                                  iskOfferingId refers to a ROOT Disk Volu
                                  me created.
displayname              string   an optional user generated name for the v
                                  irtual machine
displayvm                boolean  an optional field, whether to the display
                                   the vm to the end user or not.
domainid                 uuid     an optional domainId for the virtual mach
                                  ine. If the account parameter is used, d
                                  omainId must also be used.
extraconfig              string   an optional URL encoded string that can b
                                  e passed to the virtual machine upon suc
                                  cessful deployment
group                    string   an optional group for the virtual machine

hostid                   uuid     destination Host ID to deploy the VM to -
                                   parameter available for root admin only

hypervisor               string   the hypervisor on which to deploy the vir
                                  tual machine. The parameter is required
                                  and respected only when hypervisor info
                                  is not set on the ISO/Template passed to
                                   the call
ip6address               string   the ipv6 address for default vm's network

ipaddress                string   the ip address for default vm's network
iptonetworklist          map      ip to network mapping. Can't be specified
                                   with networkIds parameter. Example: ipt
                                  onetworklist[0].ip=10.10.10.11&iptonetwo
                                  rklist[0].ipv6=fc00:1234:5678::abcd&ipto
                                  networklist[0].networkid=uuid&iptonetwor
                                  klist[0].mac=aa:bb:cc:dd:ee::ff - reques
                                  ts to use ip 10.10.10.11 in network id=u
                                  uid
keyboard                 string   an optional keyboard device type for the
                                  virtual machine. valid value can be one
                                  of de,de-ch,es,fi,fr,fr-be,fr-ch,is,it,j
                                  p,nl-be,no,pt,uk,us
keypair                  string   name of the ssh key pair used to login to
                                   the virtual machine
macaddress               string   the mac address for default vm's network
name                     string   host name for the virtual machine
networkids               list     list of network ids used by virtual machi
                                  ne. Can't be specified with ipToNetworkL
                                  ist parameter
nicnetworklist           map      VMware only: used to specify network mapp
                                  ing of a vApp VMware template registered
                                   "as-is". Example nicnetworklist[0].ip=N
                                  ic-101&nicnetworklist[0].network=uuid
podid                    uuid     destination Pod ID to deploy the VM to -
                                  parameter available for root admin only
projectid                uuid     Deploy vm for the project
properties               map      used to specify the vApp properties.
rootdisksize             long     Optional field to resize root disk on dep
                                  loy. Value is in GB. Only applies to tem
                                  plate-based deployments. Analogous to de
                                  tails[0].rootdisksize, which takes prece
                                  dence over this parameter if both are pr
                                  ovided
securitygroupids         list     comma separated list of security groups i
                                  d that going to be applied to the virtua
                                  l machine. Should be passed only when vm
                                   is created from a zone with Basic Netwo
                                  rk support. Mutually exclusive with secu
                                  ritygroupnames parameter
securitygroupnames       list     comma separated list of security groups n
                                  ames that going to be applied to the vir
                                  tual machine. Should be passed only when
                                   vm is created from a zone with Basic Ne
                                  twork support. Mutually exclusive with s
                                  ecuritygroupids parameter
serviceofferingid        uuid     the ID of the service offering for the vi
                                  rtual machine
size                     long     the arbitrary size for the DATADISK volum
                                  e. Mutually exclusive with diskOfferingI
                                  d
startvm                  boolean  true if start vm after creating; defaulte
                                  d to true if not specified
templateid               uuid     the ID of the template for the virtual ma
                                  chine
userdata                 string   an optional binary data that can be sent
                                  to the virtual machine upon a successful
                                   deployment. This binary data must be ba
                                  se64 encoded before adding it to the req
                                  uest. Using HTTP GET (via querystring),
                                  you can send up to 2KB of data after bas
                                  e64 encoding. Using HTTP POST(via POST b
                                  ody), you can send up to 32K of data aft
                                  er base64 encoding.
zoneid                   uuid     availability zone for the virtual machine

[1] https://github.com/apache/cloudstack-cloudmonkey


Regards.

________________________________
From: Daan Hoogland <da...@gmail.com>
Sent: Thursday, October 14, 2021 12:25
To: Corey, Mike <mi...@sap.com>
Cc: users@cloudstack.apache.org <us...@cloudstack.apache.org>; dev@cloudstack.apache.org <de...@cloudstack.apache.org>
Subject: Re: API Command Question for "networkids"

I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.


 

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


--
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
I just checked the API description and I have been a bit misleading. The
deployAsIs parameter is issued during template registration, not at
deploytime. Look at the code for RegisterTemplateCmd. it is not described
in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html
because it was introduced in 4.15.1 and the page describes 4.15.0. Normally
we don't allow for API changes for minor versions but in this case it was a
needed bug-fix.

On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mi...@sap.com> wrote:

> Daan and others,
>
> Do you have an example of using the API "deployasis" parameter with VMware
> deployment?
>
> Our developer colleague is having trouble finding a solution.
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, October 4, 2021 12:31 PM
> To: daan.hoogland@gmail.com; users@cloudstack.apache.org;
> dev@cloudstack.apache.org
> Subject: [CAUTION] RE: API Command Question for "networkids"
>
> Daan,
>
> I see from the documentation that this is a new API for ACS 4.15.  Do you
> have an example command line that I should inject this "deployasis" flag?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 11:18 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike the old (your portal's) way should still work, on vmware you might
> want to call it with `deployasis=false`
>
> On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > That is one thing that caused me to raise this question.  It isn't in the
> > API documentation, but found in the ACS logs when a VM is created via
> > CloudStack UI or API call from self-service portal.  Our developer is
> > porting over the code that works from the Self-Service portal deploying a
> > VM to XenServer hypervisor.  However, that same code does not configure
> the
> > network device correctly when deploying to VMware hypervisor.
> >
> > Example from ACS UI:
> >
> >
> >
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
> >
> > Example from Self-Service API:
> >
> >
> >
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
> >
> >
> > -----Original Message-----
> > From: Daan Hoogland <da...@gmail.com>
> > Sent: Friday, October 1, 2021 9:15 AM
> > To: users <us...@cloudstack.apache.org>
> > Cc: dev@cloudstack.apache.org
> > Subject: Re: API Command Question for "networkids"
> >
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan and others,

Do you have an example of using the API "deployasis" parameter with VMware deployment?

Our developer colleague is having trouble finding a solution.

Thanks!

Mike

-----Original Message-----
From: Corey, Mike <mi...@sap.com.INVALID> 
Sent: Monday, October 4, 2021 12:31 PM
To: daan.hoogland@gmail.com; users@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: [CAUTION] RE: API Command Question for "networkids"

Daan,

I see from the documentation that this is a new API for ACS 4.15.  Do you have an example command line that I should inject this "deployasis" flag?

Thanks!

Mike

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 11:18 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan and others,

Do you have an example of using the API "deployasis" parameter with VMware deployment?

Our developer colleague is having trouble finding a solution.

Thanks!

Mike

-----Original Message-----
From: Corey, Mike <mi...@sap.com.INVALID> 
Sent: Monday, October 4, 2021 12:31 PM
To: daan.hoogland@gmail.com; users@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: [CAUTION] RE: API Command Question for "networkids"

Daan,

I see from the documentation that this is a new API for ACS 4.15.  Do you have an example command line that I should inject this "deployasis" flag?

Thanks!

Mike

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 11:18 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan,

I see from the documentation that this is a new API for ACS 4.15.  Do you have an example command line that I should inject this "deployasis" flag?

Thanks!

Mike

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 11:18 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Daan,

I see from the documentation that this is a new API for ACS 4.15.  Do you have an example command line that I should inject this "deployasis" flag?

Thanks!

Mike

-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 11:18 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike the old (your portal's) way should still work, on vmware you might
want to call it with `deployasis=false`

On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> That is one thing that caused me to raise this question.  It isn't in the
> API documentation, but found in the ACS logs when a VM is created via
> CloudStack UI or API call from self-service portal.  Our developer is
> porting over the code that works from the Self-Service portal deploying a
> VM to XenServer hypervisor.  However, that same code does not configure the
> network device correctly when deploying to VMware hypervisor.
>
> Example from ACS UI:
>
>
> cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"
>
> Example from Self-Service API:
>
>
> "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"
>
>
> -----Original Message-----
> From: Daan Hoogland <da...@gmail.com>
> Sent: Friday, October 1, 2021 9:15 AM
> To: users <us...@cloudstack.apache.org>
> Cc: dev@cloudstack.apache.org
> Subject: Re: API Command Question for "networkids"
>
> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>


-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
That is one thing that caused me to raise this question.  It isn't in the API documentation, but found in the ACS logs when a VM is created via CloudStack UI or API call from self-service portal.  Our developer is porting over the code that works from the Self-Service portal deploying a VM to XenServer hypervisor.  However, that same code does not configure the network device correctly when deploying to VMware hypervisor. 

Example from ACS UI:

cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"

Example from Self-Service API:

"cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"


-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 9:15 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike, I don't recognise the commands you talk about, `networkids` and
`nicnetworklist`. Can you give links to APIs in [1], please? There are some
API that are not generic over hypervisors, but these should be well
documented and really only very few.

[1] https://cloudstack.apache.org/api/apidocs-4.15/

On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> Hello - sending again in hopes of getting some feedback on the API
> question.
>
> Thanks!
>
> Mike
>
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, September 27, 2021 12:18 PM
> To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> Subject: [CAUTION] API Command Question for "networkids"
>
> Hi,
>
> Our self-service portal developers found that they cannot "port" code from
> the current landscape running on XenServer with the new VMWare landscape
> recently built.  There are some APIs that look to have changed and/or are
> specific to VMware hypervisors.
>
> The two APIs in question are the "networkids" and "nicnetworklist"
> commands.  The command API "networkids" works from the self-service portal
> when deploying to XenServer; however that same line of code does NOT
> configure the correct network settings (assigns to wrong guest network)
> when deploying to a VMware hypervisor.
>
> Digging into the logs we found that when deploying a VM from the ACS UI to
> VMware, the command "nicnetworklist" is now used when deploying to VMware
> hypervisor.
>
> 1 - Is there API command that is "hypervisor-agnostic" or can be used
> against both XenServer and VMware?
> 2 - The VMware API references a NIC ID of "8"
> ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> management server (or region, or zone) use a different ID?
>
>   *   This could be a problem if our self-service services multiple
> regions/zones.
> 3 - Is there a global setting or other hidden setting that can be set so
> that ONE API Command works against both XenServer and VMware?
>
> Many thanks!
>
> Mike
>
>
>
>
>
> Mike Corey
>
> Technology Senior Consultant, IT CS CTW Operation & Virtualization Service
> US
>
> SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> States
>
> T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> mike.corey@sap.com>
>
>
> [cid:image003.png@01D7B399.B29A8C00]
>
>
>

-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
That is one thing that caused me to raise this question.  It isn't in the API documentation, but found in the ACS logs when a VM is created via CloudStack UI or API call from self-service portal.  Our developer is porting over the code that works from the Self-Service portal deploying a VM to XenServer hypervisor.  However, that same code does not configure the network device correctly when deploying to VMware hypervisor. 

Example from ACS UI:

cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest"

Example from Self-Service API:

"cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046"


-----Original Message-----
From: Daan Hoogland <da...@gmail.com> 
Sent: Friday, October 1, 2021 9:15 AM
To: users <us...@cloudstack.apache.org>
Cc: dev@cloudstack.apache.org
Subject: Re: API Command Question for "networkids"

Mike, I don't recognise the commands you talk about, `networkids` and
`nicnetworklist`. Can you give links to APIs in [1], please? There are some
API that are not generic over hypervisors, but these should be well
documented and really only very few.

[1] https://cloudstack.apache.org/api/apidocs-4.15/

On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> Hello - sending again in hopes of getting some feedback on the API
> question.
>
> Thanks!
>
> Mike
>
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, September 27, 2021 12:18 PM
> To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> Subject: [CAUTION] API Command Question for "networkids"
>
> Hi,
>
> Our self-service portal developers found that they cannot "port" code from
> the current landscape running on XenServer with the new VMWare landscape
> recently built.  There are some APIs that look to have changed and/or are
> specific to VMware hypervisors.
>
> The two APIs in question are the "networkids" and "nicnetworklist"
> commands.  The command API "networkids" works from the self-service portal
> when deploying to XenServer; however that same line of code does NOT
> configure the correct network settings (assigns to wrong guest network)
> when deploying to a VMware hypervisor.
>
> Digging into the logs we found that when deploying a VM from the ACS UI to
> VMware, the command "nicnetworklist" is now used when deploying to VMware
> hypervisor.
>
> 1 - Is there API command that is "hypervisor-agnostic" or can be used
> against both XenServer and VMware?
> 2 - The VMware API references a NIC ID of "8"
> ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> management server (or region, or zone) use a different ID?
>
>   *   This could be a problem if our self-service services multiple
> regions/zones.
> 3 - Is there a global setting or other hidden setting that can be set so
> that ONE API Command works against both XenServer and VMware?
>
> Many thanks!
>
> Mike
>
>
>
>
>
> Mike Corey
>
> Technology Senior Consultant, IT CS CTW Operation & Virtualization Service
> US
>
> SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> States
>
> T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> mike.corey@sap.com>
>
>
> [cid:image003.png@01D7B399.B29A8C00]
>
>
>

-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
If that is true Mike the answer is: deploy-as-is templates are not
supported on anything but vmware, so those parameters only make sense on
vmware.

On Fri, Oct 1, 2021 at 4:03 PM Wei ZHOU <us...@gmail.com> wrote:

> Hi Daan,
>
> I think what Mike meant is the api deployvirtualmachine
>
> https://cloudstack.apache.org/api/apidocs-4.15/apis/deployVirtualMachine.html
>
> it clearly states that api parameter `*nicnetworklist` *only works in
> vmware environments.
>
> *VMware only: used to specify network mapping of a vApp VMware template
> registered "as-is". Example
> nicnetworklist[0].ip=Nic-101&nicnetworklist[0].network=uuid*
>
> -Wei
>
>
> On Fri, 1 Oct 2021 at 15:14, Daan Hoogland <da...@gmail.com>
> wrote:
>
> > Mike, I don't recognise the commands you talk about, `networkids` and
> > `nicnetworklist`. Can you give links to APIs in [1], please? There are
> some
> > API that are not generic over hypervisors, but these should be well
> > documented and really only very few.
> >
> > [1] https://cloudstack.apache.org/api/apidocs-4.15/
> >
> > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> > wrote:
> >
> > > Hello - sending again in hopes of getting some feedback on the API
> > > question.
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > From: Corey, Mike <mi...@sap.com.INVALID>
> > > Sent: Monday, September 27, 2021 12:18 PM
> > > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > > Subject: [CAUTION] API Command Question for "networkids"
> > >
> > > Hi,
> > >
> > > Our self-service portal developers found that they cannot "port" code
> > from
> > > the current landscape running on XenServer with the new VMWare
> landscape
> > > recently built.  There are some APIs that look to have changed and/or
> are
> > > specific to VMware hypervisors.
> > >
> > > The two APIs in question are the "networkids" and "nicnetworklist"
> > > commands.  The command API "networkids" works from the self-service
> > portal
> > > when deploying to XenServer; however that same line of code does NOT
> > > configure the correct network settings (assigns to wrong guest network)
> > > when deploying to a VMware hypervisor.
> > >
> > > Digging into the logs we found that when deploying a VM from the ACS UI
> > to
> > > VMware, the command "nicnetworklist" is now used when deploying to
> VMware
> > > hypervisor.
> > >
> > > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > > against both XenServer and VMware?
> > > 2 - The VMware API references a NIC ID of "8"
> > > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > > management server (or region, or zone) use a different ID?
> > >
> > >   *   This could be a problem if our self-service services multiple
> > > regions/zones.
> > > 3 - Is there a global setting or other hidden setting that can be set
> so
> > > that ONE API Command works against both XenServer and VMware?
> > >
> > > Many thanks!
> > >
> > > Mike
> > >
> > >
> > >
> > >
> > >
> > > Mike Corey
> > >
> > > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> > Service
> > > US
> > >
> > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > > States
> > >
> > > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > > mike.corey@sap.com>
> > >
> > >
> > > [cid:image003.png@01D7B399.B29A8C00]
> > >
> > >
> > >
> >
> > --
> > Daan
> >
>


-- 
Daan

Re: API Command Question for "networkids"

Posted by Wei ZHOU <us...@gmail.com>.
Hi Daan,

I think what Mike meant is the api deployvirtualmachine
https://cloudstack.apache.org/api/apidocs-4.15/apis/deployVirtualMachine.html

it clearly states that api parameter `*nicnetworklist` *only works in
vmware environments.

*VMware only: used to specify network mapping of a vApp VMware template
registered "as-is". Example
nicnetworklist[0].ip=Nic-101&nicnetworklist[0].network=uuid*

-Wei


On Fri, 1 Oct 2021 at 15:14, Daan Hoogland <da...@gmail.com> wrote:

> Mike, I don't recognise the commands you talk about, `networkids` and
> `nicnetworklist`. Can you give links to APIs in [1], please? There are some
> API that are not generic over hypervisors, but these should be well
> documented and really only very few.
>
> [1] https://cloudstack.apache.org/api/apidocs-4.15/
>
> On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
> wrote:
>
> > Hello - sending again in hopes of getting some feedback on the API
> > question.
> >
> > Thanks!
> >
> > Mike
> >
> > From: Corey, Mike <mi...@sap.com.INVALID>
> > Sent: Monday, September 27, 2021 12:18 PM
> > To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> > Subject: [CAUTION] API Command Question for "networkids"
> >
> > Hi,
> >
> > Our self-service portal developers found that they cannot "port" code
> from
> > the current landscape running on XenServer with the new VMWare landscape
> > recently built.  There are some APIs that look to have changed and/or are
> > specific to VMware hypervisors.
> >
> > The two APIs in question are the "networkids" and "nicnetworklist"
> > commands.  The command API "networkids" works from the self-service
> portal
> > when deploying to XenServer; however that same line of code does NOT
> > configure the correct network settings (assigns to wrong guest network)
> > when deploying to a VMware hypervisor.
> >
> > Digging into the logs we found that when deploying a VM from the ACS UI
> to
> > VMware, the command "nicnetworklist" is now used when deploying to VMware
> > hypervisor.
> >
> > 1 - Is there API command that is "hypervisor-agnostic" or can be used
> > against both XenServer and VMware?
> > 2 - The VMware API references a NIC ID of "8"
> > ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> > management server (or region, or zone) use a different ID?
> >
> >   *   This could be a problem if our self-service services multiple
> > regions/zones.
> > 3 - Is there a global setting or other hidden setting that can be set so
> > that ONE API Command works against both XenServer and VMware?
> >
> > Many thanks!
> >
> > Mike
> >
> >
> >
> >
> >
> > Mike Corey
> >
> > Technology Senior Consultant, IT CS CTW Operation & Virtualization
> Service
> > US
> >
> > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> > States
> >
> > T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> > mike.corey@sap.com>
> >
> >
> > [cid:image003.png@01D7B399.B29A8C00]
> >
> >
> >
>
> --
> Daan
>

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike, I don't recognise the commands you talk about, `networkids` and
`nicnetworklist`. Can you give links to APIs in [1], please? There are some
API that are not generic over hypervisors, but these should be well
documented and really only very few.

[1] https://cloudstack.apache.org/api/apidocs-4.15/

On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> Hello - sending again in hopes of getting some feedback on the API
> question.
>
> Thanks!
>
> Mike
>
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, September 27, 2021 12:18 PM
> To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> Subject: [CAUTION] API Command Question for "networkids"
>
> Hi,
>
> Our self-service portal developers found that they cannot "port" code from
> the current landscape running on XenServer with the new VMWare landscape
> recently built.  There are some APIs that look to have changed and/or are
> specific to VMware hypervisors.
>
> The two APIs in question are the "networkids" and "nicnetworklist"
> commands.  The command API "networkids" works from the self-service portal
> when deploying to XenServer; however that same line of code does NOT
> configure the correct network settings (assigns to wrong guest network)
> when deploying to a VMware hypervisor.
>
> Digging into the logs we found that when deploying a VM from the ACS UI to
> VMware, the command "nicnetworklist" is now used when deploying to VMware
> hypervisor.
>
> 1 - Is there API command that is "hypervisor-agnostic" or can be used
> against both XenServer and VMware?
> 2 - The VMware API references a NIC ID of "8"
> ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> management server (or region, or zone) use a different ID?
>
>   *   This could be a problem if our self-service services multiple
> regions/zones.
> 3 - Is there a global setting or other hidden setting that can be set so
> that ONE API Command works against both XenServer and VMware?
>
> Many thanks!
>
> Mike
>
>
>
>
>
> Mike Corey
>
> Technology Senior Consultant, IT CS CTW Operation & Virtualization Service
> US
>
> SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> States
>
> T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> mike.corey@sap.com>
>
>
> [cid:image003.png@01D7B399.B29A8C00]
>
>
>

-- 
Daan

Re: API Command Question for "networkids"

Posted by Daan Hoogland <da...@gmail.com>.
Mike, I don't recognise the commands you talk about, `networkids` and
`nicnetworklist`. Can you give links to APIs in [1], please? There are some
API that are not generic over hypervisors, but these should be well
documented and really only very few.

[1] https://cloudstack.apache.org/api/apidocs-4.15/

On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mi...@sap.com.invalid>
wrote:

> Hello - sending again in hopes of getting some feedback on the API
> question.
>
> Thanks!
>
> Mike
>
> From: Corey, Mike <mi...@sap.com.INVALID>
> Sent: Monday, September 27, 2021 12:18 PM
> To: dev@cloudstack.apache.org; users@cloudstack.apache.org
> Subject: [CAUTION] API Command Question for "networkids"
>
> Hi,
>
> Our self-service portal developers found that they cannot "port" code from
> the current landscape running on XenServer with the new VMWare landscape
> recently built.  There are some APIs that look to have changed and/or are
> specific to VMware hypervisors.
>
> The two APIs in question are the "networkids" and "nicnetworklist"
> commands.  The command API "networkids" works from the self-service portal
> when deploying to XenServer; however that same line of code does NOT
> configure the correct network settings (assigns to wrong guest network)
> when deploying to a VMware hypervisor.
>
> Digging into the logs we found that when deploying a VM from the ACS UI to
> VMware, the command "nicnetworklist" is now used when deploying to VMware
> hypervisor.
>
> 1 - Is there API command that is "hypervisor-agnostic" or can be used
> against both XenServer and VMware?
> 2 - The VMware API references a NIC ID of "8"
> ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS
> management server (or region, or zone) use a different ID?
>
>   *   This could be a problem if our self-service services multiple
> regions/zones.
> 3 - Is there a global setting or other hidden setting that can be set so
> that ONE API Command works against both XenServer and VMware?
>
> Many thanks!
>
> Mike
>
>
>
>
>
> Mike Corey
>
> Technology Senior Consultant, IT CS CTW Operation & Virtualization Service
> US
>
> SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United
> States
>
> T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<mailto:
> mike.corey@sap.com>
>
>
> [cid:image003.png@01D7B399.B29A8C00]
>
>
>

-- 
Daan

RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Hello - sending again in hopes of getting some feedback on the API question.

Thanks!

Mike

From: Corey, Mike <mi...@sap.com.INVALID>
Sent: Monday, September 27, 2021 12:18 PM
To: dev@cloudstack.apache.org; users@cloudstack.apache.org
Subject: [CAUTION] API Command Question for "networkids"

Hi,

Our self-service portal developers found that they cannot "port" code from the current landscape running on XenServer with the new VMWare landscape recently built.  There are some APIs that look to have changed and/or are specific to VMware hypervisors.

The two APIs in question are the "networkids" and "nicnetworklist" commands.  The command API "networkids" works from the self-service portal when deploying to XenServer; however that same line of code does NOT configure the correct network settings (assigns to wrong guest network) when deploying to a VMware hypervisor.

Digging into the logs we found that when deploying a VM from the ACS UI to VMware, the command "nicnetworklist" is now used when deploying to VMware hypervisor.

1 - Is there API command that is "hypervisor-agnostic" or can be used against both XenServer and VMware?
2 - The VMware API references a NIC ID of "8" ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS management server (or region, or zone) use a different ID?

  *   This could be a problem if our self-service services multiple regions/zones.
3 - Is there a global setting or other hidden setting that can be set so that ONE API Command works against both XenServer and VMware?

Many thanks!

Mike





Mike Corey

Technology Senior Consultant, IT CS CTW Operation & Virtualization Service US

SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United States

T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<ma...@sap.com>


[cid:image003.png@01D7B399.B29A8C00]



RE: API Command Question for "networkids"

Posted by "Corey, Mike" <mi...@sap.com.INVALID>.
Hello - sending again in hopes of getting some feedback on the API question.

Thanks!

Mike

From: Corey, Mike <mi...@sap.com.INVALID>
Sent: Monday, September 27, 2021 12:18 PM
To: dev@cloudstack.apache.org; users@cloudstack.apache.org
Subject: [CAUTION] API Command Question for "networkids"

Hi,

Our self-service portal developers found that they cannot "port" code from the current landscape running on XenServer with the new VMWare landscape recently built.  There are some APIs that look to have changed and/or are specific to VMware hypervisors.

The two APIs in question are the "networkids" and "nicnetworklist" commands.  The command API "networkids" works from the self-service portal when deploying to XenServer; however that same line of code does NOT configure the correct network settings (assigns to wrong guest network) when deploying to a VMware hypervisor.

Digging into the logs we found that when deploying a VM from the ACS UI to VMware, the command "nicnetworklist" is now used when deploying to VMware hypervisor.

1 - Is there API command that is "hypervisor-agnostic" or can be used against both XenServer and VMware?
2 - The VMware API references a NIC ID of "8" ("nicnetworklist[0].nic":"8",).  Is this arbitrary or will each ACS management server (or region, or zone) use a different ID?

  *   This could be a problem if our self-service services multiple regions/zones.
3 - Is there a global setting or other hidden setting that can be set so that ONE API Command works against both XenServer and VMware?

Many thanks!

Mike





Mike Corey

Technology Senior Consultant, IT CS CTW Operation & Virtualization Service US

SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United States

T +1 610 661 0905, M +1 484 274 2658, E mike.corey@sap.com<ma...@sap.com>


[cid:image003.png@01D7B399.B29A8C00]