Fixed XML to create static route in VNMC correctly

This commit is contained in:
Koushik Das 2013-03-08 22:20:23 +05:30
parent ef069b3323
commit 9c94b6d231
2 changed files with 4 additions and 6 deletions

View File

@ -2,7 +2,7 @@
cookie="%cookie%"
inHierarchical="false">
<inConfigs>
<pair key="%routedn%">
<pair key="%routepolicydn%/sroute-2">
<routeStaticRoute
dn="%routepolicydn%/sroute-2"
id="2"

View File

@ -328,16 +328,14 @@ public class CiscoVnmcConnectionImpl implements CiscoVnmcConnection {
String xml = VnmcXml.CREATE_EDGE_ROUTE.getXml();
String service = VnmcXml.CREATE_EDGE_ROUTE.getService();
xml = replaceXmlValue(xml, "cookie", _cookie);
xml = replaceXmlValue(xml, "name", getNameForEdgeDeviceRoutePolicy(tenantName));
xml = replaceXmlValue(xml, "routepolicydn", getDnForEdgeDeviceRoutingPolicy(tenantName));
xml = replaceXmlValue(xml, "nexthop", nextHopIp);
xml = replaceXmlValue(xml, "nexthopintf", getNameForEdgeOutsideIntf(tenantName));
xml = replaceXmlValue(xml, "destination", destination);
xml = replaceXmlValue(xml, "netmask", netmask);
//TODO: this adds default route, make it more generic
String response = sendRequest(service, xml);
return verifySuccess(response);
String response = sendRequest(service, xml);
return verifySuccess(response);
}
@Override