From: Tony Tkacik Date: Tue, 8 Apr 2014 09:39:35 +0000 (+0000) Subject: Merge "BUG-672 Make Xml directory adapter skip initial config files with invalid... X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~272 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=7aa1b58c1ee398a6c15baf832ecfe6ac313d1f66;hp=f0e885e5c9c39ffd530156460900f19fca477a39 Merge "BUG-672 Make Xml directory adapter skip initial config files with invalid xml." --- diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend index 8ebf28f35f..fa478ac72e 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend @@ -305,7 +305,7 @@ class RestconfImpl implements RestconfService { return callRpc(rpc, null) } - def resolveIdentifierInInvokeRpc(String identifier) { + private def resolveIdentifierInInvokeRpc(String identifier) { if (identifier.indexOf("/") === -1) { val identifierDecoded = identifier.urlPathArgDecode val rpc = identifierDecoded.rpcDefinition @@ -314,8 +314,8 @@ class RestconfImpl implements RestconfService { } throw new ResponseException(NOT_FOUND, "RPC does not exist."); } - val slashErrorMsg = String.format("Identifier %n%s%ncan't contain slash character (/). + - If slash is part of identifier name then use %2F placeholder.",identifier) + val slashErrorMsg = String.format( + "Identifier %n%s%ncan't contain slash character (/).%nIf slash is part of identifier name then use %%2F placeholder.", identifier) throw new ResponseException(NOT_FOUND, slashErrorMsg); } diff --git a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java index 6582d8c021..ae84a72bba 100644 --- a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java +++ b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java @@ -1,5 +1,5 @@ /* - * Copyright IBM Corporation, 2013. All rights reserved. + * Copyright IBM Corporation and others, 2013. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -64,6 +64,12 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable { @XmlElement (name="tenant_id") String tenantID; + @XmlElement (name="ipv6_address_mode", nillable=true) + String ipV6AddressMode; + + @XmlElement (name="ipv6_ra_mode", nillable=true) + String ipV6RaMode; + /* stores the OpenStackPorts associated with an instance * used to determine if that instance can be deleted. */ @@ -170,6 +176,14 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable { this.tenantID = tenantID; } + public String getIpV6AddressMode() { return ipV6AddressMode; } + + public void setIpV6AddressMode(String ipV6AddressMode) { this.ipV6AddressMode = ipV6AddressMode; } + + public String getIpV6RaMode() { return ipV6RaMode; } + + public void setIpV6RaMode(String ipV6RaMode) { this.ipV6RaMode = ipV6RaMode; } + /** * This method copies selected fields from the object and returns them * as a new object, suitable for marshaling. @@ -224,6 +238,12 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable { if (s.equals("tenant_id")) { ans.setTenantID(this.getTenantID()); } + if (s.equals("ipv6_address_mode")) { + ans.setIpV6AddressMode(this.getIpV6AddressMode()); + } + if (s.equals("ipv6_ra_mode")) { + ans.setIpV6RaMode(this.getIpV6RaMode()); + } } return ans; } @@ -444,6 +464,7 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable { + ", ipVersion=" + ipVersion + ", cidr=" + cidr + ", gatewayIP=" + gatewayIP + ", dnsNameservers=" + dnsNameservers + ", allocationPools=" + allocationPools + ", hostRoutes=" + hostRoutes + ", enableDHCP=" + enableDHCP + ", tenantID=" + tenantID + ", myPorts=" + myPorts - + ", gatewayIPAssigned=" + gatewayIPAssigned + "]"; + + ", gatewayIPAssigned=" + gatewayIPAssigned + ", ipv6AddressMode=" + ipV6AddressMode + + ", ipv6RaMode=" + ipV6RaMode + "]"; } } diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetsNorthbound.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetsNorthbound.java index 224fcb5f01..f397eb3a97 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetsNorthbound.java +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetsNorthbound.java @@ -1,5 +1,5 @@ /* - * Copyright IBM Corporation, 2013. All rights reserved. + * Copyright IBM Corporation and others, 2013. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -87,6 +87,8 @@ public class NeutronSubnetsNorthbound { @QueryParam("gateway_ip") String queryGatewayIP, @QueryParam("enable_dhcp") String queryEnableDHCP, @QueryParam("tenant_id") String queryTenantID, + @QueryParam("ipv6_address_mode") String queryIpV6AddressMode, + @QueryParam("ipv6_ra_mode") String queryIpV6RaMode, // pagination @QueryParam("limit") String limit, @QueryParam("marker") String marker, @@ -110,7 +112,9 @@ public class NeutronSubnetsNorthbound { (queryCIDR == null || queryCIDR.equals(oSS.getCidr())) && (queryGatewayIP == null || queryGatewayIP.equals(oSS.getGatewayIP())) && (queryEnableDHCP == null || queryEnableDHCP.equals(oSS.getEnableDHCP())) && - (queryTenantID == null || queryTenantID.equals(oSS.getTenantID()))) { + (queryTenantID == null || queryTenantID.equals(oSS.getTenantID())) && + (queryIpV6AddressMode == null || queryIpV6AddressMode.equals(oSS.getIpV6AddressMode())) && + (queryIpV6RaMode == null || queryIpV6RaMode.equals(oSS.getIpV6RaMode()))){ if (fields.size() > 0) { ans.add(extractFields(oSS,fields)); } else {