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

Re: The description of the GatewayNatRuleType is not returned

$
0
0

Hi

 

Would it be possible not to remove the description field. It would be very usefull to identify NAT rules

it one have may rules on the edge gateway.

I am using the both the GatewayNatRuleType and NatRuleType classes and set the description in the NatRuleType

 

Where can I file a SR?

 

D.

 

private static String requestIp(NatServiceType natService, ReferenceType externalNetwork, String externalIp, ReferenceType internalNetwork, String internalIp){
        UUID uuid = UUID.randomUUID();
        GatewayNatRuleType rIn = OBJECT_FACTORY.createGatewayNatRuleType();
        rIn.setProtocol("any");
        rIn.setOriginalIp(externalIp);
        rIn.setOriginalPort("any");
        rIn.setTranslatedPort("any");
        rIn.setTranslatedIp(internalIp);
        rIn.setInterface(externalNetwork);
        NatRuleType ruleIn = OBJECT_FACTORY.createNatRuleType();
        ruleIn.setDescription(uuid.toString());
        ruleIn.setRuleType("DNAT");
        ruleIn.setIsEnabled(false);
        ruleIn.setGatewayNatRule(rIn);
        natService.getNatRule().add(ruleIn);
        return VMWARE_FAIL+externalIp;
        //return uuid; HACK BUG vmware fails to save the description field of the NAT rule
    }


void foo(){

     String compositeId = requestIp(nat, gInterface.getNetwork(), cAddress, internalNetRef, NOT_USED_INTERNAL_IP);
     GatewayFeaturesType edgeGatewayServiceConfiguration = gateway.getResource().getConfiguration().getEdgeGatewayServiceConfiguration();
     gateway.configureServices(edgeGatewayServiceConfiguration).waitForTask(TIMEOUT);

}


Viewing all articles
Browse latest Browse all 252940

Trending Articles



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