Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Problem with HTTP PUT Commands

$
0
0

I am having a problem sending a PUT to the vCloud Director API through the NetworkConfigSection of the vApp Configuration.  I keep receiving an "Unsupported Media Type" error.  Here is the XML data I'm attempting to send:

 

<?xml version="1.0" encoding="UTF-8"?>
<NetworkConfigSection xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://example.com/api/vApp/vapp-75299a58-6c60-4ad3-b361-0e42c590af90/networkConfigSection/" ovf:required="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsdhttp://www.vmware.com/vcloud/v1.5http://example.com/api/v1.5/schema/master.xsd">
    <ovf:Info>The configuration parameters for logical networks</ovf:Info>
    <Link rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://example.com/api/vApp/vapp-75299a58-6c60-4ad3-b361-0e42c590af90/networkConfigSection/"/>
    <NetworkConfig networkName="11.0.0.0">
        <Link rel="repair" href="https://example.com/api/admin/network/ac5cbecc-5f56-4424-9487-bae2f65498d2/action/reset"/>
        <Description/>
        <Configuration>
            <IpScopes>
                <IpScope>
                    <IsInherited>true</IsInherited>
                    <Gateway>11.0.0.1</Gateway>
                    <Netmask>255.255.0.0</Netmask>
                    <IsEnabled>true</IsEnabled>
                    <IpRanges>
                        <IpRange>
                            <StartAddress>11.0.0.4</StartAddress>
                            <EndAddress>11.0.0.254</EndAddress>
                        </IpRange>
                    </IpRanges>
                </IpScope>
            </IpScopes>
            <ParentNetwork name="11.0.0.0" id="c0f40c3c-545f-4fe6-8463-eb329589d73f" href="https://example.com/api/admin/network/c0f40c3c-545f-4fe6-8463-eb329589d73f"/>
            <FenceMode>bridged</FenceMode>
            <RetainNetInfoAcrossDeployments>false</RetainNetInfoAcrossDeployments>
        </Configuration>
        <IsDeployed>false</IsDeployed>
    </NetworkConfig>
    <NetworkConfig networkName="none">
        <Description>This is a special place-holder used for disconnected network interfaces.</Description>
        <Configuration>
            <IpScopes>
                <IpScope>
                    <IsInherited>false</IsInherited>
                    <Gateway>196.254.254.254</Gateway>
                    <Netmask>255.255.0.0</Netmask>
                    <Dns1>196.254.254.254</Dns1>
                </IpScope>
            </IpScopes>
            <FenceMode>isolated</FenceMode>
        </Configuration>
        <IsDeployed>false</IsDeployed>
    </NetworkConfig>
</NetworkConfigSection>

 

The content type is: application/vnd.vmware.vcloud.networkConfigSection+xml

 

The URL is: https://example.com/api/vApp/vapp-75299a58-6c60-4ad3-b361-0e42c590af90/networkConfigSection/

 

I am able to do POST commands just fine. Does anyone see anything wrong with this data?


Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>