Change-Id: I2d13e9d53b0d73504c15d32a57207110d70afb3a
Signed-off-by: Pramila Singh <pramisin@cisco.com>
15 files changed:
if (timestamp == null || timestampName == null) {
Assert.assertFalse(properties.has("timeStamp"));
} else {
if (timestamp == null || timestampName == null) {
Assert.assertFalse(properties.has("timeStamp"));
} else {
- Assert.assertEquals(timestamp, (Integer) properties.getJSONObject("timeStamp").getInt("timestamp"));
- Assert.assertEquals(timestampName, properties.getJSONObject("timeStamp").getString("timestampName"));
+ Assert.assertEquals(timestamp, (Integer) properties.getJSONObject("timeStamp").getInt("value"));
+ Assert.assertEquals(timestampName, properties.getJSONObject("timeStamp").getString("name"));
}
if (actionsValue == null) {
Assert.assertFalse(properties.has("actions"));
} else {
}
if (actionsValue == null) {
Assert.assertFalse(properties.has("actions"));
} else {
- Assert.assertEquals(actionsValue, (Integer) properties.getJSONObject("actions").getInt("actionsValue"));
+ Assert.assertEquals(actionsValue, (Integer) properties.getJSONObject("actions").getInt("value"));
}
if (capabilitiesValue == null) {
Assert.assertFalse(properties.has("capabilities"));
} else {
Assert.assertEquals(capabilitiesValue,
}
if (capabilitiesValue == null) {
Assert.assertFalse(properties.has("capabilities"));
} else {
Assert.assertEquals(capabilitiesValue,
- (Integer) properties.getJSONObject("capabilities").getInt("capabilitiesValue"));
+ (Integer) properties.getJSONObject("capabilities").getInt("value"));
}
if (tablesValue == null) {
Assert.assertFalse(properties.has("tables"));
} else {
}
if (tablesValue == null) {
Assert.assertFalse(properties.has("tables"));
} else {
- Assert.assertEquals(tablesValue, (Integer) properties.getJSONObject("tables").getInt("tablesValue"));
+ Assert.assertEquals(tablesValue, (Integer) properties.getJSONObject("tables").getInt("value"));
}
if (buffersValue == null) {
Assert.assertFalse(properties.has("buffers"));
} else {
}
if (buffersValue == null) {
Assert.assertFalse(properties.has("buffers"));
} else {
- Assert.assertEquals(buffersValue, (Integer) properties.getJSONObject("buffers").getInt("buffersValue"));
+ Assert.assertEquals(buffersValue, (Integer) properties.getJSONObject("buffers").getInt("value"));
if (state == null) {
Assert.assertFalse(properties.has("state"));
} else {
if (state == null) {
Assert.assertFalse(properties.has("state"));
} else {
- Assert.assertEquals(state, (Integer) properties.getJSONObject("state").getInt("stateValue"));
+ Assert.assertEquals(state, (Integer) properties.getJSONObject("state").getInt("value"));
}
if (capabilities == null) {
Assert.assertFalse(properties.has("capabilities"));
} else {
Assert.assertEquals(capabilities,
}
if (capabilities == null) {
Assert.assertFalse(properties.has("capabilities"));
} else {
Assert.assertEquals(capabilities,
- (Integer) properties.getJSONObject("capabilities").getInt("capabilitiesValue"));
+ (Integer) properties.getJSONObject("capabilities").getInt("value"));
}
if (bandwidth == null) {
Assert.assertFalse(properties.has("bandwidth"));
} else {
}
if (bandwidth == null) {
Assert.assertFalse(properties.has("bandwidth"));
} else {
- Assert.assertEquals(bandwidth, (Integer) properties.getJSONObject("bandwidth").getInt("bandwidthValue"));
+ Assert.assertEquals(bandwidth, (Integer) properties.getJSONObject("bandwidth").getInt("value"));
json = new JSONObject(jt);
node = getJsonInstance(json, "nodeProperties", nodeId_1);
Assert.assertNotNull(node);
json = new JSONObject(jt);
node = getJsonInstance(json, "nodeProperties", nodeId_1);
Assert.assertNotNull(node);
- Assert.assertEquals(1001, node.getJSONObject("properties").getJSONObject("tier").getInt("tierValue"));
- Assert.assertEquals("node1", node.getJSONObject("properties").getJSONObject("description").getString("descriptionValue"));
+ Assert.assertEquals(1001, node.getJSONObject("properties").getJSONObject("tier").getInt("value"));
+ Assert.assertEquals("node1", node.getJSONObject("properties").getJSONObject("description").getString("value"));
// Test delete nodeConnector property
// Delete state property of nodeconnector1
// Test delete nodeConnector property
// Delete state property of nodeconnector1
Assert.assertEquals(tailNode.getString("@type"),nodeType);
Assert.assertEquals(tailNode.getString("@type"), nodeConnType);
Assert.assertEquals(tailNC.getLong("@id"), tailNC1_nodeConnId);
Assert.assertEquals(tailNode.getString("@type"),nodeType);
Assert.assertEquals(tailNode.getString("@type"), nodeConnType);
Assert.assertEquals(tailNC.getLong("@id"), tailNC1_nodeConnId);
- Assert.assertEquals(bandw.getLong("bandwidthValue"), bw_1);
- Assert.assertTrue((short) stt.getInt("stateValue") == state_1);
- Assert.assertEquals(ltc.getLong("latencyValue"), lat_1);
+ Assert.assertEquals(bandw.getLong("value"), bw_1);
+ Assert.assertTrue((short) stt.getInt("value") == state_1);
+ Assert.assertEquals(ltc.getLong("value"), lat_1);
} else if (headNC.getInt("@id") == headNC2_nodeConnId) {
Assert.assertEquals(headNode.getString("@type"),nodeType);
Assert.assertEquals(headNode.getLong("@id"), headNC2_nodeId);
} else if (headNC.getInt("@id") == headNC2_nodeConnId) {
Assert.assertEquals(headNode.getString("@type"),nodeType);
Assert.assertEquals(headNode.getLong("@id"), headNC2_nodeId);
Assert.assertTrue(tailNode.getInt("@id") == tailNC2_nodeId);
Assert.assertEquals(tailNC.getString("@type"), nodeConnType);
Assert.assertEquals(tailNC.getLong("@id"), tailNC2_nodeConnId);
Assert.assertTrue(tailNode.getInt("@id") == tailNC2_nodeId);
Assert.assertEquals(tailNC.getString("@type"), nodeConnType);
Assert.assertEquals(tailNC.getLong("@id"), tailNC2_nodeConnId);
- Assert.assertEquals(bandw.getLong("bandwidthValue"), bw_2);
- Assert.assertTrue((short) stt.getInt("stateValue") == state_2);
- Assert.assertEquals(ltc.getLong("latencyValue"), lat_2);
+ Assert.assertEquals(bandw.getLong("value"), bw_2);
+ Assert.assertTrue((short) stt.getInt("value") == state_2);
+ Assert.assertEquals(ltc.getLong("value"), lat_2);
@XmlRootElement
public class Actions extends Property {
private static final long serialVersionUID = 1L;
@XmlRootElement
public class Actions extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
private int actionsValue;
public enum ActionType {
private int actionsValue;
public enum ActionType {
public Actions clone() {
return new Actions(this.actionsValue);
}
public Actions clone() {
return new Actions(this.actionsValue);
}
public class Bandwidth extends Property {
private static final long serialVersionUID = 1L;
public class Bandwidth extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
protected long bandwidthValue;
public static final long BWUNK = 0;
protected long bandwidthValue;
public static final long BWUNK = 0;
public Bandwidth clone() {
return new Bandwidth(this.bandwidthValue);
}
public Bandwidth clone() {
return new Bandwidth(this.bandwidthValue);
}
@XmlRootElement
public class Buffers extends Property {
private static final long serialVersionUID = 1L;
@XmlRootElement
public class Buffers extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
private int buffersValue;
public static final String BuffersPropName = "buffers";
private int buffersValue;
public static final String BuffersPropName = "buffers";
public Buffers clone() {
return new Buffers(this.buffersValue);
}
public Buffers clone() {
return new Buffers(this.buffersValue);
}
@XmlRootElement
public class Capabilities extends Property {
private static final long serialVersionUID = 1L;
@XmlRootElement
public class Capabilities extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
private int capabilitiesValue;
public enum CapabilitiesType {
private int capabilitiesValue;
public enum CapabilitiesType {
this.capabilitiesValue = 0;
}
this.capabilitiesValue = 0;
}
public Capabilities clone() {
return new Capabilities(this.capabilitiesValue);
}
public Capabilities clone() {
return new Capabilities(this.capabilitiesValue);
}
@XmlRootElement
@SuppressWarnings("serial")
public class Config extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class Config extends Property {
+ @XmlElement(name="value")
private short configValue;
public static final short ADMIN_DOWN = 0;
private short configValue;
public static final short ADMIN_DOWN = 0;
this.configValue = config;
}
this.configValue = config;
}
public Config clone() {
return new Config(this.configValue);
}
public Config clone() {
return new Config(this.configValue);
}
@XmlRootElement
@SuppressWarnings("serial")
public class Description extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class Description extends Property {
+ @XmlElement(name="value")
private String descriptionValue;
public static final String propertyName = "description";
private String descriptionValue;
public static final String propertyName = "description";
this.descriptionValue = description;
}
this.descriptionValue = description;
}
public Description clone() {
return new Description(this.descriptionValue);
}
public Description clone() {
return new Description(this.descriptionValue);
}
@XmlRootElement
@SuppressWarnings("serial")
public class ForwardingMode extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class ForwardingMode extends Property {
+ @XmlElement(name="value")
private final int modeValue;
public static final int REACTIVE_FORWARDING = 0;
public static final int PROACTIVE_FORWARDING = 1;
private final int modeValue;
public static final int REACTIVE_FORWARDING = 0;
public static final int PROACTIVE_FORWARDING = 1;
public class Latency extends Property {
private static final long serialVersionUID = 1L;
public class Latency extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
private long latencyValue;
public static final long LATENCYUNK = 0;
private long latencyValue;
public static final long LATENCYUNK = 0;
this.latencyValue = (long) latency;
}
this.latencyValue = (long) latency;
}
public Latency clone() {
return new Latency(this.latencyValue);
}
public Latency clone() {
return new Latency(this.latencyValue);
}
@XmlAccessorType(XmlAccessType.NONE)
public class MacAddress extends Property implements Cloneable {
private static final long serialVersionUID = 1L;
@XmlAccessorType(XmlAccessType.NONE)
public class MacAddress extends Property implements Cloneable {
private static final long serialVersionUID = 1L;
- @XmlElement(name="macAddress")
+ @XmlElement(name="value")
private final String address;
public static final String name = "macAddress";
private final String address;
public static final String name = "macAddress";
@XmlRootElement
@SuppressWarnings("serial")
public class Name extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class Name extends Property {
+ @XmlElement(name="value")
private String nameValue;
public static final String NamePropName = "name";
private String nameValue;
public static final String NamePropName = "name";
public Name clone() {
return new Name(this.nameValue);
}
public Name clone() {
return new Name(this.nameValue);
}
@XmlRootElement
@SuppressWarnings("serial")
public class State extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class State extends Property {
+ @XmlElement(name="value")
private short stateValue;
public static final short EDGE_DOWN = 0;
private short stateValue;
public static final short EDGE_DOWN = 0;
this.stateValue = state;
}
this.stateValue = state;
}
public State clone() {
return new State(this.stateValue);
}
public State clone() {
return new State(this.stateValue);
}
@XmlRootElement
public class Tables extends Property {
private static final long serialVersionUID = 1L;
@XmlRootElement
public class Tables extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name="value")
private byte tablesValue;
public static final String TablesPropName = "tables";
private byte tablesValue;
public static final String TablesPropName = "tables";
public Tables clone() {
return new Tables(this.tablesValue);
}
public Tables clone() {
return new Tables(this.tablesValue);
}
@XmlRootElement
@SuppressWarnings("serial")
public class Tier extends Property {
@XmlRootElement
@SuppressWarnings("serial")
public class Tier extends Property {
+ @XmlElement(name="value")
private int tierValue;
public static final String TierPropName = "tier";
private int tierValue;
public static final String TierPropName = "tier";
public Tier clone() {
return new Tier(this.tierValue);
}
public Tier clone() {
return new Tier(this.tierValue);
}
@XmlRootElement
public class TimeStamp extends Property {
private static final long serialVersionUID = 1L;
@XmlRootElement
public class TimeStamp extends Property {
private static final long serialVersionUID = 1L;
+ @XmlElement(name = "value")
+ @XmlElement(name = "name")
private String timestampName;
public static final String TimeStampPropName = "timeStamp";
private String timestampName;
public static final String TimeStampPropName = "timeStamp";
this.timestampName = null;
}
this.timestampName = null;
}
public TimeStamp clone() {
return new TimeStamp(this.timestamp, this.timestampName);
}
public TimeStamp clone() {
return new TimeStamp(this.timestamp, this.timestampName);
}