VMware Cloud Community
clavelstephane
Enthusiast
Enthusiast

Configuring Edge Gateway shaping/rate-limiting using vCD 8.20 API ?

Hello

I've been looking for a way to configure Edge Gateway shaping/rate-limiting using vCD 8.20 API but could not find a way to achieve this. Am I correct?

It looks possible using NSX API ("Working With a Specific Edge Services Gateway Interface"). We would prefer to use vCD API though.

thanks

Reply
0 Kudos
3 Replies
iHumster
Enthusiast
Enthusiast

Use <Link rel="edgeGateway:configureServices" href="https://vcloud.local/api/admin/edgeGateway/{ID}/action/configureServices" type="application/vnd.vmware.admin.edgeGatewayServiceConfiguration+xml"/> and add to config part of Gateway Interface rate limit settings:

<GatewayInterface>

...

    <ApplyRateLimit>true</ApplyRateLimit>

    <InRateLimit>100.0</InRateLimit>

    <OutRateLimit>100.0</OutRateLimit>

</GatewayInterface>

Reply
0 Kudos
clavelstephane
Enthusiast
Enthusiast

thanks for your answer.

I'm surprised Rate Limit settings can be entered this way as it is outside EdgeGatewayServiceConfiguration section. Anyway I tried and failed, I may have done something wrong. Did you already perform such config via the vCD API ?

I was also wondering where I could find all "actions" for an EG (like action/configureServices) ? Also failed to find this

<Configuration>

        <GatewayBackingConfig>compact</GatewayBackingConfig>

        <GatewayInterfaces>

            <GatewayInterface>

                <Name>Org_Net_HA</Name>

                <DisplayName>Org_Net_HA</DisplayName>

                <Network href="https://xxx/api/admin/network/21628467-189b-47a6-bff2-7119989d252d" name="Org_Net_HA" type="application/vnd.vmware.admin.network+xml"/>

                <InterfaceType>internal</InterfaceType>

                <SubnetParticipation>

                    <Gateway>10.1.0.254</Gateway>

                    <Netmask>255.255.255.0</Netmask>

                    <IpAddress>10.1.0.254</IpAddress>

                    <UseForDefaultRoute>false</UseForDefaultRoute>

                </SubnetParticipation>

                <ApplyRateLimit>false</ApplyRateLimit>

                <UseForDefaultRoute>false</UseForDefaultRoute>

            </GatewayInterface>

            <GatewayInterface>

                <Name>EXT_NET_INTERNET_SHARED_CLOUD2_111</Name>

                <DisplayName>EXT_NET_INTERNET_SHARED_CLOUD2_111</DisplayName>

                <Network href="https://xxx/api/admin/network/4370a580-32bb-4952-a74f-1f8194c2c93e" name="EXT_NET_INTERNET_SHARED_CLOUD2_111" type="application/vnd.vmware.admin.network+xml"/>

                <InterfaceType>uplink</InterfaceType>

                <SubnetParticipation>

                    <Gateway>xxx.4.1</Gateway>

                    <Netmask>255.255.254.0</Netmask>

                    <IpAddress>xxx.5.144</IpAddress>

                    <UseForDefaultRoute>true</UseForDefaultRoute>

                </SubnetParticipation>

                <ApplyRateLimit>true</ApplyRateLimit>

                <InRateLimit>1024.0</InRateLimit>

                <OutRateLimit>1024.0</OutRateLimit>

                <UseForDefaultRoute>true</UseForDefaultRoute>

            </GatewayInterface>

        </GatewayInterfaces>

        <EdgeGatewayServiceConfiguration>

            <FirewallService>

                <IsEnabled>true</IsEnabled>

                <DefaultAction>drop</DefaultAction>

                <LogDefaultAction>false</LogDefaultAction>

            </FirewallService>

        </EdgeGatewayServiceConfiguration>

        <HaEnabled>true</HaEnabled>

        <UseDefaultRouteForDnsRelay>false</UseDefaultRouteForDnsRelay>

        <SyslogServerSettings>

            <TenantSyslogServerSettings>

                <SyslogServerIp>172.25.1.210</SyslogServerIp>

            </TenantSyslogServerSettings>

        </SyslogServerSettings>

        <AdvancedNetworkingEnabled>false</AdvancedNetworkingEnabled>

    </Configuration>

Reply
0 Kudos
iHumster
Enthusiast
Enthusiast

Sorry that I misled you.

You need to use the method

PUT /admin/edgeGateway/{id}

https://code.vmware.com/apis/72/vcloud#/doc/doc/operations/PUT-EdgeGateway.html

Passing as the body xml the type GatewayType (you can get in response to GET /admin/edgeGateway/{id}) with the modified part

<GatewayInterface>

...

     <ApplyRateLimit>true</ApplyRateLimit>

     <InRateLimit>100.0</InRateLimit>

     <OutRateLimit>100.0</OutRateLimit>

</ GatewayInterface>

Well, do not forget the Content-Type: application/vnd.vmware.admin.edgeGateway+xml

Reply
0 Kudos