Skip to content

Commit

Permalink
refactor(opinetcommon): cleanup message name nomenclature for prototy…
Browse files Browse the repository at this point in the history
…ping

Signed-off-by: Mark Sanders <marksanders194@gmail.com>
  • Loading branch information
sandersms committed Jul 22, 2024
1 parent 9920eb1 commit b34f30e
Show file tree
Hide file tree
Showing 7 changed files with 693 additions and 688 deletions.
2 changes: 1 addition & 1 deletion network/opinetcommon/networkethernet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ message EthernetState {
}

// Ethernet Interface
message EthernetIf {
message EthernetInterface {
// Ethernet Interface Configuration settings
EthernetConfig config = 1;
// Ethernet Interface State information
Expand Down
16 changes: 8 additions & 8 deletions network/opinetcommon/networkinterfaces.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ service NetInterfaceService {
// Interface config
// (-- api-linter: core::0123::resource-annotation=disabled
// aip.dev/not-precedent: the name field is an opaque object --)
message Config {
message NetInterfaceConfig {
// Name of the interface. This is the opaque object
// used for designating the created interface.
string name = 1 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -75,7 +75,7 @@ message Config {
}

// Statistics Counters for the interface - ro
message Counters {
message NetInterfaceCounters {
// Received Octet counter
uint64 rx_octets = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Received Packet counter
Expand Down Expand Up @@ -117,7 +117,7 @@ message Counters {
// Interface State information - ro
// (-- api-linter: core::0123::resource-annotation=disabled
// aip.dev/not-precedent: the name field is an opaque object --)
message State {
message NetInterfaceState {
// Name of the interface. This is the opaque object
// used for designating the created interface.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down Expand Up @@ -150,7 +150,7 @@ message State {
// the system CPU or control plane
bool cpu = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Interface Statistics Counters
Counters counters = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
NetInterfaceCounters counters = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// VLAN Tag Protocol Identifier
TpidTypes tpid = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
}
Expand All @@ -169,9 +169,9 @@ message NetInterface {
// user settable. It is returned by the created object
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// Configuration settings - rw
Config config = 2 [(google.api.field_behavior) = REQUIRED];
NetInterfaceConfig config = 2 [(google.api.field_behavior) = REQUIRED];
// Interface State and Statistics - ro
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
NetInterfaceState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Hold Time Settings
message HoldTime {
Expand Down Expand Up @@ -218,7 +218,7 @@ message NetInterface {
SubifConfig subif_config = 2 [(google.api.field_behavior) = OPTIONAL];

// Subinterface State and Statistics
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
NetInterfaceState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Subinterface VLAN
VlanIf vlan = 4 [(google.api.field_behavior) = OPTIONAL];
Expand All @@ -230,7 +230,7 @@ message NetInterface {
Subinterfaces subinterfaces = 5 [(google.api.field_behavior) = OPTIONAL];

// Ethernet interface
EthernetIf ethernet = 6 [(google.api.field_behavior) = OPTIONAL];
EthernetInterface ethernet = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Get Interface Request
Expand Down
162 changes: 81 additions & 81 deletions network/opinetcommon/v1alpha1/autogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@
- [networkethernet.proto](#networkethernet-proto)
- [EthernetConfig](#opi_api-network-opinetcommon-v1alpha1-EthernetConfig)
- [EthernetCounters](#opi_api-network-opinetcommon-v1alpha1-EthernetCounters)
- [EthernetIf](#opi_api-network-opinetcommon-v1alpha1-EthernetIf)
- [EthernetInDistribution](#opi_api-network-opinetcommon-v1alpha1-EthernetInDistribution)
- [EthernetInterface](#opi_api-network-opinetcommon-v1alpha1-EthernetInterface)
- [EthernetState](#opi_api-network-opinetcommon-v1alpha1-EthernetState)

- [EthDuplexMode](#opi_api-network-opinetcommon-v1alpha1-EthDuplexMode)
- [EthFecMode](#opi_api-network-opinetcommon-v1alpha1-EthFecMode)
- [EthPortSpeed](#opi_api-network-opinetcommon-v1alpha1-EthPortSpeed)

- [networkinterfaces.proto](#networkinterfaces-proto)
- [Config](#opi_api-network-opinetcommon-v1alpha1-Config)
- [Counters](#opi_api-network-opinetcommon-v1alpha1-Counters)
- [GetNetInterfaceRequest](#opi_api-network-opinetcommon-v1alpha1-GetNetInterfaceRequest)
- [ListNetInterfacesRequest](#opi_api-network-opinetcommon-v1alpha1-ListNetInterfacesRequest)
- [ListNetInterfacesResponse](#opi_api-network-opinetcommon-v1alpha1-ListNetInterfacesResponse)
Expand All @@ -27,7 +25,9 @@
- [NetInterface.Subinterfaces](#opi_api-network-opinetcommon-v1alpha1-NetInterface-Subinterfaces)
- [NetInterface.Subinterfaces.Subinterface](#opi_api-network-opinetcommon-v1alpha1-NetInterface-Subinterfaces-Subinterface)
- [NetInterface.Subinterfaces.Subinterface.SubifConfig](#opi_api-network-opinetcommon-v1alpha1-NetInterface-Subinterfaces-Subinterface-SubifConfig)
- [State](#opi_api-network-opinetcommon-v1alpha1-State)
- [NetInterfaceConfig](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceConfig)
- [NetInterfaceCounters](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceCounters)
- [NetInterfaceState](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceState)
- [UpdateNetInterfaceRequest](#opi_api-network-opinetcommon-v1alpha1-UpdateNetInterfaceRequest)

- [InterfaceType](#opi_api-network-opinetcommon-v1alpha1-InterfaceType)
Expand Down Expand Up @@ -157,37 +157,37 @@ Ethernet Interface Counters



<a name="opi_api-network-opinetcommon-v1alpha1-EthernetIf"></a>
<a name="opi_api-network-opinetcommon-v1alpha1-EthernetInDistribution"></a>

### EthernetIf
Ethernet Interface
### EthernetInDistribution
Ethernet receive frame distribution counters


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| config | [EthernetConfig](#opi_api-network-opinetcommon-v1alpha1-EthernetConfig) | | Ethernet Interface Configuration settings |
| state | [EthernetState](#opi_api-network-opinetcommon-v1alpha1-EthernetState) | | Ethernet Interface State information |
| switched_vlan | [VlanSwitchedIf](#opi_api-network-opinetcommon-v1alpha1-VlanSwitchedIf) | | Switched VLAN Interface configuration for interface |
| rx_frames_octets64 | [uint64](#uint64) | | Receive counter for 64 byte frames |
| rx_frames_octets65_to127 | [uint64](#uint64) | | Receive counter for 65 to 127 byte frames |
| rx_frames_octets128_to255 | [uint64](#uint64) | | Receive counter for 128 to 255 byte frames |
| rx_frames_octets256_to511 | [uint64](#uint64) | | receive counter for 256 to 511 byte frames |
| rx_frames_octets512_to1023 | [uint64](#uint64) | | receive counter for 512 to 1023 byte frames |
| rx_frames_octets1024_to1518 | [uint64](#uint64) | | receive counter for 1024 to 1518 byte frames |






<a name="opi_api-network-opinetcommon-v1alpha1-EthernetInDistribution"></a>
<a name="opi_api-network-opinetcommon-v1alpha1-EthernetInterface"></a>

### EthernetInDistribution
Ethernet receive frame distribution counters
### EthernetInterface
Ethernet Interface


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rx_frames_octets64 | [uint64](#uint64) | | Receive counter for 64 byte frames |
| rx_frames_octets65_to127 | [uint64](#uint64) | | Receive counter for 65 to 127 byte frames |
| rx_frames_octets128_to255 | [uint64](#uint64) | | Receive counter for 128 to 255 byte frames |
| rx_frames_octets256_to511 | [uint64](#uint64) | | receive counter for 256 to 511 byte frames |
| rx_frames_octets512_to1023 | [uint64](#uint64) | | receive counter for 512 to 1023 byte frames |
| rx_frames_octets1024_to1518 | [uint64](#uint64) | | receive counter for 1024 to 1518 byte frames |
| config | [EthernetConfig](#opi_api-network-opinetcommon-v1alpha1-EthernetConfig) | | Ethernet Interface Configuration settings |
| state | [EthernetState](#opi_api-network-opinetcommon-v1alpha1-EthernetState) | | Ethernet Interface State information |
| switched_vlan | [VlanSwitchedIf](#opi_api-network-opinetcommon-v1alpha1-VlanSwitchedIf) | | Switched VLAN Interface configuration for interface |



Expand Down Expand Up @@ -296,61 +296,6 @@ Derived from the OpenConfig interfaces model github.com/openconfig/public/releas
aip.dev/not-precedent: counters, mtu, index must be uint and not int. --)


<a name="opi_api-network-opinetcommon-v1alpha1-Config"></a>

### Config
Interface config
(-- api-linter: core::0123::resource-annotation=disabled
aip.dev/not-precedent: the name field is an opaque object --)


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | Name of the interface. This is the opaque object used for designating the created interface. |
| type | [InterfaceType](#opi_api-network-opinetcommon-v1alpha1-InterfaceType) | | Type of interface - Ethernet and others |
| mtu | [uint32](#uint32) | | MTU for the interface that can be configured |
| loopback_mode | [bool](#bool) | | Setting the loopback mode of the interface |
| description | [string](#string) | | Description of the interface and usage |
| enabled | [bool](#bool) | | Setting for enabling/disabling the interface |
| tpid | [TpidTypes](#opi_api-network-opinetcommon-v1alpha1-TpidTypes) | | VLAN Tag Protocol Identifier (TPID) |






<a name="opi_api-network-opinetcommon-v1alpha1-Counters"></a>

### Counters
Statistics Counters for the interface - ro


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rx_octets | [uint64](#uint64) | | Received Octet counter |
| rx_packets | [uint64](#uint64) | | Received Packet counter |
| rx_unicast_pkts | [uint64](#uint64) | | Unicast packets received counter |
| rx_broadcast_pkts | [uint64](#uint64) | | Broadcast packets received counter |
| rx_multicast_pkts | [uint64](#uint64) | | multicast packets received counter |
| rx_discards | [uint64](#uint64) | | discarded received packets counter |
| rx_errors | [uint64](#uint64) | | Receive error counter |
| rx_unknown_protos | [uint64](#uint64) | | Unknown received protocol counter |
| rx_fcs_errors | [uint64](#uint64) | | Received FCS error counter |
| out_octets | [uint64](#uint64) | | Transmit octet counter |
| out_packets | [uint64](#uint64) | | Transmit packet counter |
| out_unicast_pkts | [uint64](#uint64) | | Unicast packet transmit counter |
| out_broadcast_pkts | [uint64](#uint64) | | Broadcast packet transmit counter |
| out_multicast_pkts | [uint64](#uint64) | | Multicast packet transmit counter |
| out_discards | [uint64](#uint64) | | Discarded transmit packet counter |
| out_errors | [uint64](#uint64) | | Transmit error counter |
| carrier_transitions | [uint64](#uint64) | | Carrier transition count |
| last_clear | [uint64](#uint64) | | Timestamp of the last time the interface counters were cleared |






<a name="opi_api-network-opinetcommon-v1alpha1-GetNetInterfaceRequest"></a>

### GetNetInterfaceRequest
Expand Down Expand Up @@ -410,11 +355,11 @@ Interface - physical or virtual interface reported
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | Name of the interface. This is an opaque object that is not user settable. It is returned by the created object |
| config | [Config](#opi_api-network-opinetcommon-v1alpha1-Config) | | Configuration settings - rw |
| state | [State](#opi_api-network-opinetcommon-v1alpha1-State) | | Interface State and Statistics - ro |
| config | [NetInterfaceConfig](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceConfig) | | Configuration settings - rw |
| state | [NetInterfaceState](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceState) | | Interface State and Statistics - ro |
| holdtime | [NetInterface.HoldTime](#opi_api-network-opinetcommon-v1alpha1-NetInterface-HoldTime) | | Hold Time Settings |
| subinterfaces | [NetInterface.Subinterfaces](#opi_api-network-opinetcommon-v1alpha1-NetInterface-Subinterfaces) | | Subinterfaces assigned to the interface |
| ethernet | [EthernetIf](#opi_api-network-opinetcommon-v1alpha1-EthernetIf) | | Ethernet interface |
| ethernet | [EthernetInterface](#opi_api-network-opinetcommon-v1alpha1-EthernetInterface) | | Ethernet interface |



Expand Down Expand Up @@ -494,7 +439,7 @@ Subinterface settings
| ----- | ---- | ----- | ----------- |
| index | [int64](#int64) | | Subinterface index |
| subif_config | [NetInterface.Subinterfaces.Subinterface.SubifConfig](#opi_api-network-opinetcommon-v1alpha1-NetInterface-Subinterfaces-Subinterface-SubifConfig) | | Subinterface Configuration |
| state | [State](#opi_api-network-opinetcommon-v1alpha1-State) | | Subinterface State and Statistics |
| state | [NetInterfaceState](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceState) | | Subinterface State and Statistics |
| vlan | [VlanIf](#opi_api-network-opinetcommon-v1alpha1-VlanIf) | | Subinterface VLAN |


Expand All @@ -519,9 +464,64 @@ Subinterface configuration



<a name="opi_api-network-opinetcommon-v1alpha1-State"></a>
<a name="opi_api-network-opinetcommon-v1alpha1-NetInterfaceConfig"></a>

### NetInterfaceConfig
Interface config
(-- api-linter: core::0123::resource-annotation=disabled
aip.dev/not-precedent: the name field is an opaque object --)


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | Name of the interface. This is the opaque object used for designating the created interface. |
| type | [InterfaceType](#opi_api-network-opinetcommon-v1alpha1-InterfaceType) | | Type of interface - Ethernet and others |
| mtu | [uint32](#uint32) | | MTU for the interface that can be configured |
| loopback_mode | [bool](#bool) | | Setting the loopback mode of the interface |
| description | [string](#string) | | Description of the interface and usage |
| enabled | [bool](#bool) | | Setting for enabling/disabling the interface |
| tpid | [TpidTypes](#opi_api-network-opinetcommon-v1alpha1-TpidTypes) | | VLAN Tag Protocol Identifier (TPID) |






<a name="opi_api-network-opinetcommon-v1alpha1-NetInterfaceCounters"></a>

### NetInterfaceCounters
Statistics Counters for the interface - ro


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rx_octets | [uint64](#uint64) | | Received Octet counter |
| rx_packets | [uint64](#uint64) | | Received Packet counter |
| rx_unicast_pkts | [uint64](#uint64) | | Unicast packets received counter |
| rx_broadcast_pkts | [uint64](#uint64) | | Broadcast packets received counter |
| rx_multicast_pkts | [uint64](#uint64) | | multicast packets received counter |
| rx_discards | [uint64](#uint64) | | discarded received packets counter |
| rx_errors | [uint64](#uint64) | | Receive error counter |
| rx_unknown_protos | [uint64](#uint64) | | Unknown received protocol counter |
| rx_fcs_errors | [uint64](#uint64) | | Received FCS error counter |
| out_octets | [uint64](#uint64) | | Transmit octet counter |
| out_packets | [uint64](#uint64) | | Transmit packet counter |
| out_unicast_pkts | [uint64](#uint64) | | Unicast packet transmit counter |
| out_broadcast_pkts | [uint64](#uint64) | | Broadcast packet transmit counter |
| out_multicast_pkts | [uint64](#uint64) | | Multicast packet transmit counter |
| out_discards | [uint64](#uint64) | | Discarded transmit packet counter |
| out_errors | [uint64](#uint64) | | Transmit error counter |
| carrier_transitions | [uint64](#uint64) | | Carrier transition count |
| last_clear | [uint64](#uint64) | | Timestamp of the last time the interface counters were cleared |






<a name="opi_api-network-opinetcommon-v1alpha1-NetInterfaceState"></a>

### State
### NetInterfaceState
Interface State information - ro
(-- api-linter: core::0123::resource-annotation=disabled
aip.dev/not-precedent: the name field is an opaque object --)
Expand All @@ -542,7 +542,7 @@ Interface State information - ro
| logical | [bool](#bool) | | Logical interface - when set to true indicates a logical interface with no associated physical port or channel |
| management | [bool](#bool) | | Management interface - when set to true indicates a dedicated management interface that is independent of the dataplane interfaces such as an out of band management network |
| cpu | [bool](#bool) | | CPU interface - when set to true the interface is for traffic handled by the system CPU or control plane |
| counters | [Counters](#opi_api-network-opinetcommon-v1alpha1-Counters) | | Interface Statistics Counters |
| counters | [NetInterfaceCounters](#opi_api-network-opinetcommon-v1alpha1-NetInterfaceCounters) | | Interface Statistics Counters |
| tpid | [TpidTypes](#opi_api-network-opinetcommon-v1alpha1-TpidTypes) | | VLAN Tag Protocol Identifier |


Expand Down
Loading

0 comments on commit b34f30e

Please sign in to comment.