<?xml version="1.0" encoding="UTF-8"?>
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>northbound-api</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.enunciate</groupId>
- <artifactId>enunciate-core-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>org.eclipse.persistence.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>org.eclipse.persistence.antlr</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
- </dependencies>
-
+ </dependencies>
</project>
JsonElement jsonElementValue = entrySet.iterator().next().getValue();
String key = entrySet.iterator().next().getKey();
Assert.assertEquals(context, collectionName, key);
- Assert.assertTrue("E2E Tests Failed - Collection not Array: " + jsonElementValue,
- jsonElementValue.isJsonArray());
+ Assert.assertTrue("E2E Tests Failed - Collection not Array: " + jsonElementValue + "; URL: " + urlStr
+ + "; full response: " + response, jsonElementValue.isJsonArray());
JsonArray jsonArray = jsonElementValue.getAsJsonArray();
Assert.assertNotEquals(context, jsonArray.size(), 0);
}
<artifactId>org.eclipse.persistence.moxy</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
</dependencies>
<build>
<plugins>
package org.opendaylight.neutron.spi;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
@Override
- @JsonIgnore
+ @XmlTransient
public void setTenantID(Uuid tenantID) {
this.tenantID = tenantID.getValue().replace("-", "");
}
@XmlElement(namespace = "binding", name = "vif_type")
String bindingvifType;
+ //@XmlElement (name = "binding:profile")
+ @XmlElement(namespace = "binding", name = "profile")
+ String bindingProfile;
+
//@XmlElement (name = "binding:vif_details")
@XmlElement(namespace = "binding", name = "vif_details")
@XmlJavaTypeAdapter(NeutronResourceMapPropertyAdapter.class)
this.bindinghostID = bindinghostID;
}
+ public String getProfile() {
+ return bindingProfile;
+ }
+
+ public void setProfile(String newBindingProfile) {
+ this.bindingProfile = newBindingProfile;
+ }
+
public String getBindingvnicType() {
return bindingvnicType;
}
case "binding:vif_type":
ans.setBindingvifType(this.getBindingvifType());
break;
+ case "binding:profile":
+ ans.setProfile(this.getProfile());
+ break;
case "binding:vif_details":
ans.setVIFDetails(new HashMap<>(this.getVIFDetails()));
break;
+ ", deviceID=" + deviceID + ", deviceOwner=" + deviceOwner + ", tenantID=" + tenantID
+ ", securityGroups=" + securityGroups + ", allowedAddressPairs" + allowedAddressPairs
+ ", bindinghostID=" + bindinghostID + ", bindingvnicType=" + bindingvnicType + ", bindingvifType="
- + bindingvifType + ", vifDetails=" + vifDetails + ", extraDHCPOptions=" + extraDHCPOptions
+ + bindingvifType + ", vifDetails=" + vifDetails + ", bindingProfile=" + bindingProfile
+ + ", extraDHCPOptions=" + extraDHCPOptions
+ ", portSecurityEnabled=" + portSecurityEnabled + ", qosPolicyId=" + qosPolicyId + "]";
}
}
+ "\"extra_dhcp_opts\": [\"\"], " + "\"security_groups\": [\"\"], " + "\"allowed_address_pairs\": [\"\"], "
+ "\"device_id\": \"257614cc-e178-4c92-9c61-3b28d40eca44\", " + "\"device_owner\": \"\", "
+ "\"binding:host_id\": \"\", " + "\"binding:vif_type\": \"unbound\", "
- + "\"binding:vnic_type\": \"normal\", " + "\"mac_address\": \"fa:16:3e:c9:cb:f0\", "
- + "\"network_id\": \"e9330b1f-a2ef-4160-a991-169e56ab17f5\", "
+ + "\"binding:vnic_type\": \"normal\", " + "\"binding:profile\": \"{\'capabilities\': [\'switchdev\']}\", "
+ + "\"mac_address\": \"fa:16:3e:c9:cb:f0\", " + "\"network_id\": \"e9330b1f-a2ef-4160-a991-169e56ab17f5\", "
+ "\"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" }";
@Test
Assert.assertEquals("NeutronPort JAXB Test 16: Testing device_owner failed", "",
neutronObject.getDeviceOwner());
- Assert.assertEquals("NeutronPort JAXB Test 17: Testing binding:host_id failed", "",
- neutronObject.getBindinghostID());
+ Assert.assertEquals("NeutronPort JAXB Test 17: Testing binding:profile failed",
+ "{\'capabilities\': [\'switchdev\']}", neutronObject.getProfile());
}
}
}
result.setVIFDetails(details);
}
+ result.setProfile(binding.getProfile());
result.setBindingvifType(binding.getVifType());
result.setBindingvnicType(binding.getVnicType());
}
if (neutronPort.getBindingvnicType() != null) {
bindingBuilder.setVnicType(neutronPort.getBindingvnicType());
}
+ if (neutronPort.getProfile() != null) {
+ bindingBuilder.setProfile(neutronPort.getProfile());
+ }
final PortSecurityExtensionBuilder portSecurityBuilder = new PortSecurityExtensionBuilder();
if (neutronPort.getPortSecurityEnabled() != null) {