Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void setStatus(String status) {
this.status = status;
}

/**
/**
* {@inheritDoc}
*/
@Override
Expand All @@ -191,7 +191,41 @@ public String toString() {
.addValue("\n")
.toString();
}


/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, routerId, tenantId, floatingNetworkId,
floatingIpAddress, fixedIpAddress, portId, status);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronFloatingIP) {
NeutronFloatingIP that = (NeutronFloatingIP) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(routerId, that.routerId) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(floatingNetworkId, that.floatingNetworkId) &&
java.util.Objects.equals(floatingIpAddress, that.floatingIpAddress) &&
java.util.Objects.equals(fixedIpAddress, that.fixedIpAddress) &&
java.util.Objects.equals(portId, that.portId) &&
java.util.Objects.equals(status, that.status)) {
return true;
}
}
return false;
}

/**
* The Class FloatingIPs.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* An OpenStack (Neutron) network
*
*
* @author Jeremy Unruh
*/
@JsonRootName("network")
Expand Down Expand Up @@ -108,7 +108,7 @@ public List<String> getSubnets() {
*/
@Override
public List<? extends Subnet> getNeutronSubnets() {
if ( neutronSubnets == null && (subnets != null && subnets.size() > 0))
if ( neutronSubnets == null && (subnets != null && subnets.size() > 0))
{
neutronSubnets = new ArrayList<NeutronSubnet>();
for ( String subnetId : subnets) {
Expand Down Expand Up @@ -213,6 +213,44 @@ public String toString() {
.toString();
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(name, status, subnets,
providerPhyNet, adminStateUp, tenantId, networkType,
routerExternal, id, shared, providerSegID);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronNetwork) {
NeutronNetwork that = (NeutronNetwork) obj;
if (java.util.Objects.equals(name, that.name) &&
java.util.Objects.equals(status, that.status) &&
java.util.Objects.equals(subnets, that.subnets) &&
java.util.Objects.equals(providerPhyNet, that.providerPhyNet) &&
java.util.Objects.equals(adminStateUp, that.adminStateUp) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(networkType, that.networkType) &&
java.util.Objects.equals(routerExternal, that.routerExternal) &&
java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(shared, that.shared) &&
java.util.Objects.equals(providerSegID, that.providerSegID)) {
return true;
}
}
return false;
}

public static class Networks extends ListResult<NeutronNetwork> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,33 @@ public String getEnd() {
public String toString() {
return Objects.toStringHelper(this).omitNullValues().add("start", start).add("end", end).toString();
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(start, end);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronPool) {
NeutronPool that = (NeutronPool) obj;
if (java.util.Objects.equals(start, that.start) &&
java.util.Objects.equals(end, that.end)) {
return true;
}
}
return false;
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,52 @@ public String toString() {
.add("binding:vnic_type", vNicType).add("binding:profile", profile)
.toString();
}


/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, name, adminStateUp, deviceId,
deviceOwner, fixedIps, macAddress, networkId, tenantId,
securityGroups, allowedAddressPairs, portSecurityEnabled, hostId,
vifType, vifDetails, vNicType, profile);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronPort) {
NeutronPort that = (NeutronPort) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(name, that.name) &&
java.util.Objects.equals(adminStateUp, that.adminStateUp) &&
java.util.Objects.equals(deviceId, that.deviceId) &&
java.util.Objects.equals(deviceOwner, that.deviceOwner) &&
java.util.Objects.equals(fixedIps, that.fixedIps) &&
java.util.Objects.equals(macAddress, that.macAddress) &&
java.util.Objects.equals(networkId, that.networkId) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(securityGroups, that.securityGroups) &&
java.util.Objects.equals(allowedAddressPairs, that.allowedAddressPairs) &&
java.util.Objects.equals(portSecurityEnabled, that.portSecurityEnabled) &&
java.util.Objects.equals(hostId, that.hostId) &&
java.util.Objects.equals(vifType, that.vifType) &&
java.util.Objects.equals(vifDetails, that.vifDetails) &&
java.util.Objects.equals(vNicType, that.vNicType) &&
java.util.Objects.equals(profile, that.profile)) {
return true;
}
}
return false;
}

public static class Ports extends ListResult<NeutronPort> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,39 @@ public String toString() {
.toString();
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, name, status, tenantId, adminStateUp,
externalGatewayInfo, routes);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronRouter) {
NeutronRouter that = (NeutronRouter) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(name, that.name) &&
java.util.Objects.equals(status, that.status) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(adminStateUp, that.adminStateUp) &&
java.util.Objects.equals(externalGatewayInfo, that.externalGatewayInfo) &&
java.util.Objects.equals(routes, that.routes)) {
return true;
}
}
return false;
}

public static class Routers extends ListResult<NeutronRouter> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,34 @@ public String toString() {
return Objects.toStringHelper(this).omitNullValues()
.add("id", id).add("subnetId", subnetId).add("portId", portId).add("tenantId", tenantId).toString();
}


/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, subnetId, portId, tenantId);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronRouterInterface) {
NeutronRouterInterface that = (NeutronRouterInterface) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(subnetId, that.subnetId) &&
java.util.Objects.equals(portId, that.portId) &&
java.util.Objects.equals(tenantId, that.tenantId)) {
return true;
}
}
return false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,37 @@ public String toString() {
.addValue("\n")
.toString();
}


/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, tenantId, name, description, rules);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronSecurityGroup) {
NeutronSecurityGroup that = (NeutronSecurityGroup) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(name, that.name) &&
java.util.Objects.equals(description, that.description) &&
java.util.Objects.equals(rules, that.rules)) {
return true;
}
}
return false;
}

/**
* The Class SecurityGroups.
*
Expand Down Expand Up @@ -170,7 +200,7 @@ public SecurityGroupConcreteBuilder() {
/**
* Instantiates a new security group rule concrete builder.
*
* @param rule the rule
* @param in the rule
*/
public SecurityGroupConcreteBuilder(SecurityGroup in) {
g = (NeutronSecurityGroup) in;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,42 @@ public String toString() {
.toString();
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return java.util.Objects.hash(id, tenantId, securityGroupId, direction, etherType,
portRangeMin, portRangeMax, protocol, remoteGroupId, remoteIpPrefix);
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (obj instanceof NeutronSecurityGroupRule) {
NeutronSecurityGroupRule that = (NeutronSecurityGroupRule) obj;
if (java.util.Objects.equals(id, that.id) &&
java.util.Objects.equals(tenantId, that.tenantId) &&
java.util.Objects.equals(securityGroupId, that.securityGroupId) &&
java.util.Objects.equals(direction, that.direction) &&
java.util.Objects.equals(etherType, that.etherType) &&
java.util.Objects.equals(portRangeMin, that.portRangeMin) &&
java.util.Objects.equals(portRangeMax, that.portRangeMax) &&
java.util.Objects.equals(protocol, that.protocol) &&
java.util.Objects.equals(remoteGroupId, that.remoteGroupId) &&
java.util.Objects.equals(remoteIpPrefix, that.remoteIpPrefix)) {
return true;
}
}
return false;
}

/**
* The Class SecurityGroupRules.
*
Expand Down
Loading