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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-08 20:00:43.803169",
"spec_repo_commit": "3e2afa30"
"regenerated": "2025-04-08 20:55:38.627224",
"spec_repo_commit": "21cf6edb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-08 20:00:43.818345",
"spec_repo_commit": "3e2afa30"
"regenerated": "2025-04-08 20:55:38.642824",
"spec_repo_commit": "21cf6edb"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17271,6 +17271,14 @@ components:
example: 0
format: int64
type: integer
ip_addresses:
description: The interface IP addresses
example:
- 1.1.1.1
- 1.1.1.2
items:
type: string
type: array
mac_address:
description: The interface MAC address
example: 00:00:00:00:00:00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

Expand All @@ -21,6 +23,7 @@
InterfaceAttributes.JSON_PROPERTY_ALIAS,
InterfaceAttributes.JSON_PROPERTY_DESCRIPTION,
InterfaceAttributes.JSON_PROPERTY_INDEX,
InterfaceAttributes.JSON_PROPERTY_IP_ADDRESSES,
InterfaceAttributes.JSON_PROPERTY_MAC_ADDRESS,
InterfaceAttributes.JSON_PROPERTY_NAME,
InterfaceAttributes.JSON_PROPERTY_STATUS
Expand All @@ -38,6 +41,9 @@ public class InterfaceAttributes {
public static final String JSON_PROPERTY_INDEX = "index";
private Long index;

public static final String JSON_PROPERTY_IP_ADDRESSES = "ip_addresses";
private List<String> ipAddresses = null;

public static final String JSON_PROPERTY_MAC_ADDRESS = "mac_address";
private String macAddress;

Expand Down Expand Up @@ -110,6 +116,35 @@ public void setIndex(Long index) {
this.index = index;
}

public InterfaceAttributes ipAddresses(List<String> ipAddresses) {
this.ipAddresses = ipAddresses;
return this;
}

public InterfaceAttributes addIpAddressesItem(String ipAddressesItem) {
if (this.ipAddresses == null) {
this.ipAddresses = new ArrayList<>();
}
this.ipAddresses.add(ipAddressesItem);
return this;
}

/**
* The interface IP addresses
*
* @return ipAddresses
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IP_ADDRESSES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getIpAddresses() {
return ipAddresses;
}

public void setIpAddresses(List<String> ipAddresses) {
this.ipAddresses = ipAddresses;
}

public InterfaceAttributes macAddress(String macAddress) {
this.macAddress = macAddress;
return this;
Expand Down Expand Up @@ -236,6 +271,7 @@ public boolean equals(Object o) {
return Objects.equals(this.alias, interfaceAttributes.alias)
&& Objects.equals(this.description, interfaceAttributes.description)
&& Objects.equals(this.index, interfaceAttributes.index)
&& Objects.equals(this.ipAddresses, interfaceAttributes.ipAddresses)
&& Objects.equals(this.macAddress, interfaceAttributes.macAddress)
&& Objects.equals(this.name, interfaceAttributes.name)
&& Objects.equals(this.status, interfaceAttributes.status)
Expand All @@ -244,7 +280,8 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(alias, description, index, macAddress, name, status, additionalProperties);
return Objects.hash(
alias, description, index, ipAddresses, macAddress, name, status, additionalProperties);
}

@Override
Expand All @@ -254,6 +291,7 @@ public String toString() {
sb.append(" alias: ").append(toIndentedString(alias)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" index: ").append(toIndentedString(index)).append("\n");
sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n");
sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":[{\"id\":\"default:1.2.3.4:99\",\"type\":\"interface\",\"attributes\":{\"name\":\"if99\",\"status\":\"up\",\"description\":\"a network interface\",\"mac_address\":\"00:00:00:00:00:00\",\"alias\":\"interface_99\",\"index\":99}},{\"id\":\"default:1.2.3.4:999\",\"type\":\"interface\",\"attributes\":{\"name\":\"if999\",\"status\":\"down\",\"description\":\"another network interface\",\"mac_address\":\"99:99:99:99:99:99\",\"alias\":\"interface_999\",\"index\":999}}]}",
"body": "{\"data\":[{\"id\":\"default:1.2.3.4:99\",\"type\":\"interface\",\"attributes\":{\"name\":\"if99\",\"status\":\"up\",\"description\":\"a network interface\",\"mac_address\":\"00:00:00:00:00:00\",\"ip_addresses\":[\"1.1.1.1\",\"1.1.1.2\"],\"alias\":\"interface_99\",\"index\":99}},{\"id\":\"default:1.2.3.4:999\",\"type\":\"interface\",\"attributes\":{\"name\":\"if999\",\"status\":\"down\",\"description\":\"another network interface\",\"mac_address\":\"99:99:99:99:99:99\",\"alias\":\"interface_999\",\"index\":999}}]}",
"headers": {
"Content-Type": [
"application/vnd.api+json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Feature: Network Device Monitoring
And the response "data[0].attributes.name" is equal to "if99"
And the response "data[0].attributes.description" is equal to "a network interface"
And the response "data[0].attributes.mac_address" is equal to "00:00:00:00:00:00"
And the response "data[0].attributes.ip_addresses" is equal to ["1.1.1.1","1.1.1.2"]
And the response "data[0].attributes.alias" is equal to "interface_99"
And the response "data[0].attributes.index" is equal to 99
And the response "data[0].attributes.status" is equal to "up"
Expand Down
Loading