diff --git a/doc/index.html b/doc/index.html
index eda7b912..6d9caac8 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -2843,6 +2843,10 @@
Table of Contents
metalstack/infra/v2/switch.proto
+ -
+ MSwitchRegisterNic
+
+
-
MSwitchServiceGetRequest
@@ -18655,14 +18659,6 @@
+ SwitchRegisterNic
+ SwitchRegisterNic is the switch nic used when registering a switch at the api.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | name |
+ string |
+ |
+ Name of the switch port. |
+
+
+
+ | identifier |
+ string |
+ |
+ Identifier of the port. |
+
+
+
+ | state |
+ metalstack.api.v2.NicState |
+ |
+ NicState describes the current state of the switch port. |
+
+
+
+
+
+
+
+
+
SwitchServiceGetRequest
SwitchServiceGetRequest is the request payload for getting a switch.
@@ -22886,10 +22906,66 @@ SwitchServiceRegisterR
- | switch |
- metalstack.api.v2.Switch |
+ id |
+ string |
|
- Switch to register. |
+ Id of the switch. |
+
+
+
+ | meta |
+ metalstack.api.v2.Meta |
+ |
+ Meta for this switch. |
+
+
+
+ | rack |
+ string |
+ optional |
+ Rack ID if the switch resides in a rack. |
+
+
+
+ | room |
+ string |
+ optional |
+ Room ID if the switch resides in a room. |
+
+
+
+ | partition |
+ string |
+ |
+ Partition the switch belongs to. |
+
+
+
+ | management_ip |
+ string |
+ |
+ ManagementIp is the switch's IP for management access. |
+
+
+
+ | management_user |
+ string |
+ optional |
+ ManagementUser is the user name to use for management access. |
+
+
+
+ | nics |
+ SwitchRegisterNic |
+ repeated |
+ Nics are the front panel ports of the switch. |
+
+
+
+ | os |
+ metalstack.api.v2.SwitchOS |
+ |
+ SwitchOs is the OS running on the switch. |
diff --git a/go/metalstack/admin/v2/switch.pb.go b/go/metalstack/admin/v2/switch.pb.go
index e1602a2b..d8bc37a2 100644
--- a/go/metalstack/admin/v2/switch.pb.go
+++ b/go/metalstack/admin/v2/switch.pb.go
@@ -11,7 +11,6 @@ import (
v2 "github.com/metal-stack/api/go/metalstack/api/v2"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -215,9 +214,6 @@ type SwitchServiceUpdateRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// UpdateMeta contains the timestamp and strategy to be used in this update request.
UpdateMeta *v2.UpdateMeta `protobuf:"bytes,2,opt,name=update_meta,json=updateMeta,proto3" json:"update_meta,omitempty"`
- // UpdatedAt is the date when this entity was updated.
- // Must be part of the update request to ensure optimistic locking.
- UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// Description of the switch.
Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"`
// ReplaceMode is used to mark a switch ready for replacement.
@@ -228,12 +224,8 @@ type SwitchServiceUpdateRequest struct {
ManagementUser *string `protobuf:"bytes,7,opt,name=management_user,json=managementUser,proto3,oneof" json:"management_user,omitempty"`
// ConsoleCommand is the command for accessing the switch's console.
ConsoleCommand *string `protobuf:"bytes,8,opt,name=console_command,json=consoleCommand,proto3,oneof" json:"console_command,omitempty"`
- // Nics are the front panel ports of the switch.
- Nics []*v2.SwitchNic `protobuf:"bytes,9,rep,name=nics,proto3" json:"nics,omitempty"`
- // SwitchOs is the OS running on the switch.
- Os *v2.SwitchOS `protobuf:"bytes,10,opt,name=os,proto3,oneof" json:"os,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SwitchServiceUpdateRequest) Reset() {
@@ -280,13 +272,6 @@ func (x *SwitchServiceUpdateRequest) GetUpdateMeta() *v2.UpdateMeta {
return nil
}
-func (x *SwitchServiceUpdateRequest) GetUpdatedAt() *timestamppb.Timestamp {
- if x != nil {
- return x.UpdatedAt
- }
- return nil
-}
-
func (x *SwitchServiceUpdateRequest) GetDescription() string {
if x != nil && x.Description != nil {
return *x.Description
@@ -322,20 +307,6 @@ func (x *SwitchServiceUpdateRequest) GetConsoleCommand() string {
return ""
}
-func (x *SwitchServiceUpdateRequest) GetNics() []*v2.SwitchNic {
- if x != nil {
- return x.Nics
- }
- return nil
-}
-
-func (x *SwitchServiceUpdateRequest) GetOs() *v2.SwitchOS {
- if x != nil {
- return x.Os
- }
- return nil
-}
-
// SwitchServiceUpdateResponse is the response payload for updating a switch.
type SwitchServiceUpdateResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -799,7 +770,7 @@ var File_metalstack_admin_v2_switch_proto protoreflect.FileDescriptor
const file_metalstack_admin_v2_switch_proto_rawDesc = "" +
"\n" +
- " metalstack/admin/v2/switch.proto\x12\x13metalstack.admin.v2\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/machine.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n" +
+ " metalstack/admin/v2/switch.proto\x12\x13metalstack.admin.v2\x1a\x1bbuf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/machine.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n" +
"\x17SwitchServiceGetRequest\x12\x1d\n" +
"\x02id\x18\x01 \x01(\tB\r\xbaH\n" +
"r\b\xc0\xb3\xae\xb1\x02\x01h\x01R\x02id\"M\n" +
@@ -808,28 +779,25 @@ const file_metalstack_admin_v2_switch_proto_rawDesc = "" +
"\x18SwitchServiceListRequest\x124\n" +
"\x05query\x18\x01 \x01(\v2\x1e.metalstack.api.v2.SwitchQueryR\x05query\"R\n" +
"\x19SwitchServiceListResponse\x125\n" +
- "\bswitches\x18\x01 \x03(\v2\x19.metalstack.api.v2.SwitchR\bswitches\"\xb9\x05\n" +
+ "\bswitches\x18\x01 \x03(\v2\x19.metalstack.api.v2.SwitchR\bswitches\"\xbb\x04\n" +
"\x1aSwitchServiceUpdateRequest\x12\x1d\n" +
"\x02id\x18\x01 \x01(\tB\r\xbaH\n" +
"r\b\xc0\xb3\xae\xb1\x02\x01h\x01R\x02id\x12F\n" +
"\vupdate_meta\x18\x02 \x01(\v2\x1d.metalstack.api.v2.UpdateMetaB\x06\xbaH\x03\xc8\x01\x01R\n" +
- "updateMeta\x129\n" +
- "\n" +
- "updated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x122\n" +
+ "updateMeta\x122\n" +
"\vdescription\x18\x04 \x01(\tB\v\xbaH\br\x06ȳ\xae\xb1\x02\x01H\x00R\vdescription\x88\x01\x01\x12V\n" +
"\freplace_mode\x18\x05 \x01(\x0e2$.metalstack.api.v2.SwitchReplaceModeB\b\xbaH\x05\x82\x01\x02\x10\x01H\x01R\vreplaceMode\x88\x01\x01\x121\n" +
"\rmanagement_ip\x18\x06 \x01(\tB\a\xbaH\x04r\x02p\x01H\x02R\fmanagementIp\x88\x01\x01\x129\n" +
"\x0fmanagement_user\x18\a \x01(\tB\v\xbaH\br\x06\xc0\xb3\xae\xb1\x02\x01H\x03R\x0emanagementUser\x88\x01\x01\x129\n" +
- "\x0fconsole_command\x18\b \x01(\tB\v\xbaH\br\x06ȳ\xae\xb1\x02\x01H\x04R\x0econsoleCommand\x88\x01\x01\x120\n" +
- "\x04nics\x18\t \x03(\v2\x1c.metalstack.api.v2.SwitchNicR\x04nics\x120\n" +
- "\x02os\x18\n" +
- " \x01(\v2\x1b.metalstack.api.v2.SwitchOSH\x05R\x02os\x88\x01\x01B\x0e\n" +
+ "\x0fconsole_command\x18\b \x01(\tB\v\xbaH\br\x06ȳ\xae\xb1\x02\x01H\x04R\x0econsoleCommand\x88\x01\x01B\x0e\n" +
"\f_descriptionB\x0f\n" +
"\r_replace_modeB\x10\n" +
"\x0e_management_ipB\x12\n" +
"\x10_management_userB\x12\n" +
- "\x10_console_commandB\x05\n" +
- "\x03_os\"P\n" +
+ "\x10_console_commandJ\x04\b\x03\x10\x04J\x04\b\t\x10\n" +
+ "J\x04\b\n" +
+ "\x10\vR\n" +
+ "updated_atR\x04nicsR\x02os\"P\n" +
"\x1bSwitchServiceUpdateResponse\x121\n" +
"\x06switch\x18\x01 \x01(\v2\x19.metalstack.api.v2.SwitchR\x06switch\"Q\n" +
"\x1aSwitchServiceDeleteRequest\x12\x1d\n" +
@@ -903,50 +871,44 @@ var file_metalstack_admin_v2_switch_proto_goTypes = []any{
(*v2.Switch)(nil), // 14: metalstack.api.v2.Switch
(*v2.SwitchQuery)(nil), // 15: metalstack.api.v2.SwitchQuery
(*v2.UpdateMeta)(nil), // 16: metalstack.api.v2.UpdateMeta
- (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
- (v2.SwitchReplaceMode)(0), // 18: metalstack.api.v2.SwitchReplaceMode
- (*v2.SwitchNic)(nil), // 19: metalstack.api.v2.SwitchNic
- (*v2.SwitchOS)(nil), // 20: metalstack.api.v2.SwitchOS
- (v2.SwitchPortStatus)(0), // 21: metalstack.api.v2.SwitchPortStatus
- (*v2.MachineQuery)(nil), // 22: metalstack.api.v2.MachineQuery
- (*v2.SwitchWithMachines)(nil), // 23: metalstack.api.v2.SwitchWithMachines
+ (v2.SwitchReplaceMode)(0), // 17: metalstack.api.v2.SwitchReplaceMode
+ (v2.SwitchPortStatus)(0), // 18: metalstack.api.v2.SwitchPortStatus
+ (*v2.MachineQuery)(nil), // 19: metalstack.api.v2.MachineQuery
+ (*v2.SwitchWithMachines)(nil), // 20: metalstack.api.v2.SwitchWithMachines
}
var file_metalstack_admin_v2_switch_proto_depIdxs = []int32{
14, // 0: metalstack.admin.v2.SwitchServiceGetResponse.switch:type_name -> metalstack.api.v2.Switch
15, // 1: metalstack.admin.v2.SwitchServiceListRequest.query:type_name -> metalstack.api.v2.SwitchQuery
14, // 2: metalstack.admin.v2.SwitchServiceListResponse.switches:type_name -> metalstack.api.v2.Switch
16, // 3: metalstack.admin.v2.SwitchServiceUpdateRequest.update_meta:type_name -> metalstack.api.v2.UpdateMeta
- 17, // 4: metalstack.admin.v2.SwitchServiceUpdateRequest.updated_at:type_name -> google.protobuf.Timestamp
- 18, // 5: metalstack.admin.v2.SwitchServiceUpdateRequest.replace_mode:type_name -> metalstack.api.v2.SwitchReplaceMode
- 19, // 6: metalstack.admin.v2.SwitchServiceUpdateRequest.nics:type_name -> metalstack.api.v2.SwitchNic
- 20, // 7: metalstack.admin.v2.SwitchServiceUpdateRequest.os:type_name -> metalstack.api.v2.SwitchOS
- 14, // 8: metalstack.admin.v2.SwitchServiceUpdateResponse.switch:type_name -> metalstack.api.v2.Switch
- 14, // 9: metalstack.admin.v2.SwitchServiceDeleteResponse.switch:type_name -> metalstack.api.v2.Switch
- 14, // 10: metalstack.admin.v2.SwitchServiceMigrateResponse.switch:type_name -> metalstack.api.v2.Switch
- 21, // 11: metalstack.admin.v2.SwitchServicePortRequest.status:type_name -> metalstack.api.v2.SwitchPortStatus
- 14, // 12: metalstack.admin.v2.SwitchServicePortResponse.switch:type_name -> metalstack.api.v2.Switch
- 15, // 13: metalstack.admin.v2.SwitchServiceConnectedMachinesRequest.query:type_name -> metalstack.api.v2.SwitchQuery
- 22, // 14: metalstack.admin.v2.SwitchServiceConnectedMachinesRequest.machine_query:type_name -> metalstack.api.v2.MachineQuery
- 23, // 15: metalstack.admin.v2.SwitchServiceConnectedMachinesResponse.switches_with_machines:type_name -> metalstack.api.v2.SwitchWithMachines
- 0, // 16: metalstack.admin.v2.SwitchService.Get:input_type -> metalstack.admin.v2.SwitchServiceGetRequest
- 2, // 17: metalstack.admin.v2.SwitchService.List:input_type -> metalstack.admin.v2.SwitchServiceListRequest
- 4, // 18: metalstack.admin.v2.SwitchService.Update:input_type -> metalstack.admin.v2.SwitchServiceUpdateRequest
- 6, // 19: metalstack.admin.v2.SwitchService.Delete:input_type -> metalstack.admin.v2.SwitchServiceDeleteRequest
- 8, // 20: metalstack.admin.v2.SwitchService.Migrate:input_type -> metalstack.admin.v2.SwitchServiceMigrateRequest
- 10, // 21: metalstack.admin.v2.SwitchService.Port:input_type -> metalstack.admin.v2.SwitchServicePortRequest
- 12, // 22: metalstack.admin.v2.SwitchService.ConnectedMachines:input_type -> metalstack.admin.v2.SwitchServiceConnectedMachinesRequest
- 1, // 23: metalstack.admin.v2.SwitchService.Get:output_type -> metalstack.admin.v2.SwitchServiceGetResponse
- 3, // 24: metalstack.admin.v2.SwitchService.List:output_type -> metalstack.admin.v2.SwitchServiceListResponse
- 5, // 25: metalstack.admin.v2.SwitchService.Update:output_type -> metalstack.admin.v2.SwitchServiceUpdateResponse
- 7, // 26: metalstack.admin.v2.SwitchService.Delete:output_type -> metalstack.admin.v2.SwitchServiceDeleteResponse
- 9, // 27: metalstack.admin.v2.SwitchService.Migrate:output_type -> metalstack.admin.v2.SwitchServiceMigrateResponse
- 11, // 28: metalstack.admin.v2.SwitchService.Port:output_type -> metalstack.admin.v2.SwitchServicePortResponse
- 13, // 29: metalstack.admin.v2.SwitchService.ConnectedMachines:output_type -> metalstack.admin.v2.SwitchServiceConnectedMachinesResponse
- 23, // [23:30] is the sub-list for method output_type
- 16, // [16:23] is the sub-list for method input_type
- 16, // [16:16] is the sub-list for extension type_name
- 16, // [16:16] is the sub-list for extension extendee
- 0, // [0:16] is the sub-list for field type_name
+ 17, // 4: metalstack.admin.v2.SwitchServiceUpdateRequest.replace_mode:type_name -> metalstack.api.v2.SwitchReplaceMode
+ 14, // 5: metalstack.admin.v2.SwitchServiceUpdateResponse.switch:type_name -> metalstack.api.v2.Switch
+ 14, // 6: metalstack.admin.v2.SwitchServiceDeleteResponse.switch:type_name -> metalstack.api.v2.Switch
+ 14, // 7: metalstack.admin.v2.SwitchServiceMigrateResponse.switch:type_name -> metalstack.api.v2.Switch
+ 18, // 8: metalstack.admin.v2.SwitchServicePortRequest.status:type_name -> metalstack.api.v2.SwitchPortStatus
+ 14, // 9: metalstack.admin.v2.SwitchServicePortResponse.switch:type_name -> metalstack.api.v2.Switch
+ 15, // 10: metalstack.admin.v2.SwitchServiceConnectedMachinesRequest.query:type_name -> metalstack.api.v2.SwitchQuery
+ 19, // 11: metalstack.admin.v2.SwitchServiceConnectedMachinesRequest.machine_query:type_name -> metalstack.api.v2.MachineQuery
+ 20, // 12: metalstack.admin.v2.SwitchServiceConnectedMachinesResponse.switches_with_machines:type_name -> metalstack.api.v2.SwitchWithMachines
+ 0, // 13: metalstack.admin.v2.SwitchService.Get:input_type -> metalstack.admin.v2.SwitchServiceGetRequest
+ 2, // 14: metalstack.admin.v2.SwitchService.List:input_type -> metalstack.admin.v2.SwitchServiceListRequest
+ 4, // 15: metalstack.admin.v2.SwitchService.Update:input_type -> metalstack.admin.v2.SwitchServiceUpdateRequest
+ 6, // 16: metalstack.admin.v2.SwitchService.Delete:input_type -> metalstack.admin.v2.SwitchServiceDeleteRequest
+ 8, // 17: metalstack.admin.v2.SwitchService.Migrate:input_type -> metalstack.admin.v2.SwitchServiceMigrateRequest
+ 10, // 18: metalstack.admin.v2.SwitchService.Port:input_type -> metalstack.admin.v2.SwitchServicePortRequest
+ 12, // 19: metalstack.admin.v2.SwitchService.ConnectedMachines:input_type -> metalstack.admin.v2.SwitchServiceConnectedMachinesRequest
+ 1, // 20: metalstack.admin.v2.SwitchService.Get:output_type -> metalstack.admin.v2.SwitchServiceGetResponse
+ 3, // 21: metalstack.admin.v2.SwitchService.List:output_type -> metalstack.admin.v2.SwitchServiceListResponse
+ 5, // 22: metalstack.admin.v2.SwitchService.Update:output_type -> metalstack.admin.v2.SwitchServiceUpdateResponse
+ 7, // 23: metalstack.admin.v2.SwitchService.Delete:output_type -> metalstack.admin.v2.SwitchServiceDeleteResponse
+ 9, // 24: metalstack.admin.v2.SwitchService.Migrate:output_type -> metalstack.admin.v2.SwitchServiceMigrateResponse
+ 11, // 25: metalstack.admin.v2.SwitchService.Port:output_type -> metalstack.admin.v2.SwitchServicePortResponse
+ 13, // 26: metalstack.admin.v2.SwitchService.ConnectedMachines:output_type -> metalstack.admin.v2.SwitchServiceConnectedMachinesResponse
+ 20, // [20:27] is the sub-list for method output_type
+ 13, // [13:20] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
}
func init() { file_metalstack_admin_v2_switch_proto_init() }
diff --git a/go/metalstack/infra/v2/switch.pb.go b/go/metalstack/infra/v2/switch.pb.go
index ef202987..9416f08d 100644
--- a/go/metalstack/infra/v2/switch.pb.go
+++ b/go/metalstack/infra/v2/switch.pb.go
@@ -119,8 +119,24 @@ func (x *SwitchServiceGetResponse) GetSwitch() *v2.Switch {
// SwitchServiceRegisterRequest is the request payload for registering a switch.
type SwitchServiceRegisterRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // Switch to register.
- Switch *v2.Switch `protobuf:"bytes,1,opt,name=switch,proto3" json:"switch,omitempty"`
+ // Id of the switch.
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ // Meta for this switch.
+ Meta *v2.Meta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
+ // Rack ID if the switch resides in a rack.
+ Rack *string `protobuf:"bytes,4,opt,name=rack,proto3,oneof" json:"rack,omitempty"`
+ // Room ID if the switch resides in a room.
+ Room *string `protobuf:"bytes,5,opt,name=room,proto3,oneof" json:"room,omitempty"`
+ // Partition the switch belongs to.
+ Partition string `protobuf:"bytes,6,opt,name=partition,proto3" json:"partition,omitempty"`
+ // ManagementIp is the switch's IP for management access.
+ ManagementIp string `protobuf:"bytes,7,opt,name=management_ip,json=managementIp,proto3" json:"management_ip,omitempty"`
+ // ManagementUser is the user name to use for management access.
+ ManagementUser *string `protobuf:"bytes,8,opt,name=management_user,json=managementUser,proto3,oneof" json:"management_user,omitempty"`
+ // Nics are the front panel ports of the switch.
+ Nics []*SwitchRegisterNic `protobuf:"bytes,9,rep,name=nics,proto3" json:"nics,omitempty"`
+ // SwitchOs is the OS running on the switch.
+ Os *v2.SwitchOS `protobuf:"bytes,10,opt,name=os,proto3" json:"os,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -155,9 +171,129 @@ func (*SwitchServiceRegisterRequest) Descriptor() ([]byte, []int) {
return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{2}
}
-func (x *SwitchServiceRegisterRequest) GetSwitch() *v2.Switch {
+func (x *SwitchServiceRegisterRequest) GetId() string {
if x != nil {
- return x.Switch
+ return x.Id
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetMeta() *v2.Meta {
+ if x != nil {
+ return x.Meta
+ }
+ return nil
+}
+
+func (x *SwitchServiceRegisterRequest) GetRack() string {
+ if x != nil && x.Rack != nil {
+ return *x.Rack
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetRoom() string {
+ if x != nil && x.Room != nil {
+ return *x.Room
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetPartition() string {
+ if x != nil {
+ return x.Partition
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetManagementIp() string {
+ if x != nil {
+ return x.ManagementIp
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetManagementUser() string {
+ if x != nil && x.ManagementUser != nil {
+ return *x.ManagementUser
+ }
+ return ""
+}
+
+func (x *SwitchServiceRegisterRequest) GetNics() []*SwitchRegisterNic {
+ if x != nil {
+ return x.Nics
+ }
+ return nil
+}
+
+func (x *SwitchServiceRegisterRequest) GetOs() *v2.SwitchOS {
+ if x != nil {
+ return x.Os
+ }
+ return nil
+}
+
+// SwitchRegisterNic is the switch nic used when registering a switch at the api.
+type SwitchRegisterNic struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Name of the switch port.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Identifier of the port.
+ Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"`
+ // NicState describes the current state of the switch port.
+ State *v2.NicState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SwitchRegisterNic) Reset() {
+ *x = SwitchRegisterNic{}
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SwitchRegisterNic) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SwitchRegisterNic) ProtoMessage() {}
+
+func (x *SwitchRegisterNic) ProtoReflect() protoreflect.Message {
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SwitchRegisterNic.ProtoReflect.Descriptor instead.
+func (*SwitchRegisterNic) Descriptor() ([]byte, []int) {
+ return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *SwitchRegisterNic) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *SwitchRegisterNic) GetIdentifier() string {
+ if x != nil {
+ return x.Identifier
+ }
+ return ""
+}
+
+func (x *SwitchRegisterNic) GetState() *v2.NicState {
+ if x != nil {
+ return x.State
}
return nil
}
@@ -173,7 +309,7 @@ type SwitchServiceRegisterResponse struct {
func (x *SwitchServiceRegisterResponse) Reset() {
*x = SwitchServiceRegisterResponse{}
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[3]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -185,7 +321,7 @@ func (x *SwitchServiceRegisterResponse) String() string {
func (*SwitchServiceRegisterResponse) ProtoMessage() {}
func (x *SwitchServiceRegisterResponse) ProtoReflect() protoreflect.Message {
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[3]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -198,7 +334,7 @@ func (x *SwitchServiceRegisterResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SwitchServiceRegisterResponse.ProtoReflect.Descriptor instead.
func (*SwitchServiceRegisterResponse) Descriptor() ([]byte, []int) {
- return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{3}
+ return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{4}
}
func (x *SwitchServiceRegisterResponse) GetSwitch() *v2.Switch {
@@ -227,7 +363,7 @@ type SwitchServiceHeartbeatRequest struct {
func (x *SwitchServiceHeartbeatRequest) Reset() {
*x = SwitchServiceHeartbeatRequest{}
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[4]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -239,7 +375,7 @@ func (x *SwitchServiceHeartbeatRequest) String() string {
func (*SwitchServiceHeartbeatRequest) ProtoMessage() {}
func (x *SwitchServiceHeartbeatRequest) ProtoReflect() protoreflect.Message {
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[4]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -252,7 +388,7 @@ func (x *SwitchServiceHeartbeatRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SwitchServiceHeartbeatRequest.ProtoReflect.Descriptor instead.
func (*SwitchServiceHeartbeatRequest) Descriptor() ([]byte, []int) {
- return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{4}
+ return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{5}
}
func (x *SwitchServiceHeartbeatRequest) GetId() string {
@@ -305,7 +441,7 @@ type SwitchServiceHeartbeatResponse struct {
func (x *SwitchServiceHeartbeatResponse) Reset() {
*x = SwitchServiceHeartbeatResponse{}
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[5]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -317,7 +453,7 @@ func (x *SwitchServiceHeartbeatResponse) String() string {
func (*SwitchServiceHeartbeatResponse) ProtoMessage() {}
func (x *SwitchServiceHeartbeatResponse) ProtoReflect() protoreflect.Message {
- mi := &file_metalstack_infra_v2_switch_proto_msgTypes[5]
+ mi := &file_metalstack_infra_v2_switch_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -330,7 +466,7 @@ func (x *SwitchServiceHeartbeatResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SwitchServiceHeartbeatResponse.ProtoReflect.Descriptor instead.
func (*SwitchServiceHeartbeatResponse) Descriptor() ([]byte, []int) {
- return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{5}
+ return file_metalstack_infra_v2_switch_proto_rawDescGZIP(), []int{6}
}
func (x *SwitchServiceHeartbeatResponse) GetId() string {
@@ -363,9 +499,29 @@ const file_metalstack_infra_v2_switch_proto_rawDesc = "" +
"\x02id\x18\x01 \x01(\tB\r\xbaH\n" +
"r\b\xc0\xb3\xae\xb1\x02\x01h\x01R\x02id\"M\n" +
"\x18SwitchServiceGetResponse\x121\n" +
- "\x06switch\x18\x01 \x01(\v2\x19.metalstack.api.v2.SwitchR\x06switch\"Q\n" +
- "\x1cSwitchServiceRegisterRequest\x121\n" +
- "\x06switch\x18\x01 \x01(\v2\x19.metalstack.api.v2.SwitchR\x06switch\"R\n" +
+ "\x06switch\x18\x01 \x01(\v2\x19.metalstack.api.v2.SwitchR\x06switch\"\xe6\x03\n" +
+ "\x1cSwitchServiceRegisterRequest\x12\x1d\n" +
+ "\x02id\x18\x02 \x01(\tB\r\xbaH\n" +
+ "r\b\xc0\xb3\xae\xb1\x02\x01h\x01R\x02id\x12+\n" +
+ "\x04meta\x18\x03 \x01(\v2\x17.metalstack.api.v2.MetaR\x04meta\x12$\n" +
+ "\x04rack\x18\x04 \x01(\tB\v\xbaH\br\x06\xc0\xb3\xae\xb1\x02\x01H\x00R\x04rack\x88\x01\x01\x12$\n" +
+ "\x04room\x18\x05 \x01(\tB\v\xbaH\br\x06\xc0\xb3\xae\xb1\x02\x01H\x01R\x04room\x88\x01\x01\x12)\n" +
+ "\tpartition\x18\x06 \x01(\tB\v\xbaH\br\x06г\xae\xb1\x02\x01R\tpartition\x12,\n" +
+ "\rmanagement_ip\x18\a \x01(\tB\a\xbaH\x04r\x02p\x01R\fmanagementIp\x128\n" +
+ "\x0fmanagement_user\x18\b \x01(\tB\n" +
+ "\xbaH\ar\x05\x10\x02\x18\x80\x01H\x02R\x0emanagementUser\x88\x01\x01\x12:\n" +
+ "\x04nics\x18\t \x03(\v2&.metalstack.infra.v2.SwitchRegisterNicR\x04nics\x12+\n" +
+ "\x02os\x18\n" +
+ " \x01(\v2\x1b.metalstack.api.v2.SwitchOSR\x02osB\a\n" +
+ "\x05_rackB\a\n" +
+ "\x05_roomB\x12\n" +
+ "\x10_management_userJ\x04\b\x01\x10\x02R\x06switch\"\x94\x01\n" +
+ "\x11SwitchRegisterNic\x12\x1f\n" +
+ "\x04name\x18\x01 \x01(\tB\v\xbaH\br\x06\xc0\xb3\xae\xb1\x02\x01R\x04name\x12+\n" +
+ "\n" +
+ "identifier\x18\x02 \x01(\tB\v\xbaH\br\x06\xc0\xb3\xae\xb1\x02\x01R\n" +
+ "identifier\x121\n" +
+ "\x05state\x18\x03 \x01(\v2\x1b.metalstack.api.v2.NicStateR\x05state\"R\n" +
"\x1dSwitchServiceRegisterResponse\x121\n" +
"\x06switch\x18\x01 \x01(\v2\x19.metalstack.api.v2.SwitchR\x06switch\"\xbb\x04\n" +
"\x1dSwitchServiceHeartbeatRequest\x12\x1d\n" +
@@ -406,44 +562,51 @@ func file_metalstack_infra_v2_switch_proto_rawDescGZIP() []byte {
return file_metalstack_infra_v2_switch_proto_rawDescData
}
-var file_metalstack_infra_v2_switch_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_metalstack_infra_v2_switch_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_metalstack_infra_v2_switch_proto_goTypes = []any{
(*SwitchServiceGetRequest)(nil), // 0: metalstack.infra.v2.SwitchServiceGetRequest
(*SwitchServiceGetResponse)(nil), // 1: metalstack.infra.v2.SwitchServiceGetResponse
(*SwitchServiceRegisterRequest)(nil), // 2: metalstack.infra.v2.SwitchServiceRegisterRequest
- (*SwitchServiceRegisterResponse)(nil), // 3: metalstack.infra.v2.SwitchServiceRegisterResponse
- (*SwitchServiceHeartbeatRequest)(nil), // 4: metalstack.infra.v2.SwitchServiceHeartbeatRequest
- (*SwitchServiceHeartbeatResponse)(nil), // 5: metalstack.infra.v2.SwitchServiceHeartbeatResponse
- nil, // 6: metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry
- nil, // 7: metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry
- (*v2.Switch)(nil), // 8: metalstack.api.v2.Switch
- (*durationpb.Duration)(nil), // 9: google.protobuf.Duration
- (*v2.SwitchSync)(nil), // 10: metalstack.api.v2.SwitchSync
- (v2.SwitchPortStatus)(0), // 11: metalstack.api.v2.SwitchPortStatus
- (*v2.SwitchBGPPortState)(nil), // 12: metalstack.api.v2.SwitchBGPPortState
+ (*SwitchRegisterNic)(nil), // 3: metalstack.infra.v2.SwitchRegisterNic
+ (*SwitchServiceRegisterResponse)(nil), // 4: metalstack.infra.v2.SwitchServiceRegisterResponse
+ (*SwitchServiceHeartbeatRequest)(nil), // 5: metalstack.infra.v2.SwitchServiceHeartbeatRequest
+ (*SwitchServiceHeartbeatResponse)(nil), // 6: metalstack.infra.v2.SwitchServiceHeartbeatResponse
+ nil, // 7: metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry
+ nil, // 8: metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry
+ (*v2.Switch)(nil), // 9: metalstack.api.v2.Switch
+ (*v2.Meta)(nil), // 10: metalstack.api.v2.Meta
+ (*v2.SwitchOS)(nil), // 11: metalstack.api.v2.SwitchOS
+ (*v2.NicState)(nil), // 12: metalstack.api.v2.NicState
+ (*durationpb.Duration)(nil), // 13: google.protobuf.Duration
+ (*v2.SwitchSync)(nil), // 14: metalstack.api.v2.SwitchSync
+ (v2.SwitchPortStatus)(0), // 15: metalstack.api.v2.SwitchPortStatus
+ (*v2.SwitchBGPPortState)(nil), // 16: metalstack.api.v2.SwitchBGPPortState
}
var file_metalstack_infra_v2_switch_proto_depIdxs = []int32{
- 8, // 0: metalstack.infra.v2.SwitchServiceGetResponse.switch:type_name -> metalstack.api.v2.Switch
- 8, // 1: metalstack.infra.v2.SwitchServiceRegisterRequest.switch:type_name -> metalstack.api.v2.Switch
- 8, // 2: metalstack.infra.v2.SwitchServiceRegisterResponse.switch:type_name -> metalstack.api.v2.Switch
- 9, // 3: metalstack.infra.v2.SwitchServiceHeartbeatRequest.duration:type_name -> google.protobuf.Duration
- 6, // 4: metalstack.infra.v2.SwitchServiceHeartbeatRequest.port_states:type_name -> metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry
- 7, // 5: metalstack.infra.v2.SwitchServiceHeartbeatRequest.bgp_port_states:type_name -> metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry
- 10, // 6: metalstack.infra.v2.SwitchServiceHeartbeatResponse.last_sync:type_name -> metalstack.api.v2.SwitchSync
- 10, // 7: metalstack.infra.v2.SwitchServiceHeartbeatResponse.last_sync_error:type_name -> metalstack.api.v2.SwitchSync
- 11, // 8: metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry.value:type_name -> metalstack.api.v2.SwitchPortStatus
- 12, // 9: metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry.value:type_name -> metalstack.api.v2.SwitchBGPPortState
- 0, // 10: metalstack.infra.v2.SwitchService.Get:input_type -> metalstack.infra.v2.SwitchServiceGetRequest
- 2, // 11: metalstack.infra.v2.SwitchService.Register:input_type -> metalstack.infra.v2.SwitchServiceRegisterRequest
- 4, // 12: metalstack.infra.v2.SwitchService.Heartbeat:input_type -> metalstack.infra.v2.SwitchServiceHeartbeatRequest
- 1, // 13: metalstack.infra.v2.SwitchService.Get:output_type -> metalstack.infra.v2.SwitchServiceGetResponse
- 3, // 14: metalstack.infra.v2.SwitchService.Register:output_type -> metalstack.infra.v2.SwitchServiceRegisterResponse
- 5, // 15: metalstack.infra.v2.SwitchService.Heartbeat:output_type -> metalstack.infra.v2.SwitchServiceHeartbeatResponse
- 13, // [13:16] is the sub-list for method output_type
- 10, // [10:13] is the sub-list for method input_type
- 10, // [10:10] is the sub-list for extension type_name
- 10, // [10:10] is the sub-list for extension extendee
- 0, // [0:10] is the sub-list for field type_name
+ 9, // 0: metalstack.infra.v2.SwitchServiceGetResponse.switch:type_name -> metalstack.api.v2.Switch
+ 10, // 1: metalstack.infra.v2.SwitchServiceRegisterRequest.meta:type_name -> metalstack.api.v2.Meta
+ 3, // 2: metalstack.infra.v2.SwitchServiceRegisterRequest.nics:type_name -> metalstack.infra.v2.SwitchRegisterNic
+ 11, // 3: metalstack.infra.v2.SwitchServiceRegisterRequest.os:type_name -> metalstack.api.v2.SwitchOS
+ 12, // 4: metalstack.infra.v2.SwitchRegisterNic.state:type_name -> metalstack.api.v2.NicState
+ 9, // 5: metalstack.infra.v2.SwitchServiceRegisterResponse.switch:type_name -> metalstack.api.v2.Switch
+ 13, // 6: metalstack.infra.v2.SwitchServiceHeartbeatRequest.duration:type_name -> google.protobuf.Duration
+ 7, // 7: metalstack.infra.v2.SwitchServiceHeartbeatRequest.port_states:type_name -> metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry
+ 8, // 8: metalstack.infra.v2.SwitchServiceHeartbeatRequest.bgp_port_states:type_name -> metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry
+ 14, // 9: metalstack.infra.v2.SwitchServiceHeartbeatResponse.last_sync:type_name -> metalstack.api.v2.SwitchSync
+ 14, // 10: metalstack.infra.v2.SwitchServiceHeartbeatResponse.last_sync_error:type_name -> metalstack.api.v2.SwitchSync
+ 15, // 11: metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntry.value:type_name -> metalstack.api.v2.SwitchPortStatus
+ 16, // 12: metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntry.value:type_name -> metalstack.api.v2.SwitchBGPPortState
+ 0, // 13: metalstack.infra.v2.SwitchService.Get:input_type -> metalstack.infra.v2.SwitchServiceGetRequest
+ 2, // 14: metalstack.infra.v2.SwitchService.Register:input_type -> metalstack.infra.v2.SwitchServiceRegisterRequest
+ 5, // 15: metalstack.infra.v2.SwitchService.Heartbeat:input_type -> metalstack.infra.v2.SwitchServiceHeartbeatRequest
+ 1, // 16: metalstack.infra.v2.SwitchService.Get:output_type -> metalstack.infra.v2.SwitchServiceGetResponse
+ 4, // 17: metalstack.infra.v2.SwitchService.Register:output_type -> metalstack.infra.v2.SwitchServiceRegisterResponse
+ 6, // 18: metalstack.infra.v2.SwitchService.Heartbeat:output_type -> metalstack.infra.v2.SwitchServiceHeartbeatResponse
+ 16, // [16:19] is the sub-list for method output_type
+ 13, // [13:16] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
}
func init() { file_metalstack_infra_v2_switch_proto_init() }
@@ -451,14 +614,15 @@ func file_metalstack_infra_v2_switch_proto_init() {
if File_metalstack_infra_v2_switch_proto != nil {
return
}
- file_metalstack_infra_v2_switch_proto_msgTypes[4].OneofWrappers = []any{}
+ file_metalstack_infra_v2_switch_proto_msgTypes[2].OneofWrappers = []any{}
+ file_metalstack_infra_v2_switch_proto_msgTypes[5].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_metalstack_infra_v2_switch_proto_rawDesc), len(file_metalstack_infra_v2_switch_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 8,
+ NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/go/tests/api_scopes_test.go b/go/tests/api_scopes_test.go
index fd5e0d8a..89d4ed1e 100644
--- a/go/tests/api_scopes_test.go
+++ b/go/tests/api_scopes_test.go
@@ -154,7 +154,11 @@ func Test_FieldNumbering(t *testing.T) {
// }
firstField = false
} else {
- if lastNumber+1 != *field.Number {
+ if slices.ContainsFunc(mt.ReservedRange, func(rng *descriptorpb.DescriptorProto_ReservedRange) bool {
+ return *field.Number >= *rng.Start && *field.Number <= *rng.End
+ }) {
+ // this is fine
+ } else if lastNumber+1 != *field.Number {
errs = append(errs, fmt.Errorf("%s %s %s %d != %d", filename, *mt.Name, *field.Name, lastNumber+1, *field.Number))
}
}
diff --git a/js/metalstack/admin/v2/switch_pb.d.ts b/js/metalstack/admin/v2/switch_pb.d.ts
index 34306cf1..e3026b43 100644
--- a/js/metalstack/admin/v2/switch_pb.d.ts
+++ b/js/metalstack/admin/v2/switch_pb.d.ts
@@ -1,8 +1,7 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
-import type { Timestamp } from "@bufbuild/protobuf/wkt";
import type { UpdateMeta } from "../../api/v2/common_pb";
import type { MachineQuery } from "../../api/v2/machine_pb";
-import type { Switch, SwitchNic, SwitchOS, SwitchPortStatus, SwitchQuery, SwitchReplaceMode, SwitchWithMachines } from "../../api/v2/switch_pb";
+import type { Switch, SwitchPortStatus, SwitchQuery, SwitchReplaceMode, SwitchWithMachines } from "../../api/v2/switch_pb";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file metalstack/admin/v2/switch.proto.
@@ -98,13 +97,6 @@ export type SwitchServiceUpdateRequest = Message<"metalstack.admin.v2.SwitchServ
* @generated from field: metalstack.api.v2.UpdateMeta update_meta = 2;
*/
updateMeta?: UpdateMeta | undefined;
- /**
- * UpdatedAt is the date when this entity was updated.
- * Must be part of the update request to ensure optimistic locking.
- *
- * @generated from field: google.protobuf.Timestamp updated_at = 3;
- */
- updatedAt?: Timestamp | undefined;
/**
* Description of the switch.
*
@@ -135,18 +127,6 @@ export type SwitchServiceUpdateRequest = Message<"metalstack.admin.v2.SwitchServ
* @generated from field: optional string console_command = 8;
*/
consoleCommand?: string | undefined;
- /**
- * Nics are the front panel ports of the switch.
- *
- * @generated from field: repeated metalstack.api.v2.SwitchNic nics = 9;
- */
- nics: SwitchNic[];
- /**
- * SwitchOs is the OS running on the switch.
- *
- * @generated from field: optional metalstack.api.v2.SwitchOS os = 10;
- */
- os?: SwitchOS | undefined;
};
/**
* Describes the message metalstack.admin.v2.SwitchServiceUpdateRequest.
diff --git a/js/metalstack/admin/v2/switch_pb.js b/js/metalstack/admin/v2/switch_pb.js
index 142370b6..d24867a8 100644
--- a/js/metalstack/admin/v2/switch_pb.js
+++ b/js/metalstack/admin/v2/switch_pb.js
@@ -3,7 +3,6 @@
/* eslint-disable */
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
-import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import { file_metalstack_api_v2_common } from "../../api/v2/common_pb";
import { file_metalstack_api_v2_machine } from "../../api/v2/machine_pb";
import { file_metalstack_api_v2_predefined_rules } from "../../api/v2/predefined_rules_pb";
@@ -11,7 +10,7 @@ import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
/**
* Describes the file metalstack/admin/v2/switch.proto.
*/
-export const file_metalstack_admin_v2_switch = /*@__PURE__*/ fileDesc("CiBtZXRhbHN0YWNrL2FkbWluL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5hZG1pbi52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKGFN3aXRjaFNlcnZpY2VMaXN0UmVxdWVzdBItCgVxdWVyeRgBIAEoCzIeLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFF1ZXJ5IkgKGVN3aXRjaFNlcnZpY2VMaXN0UmVzcG9uc2USKwoIc3dpdGNoZXMYASADKAsyGS5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2gizAQKGlN3aXRjaFNlcnZpY2VVcGRhdGVSZXF1ZXN0EhkKAmlkGAEgASgJQg26SApyCMCzrrECAWgBEjoKC3VwZGF0ZV9tZXRhGAIgASgLMh0ubWV0YWxzdGFjay5hcGkudjIuVXBkYXRlTWV0YUIGukgDyAEBEi4KCnVwZGF0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEiUKC2Rlc2NyaXB0aW9uGAQgASgJQgu6SAhyBsizrrECAUgAiAEBEkkKDHJlcGxhY2VfbW9kZRgFIAEoDjIkLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFJlcGxhY2VNb2RlQgi6SAWCAQIQAUgBiAEBEiMKDW1hbmFnZW1lbnRfaXAYBiABKAlCB7pI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ay5hZG1pbi52Mi5Td2l0Y2hTZXJ2aWNlRGVsZXRlUmVzcG9uc2UiCdLzGAEB4PMYARJ5CgdNaWdyYXRlEjAubWV0YWxzdGFjay5hZG1pbi52Mi5Td2l0Y2hTZXJ2aWNlTWlncmF0ZVJlcXVlc3QaMS5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VNaWdyYXRlUmVzcG9uc2UiCdLzGAEB4PMYARJwCgRQb3J0Ei0ubWV0YWxzdGFjay5hZG1pbi52Mi5Td2l0Y2hTZXJ2aWNlUG9ydFJlcXVlc3QaLi5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VQb3J0UmVzcG9uc2UiCdLzGAEB4PMYARKYAQoRQ29ubmVjdGVkTWFjaGluZXMSOi5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1JlcXVlc3QaOy5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1Jlc3BvbnNlIgrS8xgCAQLg8xgCQs8BChdjb20ubWV0YWxzdGFjay5hZG1pbi52MkILU3dpdGNoUHJvdG9QAVo5Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9hZG1pbi92MjthZG1pbnYyogIDTUFYqgITTWV0YWxzdGFjay5BZG1pbi5WMsoCE01ldGFsc3RhY2tcQWRtaW5cVjLiAh9NZXRhbHN0YWNrXEFkbWluXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6QWRtaW46OlYyYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp, file_metalstack_api_v2_common, file_metalstack_api_v2_machine, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
+export const file_metalstack_admin_v2_switch = /*@__PURE__*/ fileDesc("CiBtZXRhbHN0YWNrL2FkbWluL3YyL3N3aXRjaC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YARKYAQoRQ29ubmVjdGVkTWFjaGluZXMSOi5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1JlcXVlc3QaOy5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1Jlc3BvbnNlIgrS8xgCAQLg8xgCQs8BChdjb20ubWV0YWxzdGFjay5hZG1pbi52MkILU3dpdGNoUHJvdG9QAVo5Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9hZG1pbi92MjthZG1pbnYyogIDTUFYqgITTWV0YWxzdGFjay5BZG1pbi5WMsoCE01ldGFsc3RhY2tcQWRtaW5cVjLiAh9NZXRhbHN0YWNrXEFkbWluXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6QWRtaW46OlYyYgZwcm90bzM", [file_buf_validate_validate, file_metalstack_api_v2_common, file_metalstack_api_v2_machine, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
/**
* Describes the message metalstack.admin.v2.SwitchServiceGetRequest.
* Use `create(SwitchServiceGetRequestSchema)` to create a new message.
diff --git a/js/metalstack/admin/v2/switch_pb.ts b/js/metalstack/admin/v2/switch_pb.ts
index 4948faa9..8ed0105c 100644
--- a/js/metalstack/admin/v2/switch_pb.ts
+++ b/js/metalstack/admin/v2/switch_pb.ts
@@ -5,14 +5,12 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
-import type { Timestamp } from "@bufbuild/protobuf/wkt";
-import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import type { UpdateMeta } from "../../api/v2/common_pb";
import { file_metalstack_api_v2_common } from "../../api/v2/common_pb";
import type { MachineQuery } from "../../api/v2/machine_pb";
import { file_metalstack_api_v2_machine } from "../../api/v2/machine_pb";
import { file_metalstack_api_v2_predefined_rules } from "../../api/v2/predefined_rules_pb";
-import type { Switch, SwitchNic, SwitchOS, SwitchPortStatus, SwitchQuery, SwitchReplaceMode, SwitchWithMachines } from "../../api/v2/switch_pb";
+import type { Switch, SwitchPortStatus, SwitchQuery, SwitchReplaceMode, SwitchWithMachines } from "../../api/v2/switch_pb";
import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
import type { Message } from "@bufbuild/protobuf";
@@ -20,7 +18,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file metalstack/admin/v2/switch.proto.
*/
export const file_metalstack_admin_v2_switch: GenFile = /*@__PURE__*/
- fileDesc("CiBtZXRhbHN0YWNrL2FkbWluL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5hZG1pbi52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKGFN3aXRjaFNlcnZpY2VMaXN0UmVxdWVzdBItCgVxdWVyeRgBIAEoCzIeLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFF1ZXJ5IkgKGVN3aXRjaFNlcnZpY2VMaXN0UmVzcG9uc2USKwoIc3dpdGNoZXMYASADKAsyGS5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2gizAQKGlN3aXRjaFNlcnZpY2VVcGRhdGVSZXF1ZXN0EhkKAmlkGAEgASgJQg26SApyCMCzrrECAWgBEjoKC3VwZGF0ZV9tZXRhGAIgASgLMh0ubWV0YWxzdGFjay5hcGkudjIuVXBkYXRlTWV0YUIGukgDyAEBEi4KCnVwZGF0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEiUKC2Rlc2NyaXB0aW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", [file_buf_validate_validate, file_google_protobuf_timestamp, file_metalstack_api_v2_common, file_metalstack_api_v2_machine, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
+ fileDesc("CiBtZXRhbHN0YWNrL2FkbWluL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5hZG1pbi52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKGFN3aXRjaFNlcnZpY2VMaXN0UmVxdWVzdBItCgVxdWVyeRgBIAEoCzIeLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFF1ZXJ5IkgKGVN3aXRjaFNlcnZpY2VMaXN0UmVzcG9uc2USKwoIc3dpdGNoZXMYASADKAsyGS5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2gi4wMKGlN3aXRjaFNlcnZpY2VVcGRhdGVSZXF1ZXN0EhkKAmlkGAEgASgJQg26SApyCMCzrrECAWgBEjoKC3VwZGF0ZV9tZXRhGAIgASgLMh0ubWV0YWxzdGFjay5hcGkudjIuVXBkYXRlTWV0YUIGukgDyAEBEiUKC2Rlc2NyaXB0aW9uGAQgASgJQgu6SAhyBsizrrECAUgAiAEBEkkKDHJlcGxhY2VfbW9kZRgFIAEoDjIkLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFJlcGxhY2VNb2RlQgi6SAWCAQIQAUgBiAEBEiMKDW1hbmFnZW1lbnRfaXAYBiABKAlCB7pIBHICcAFIAogBARIpCg9tYW5hZ2VtZW50X3VzZXIYByABKAlCC7pICHIGwLOusQIBSAOIAQESKQoPY29uc29sZV9jb21tYW5kGAggASgJQgu6SAhyBsizrrECAUgEiAEBQg4KDF9kZXNjcmlwdGlvbkIPCg1fcmVwbGFjZV9tb2RlQhAKDl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0ubWV0YWxzdGFjay5hZG1pbi52Mi5Td2l0Y2hTZXJ2aWNlUG9ydFJlcXVlc3QaLi5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VQb3J0UmVzcG9uc2UiCdLzGAEB4PMYARKYAQoRQ29ubmVjdGVkTWFjaGluZXMSOi5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1JlcXVlc3QaOy5tZXRhbHN0YWNrLmFkbWluLnYyLlN3aXRjaFNlcnZpY2VDb25uZWN0ZWRNYWNoaW5lc1Jlc3BvbnNlIgrS8xgCAQLg8xgCQs8BChdjb20ubWV0YWxzdGFjay5hZG1pbi52MkILU3dpdGNoUHJvdG9QAVo5Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9hZG1pbi92MjthZG1pbnYyogIDTUFYqgITTWV0YWxzdGFjay5BZG1pbi5WMsoCE01ldGFsc3RhY2tcQWRtaW5cVjLiAh9NZXRhbHN0YWNrXEFkbWluXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6QWRtaW46OlYyYgZwcm90bzM", [file_buf_validate_validate, file_metalstack_api_v2_common, file_metalstack_api_v2_machine, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
/**
* SwitchServiceGetRequest is the request payload for getting a switch.
@@ -126,14 +124,6 @@ export type SwitchServiceUpdateRequest = Message<"metalstack.admin.v2.SwitchServ
*/
updateMeta?: UpdateMeta | undefined;
- /**
- * UpdatedAt is the date when this entity was updated.
- * Must be part of the update request to ensure optimistic locking.
- *
- * @generated from field: google.protobuf.Timestamp updated_at = 3;
- */
- updatedAt?: Timestamp | undefined;
-
/**
* Description of the switch.
*
@@ -168,20 +158,6 @@ export type SwitchServiceUpdateRequest = Message<"metalstack.admin.v2.SwitchServ
* @generated from field: optional string console_command = 8;
*/
consoleCommand?: string | undefined;
-
- /**
- * Nics are the front panel ports of the switch.
- *
- * @generated from field: repeated metalstack.api.v2.SwitchNic nics = 9;
- */
- nics: SwitchNic[];
-
- /**
- * SwitchOs is the OS running on the switch.
- *
- * @generated from field: optional metalstack.api.v2.SwitchOS os = 10;
- */
- os?: SwitchOS | undefined;
};
/**
diff --git a/js/metalstack/infra/v2/switch_pb.d.ts b/js/metalstack/infra/v2/switch_pb.d.ts
index d018fccc..122b04d9 100644
--- a/js/metalstack/infra/v2/switch_pb.d.ts
+++ b/js/metalstack/infra/v2/switch_pb.d.ts
@@ -1,6 +1,7 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { Duration } from "@bufbuild/protobuf/wkt";
-import type { Switch, SwitchBGPPortState, SwitchPortStatus, SwitchSync } from "../../api/v2/switch_pb";
+import type { Meta } from "../../api/v2/common_pb";
+import type { NicState, Switch, SwitchBGPPortState, SwitchOS, SwitchPortStatus, SwitchSync } from "../../api/v2/switch_pb";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file metalstack/infra/v2/switch.proto.
@@ -49,17 +50,95 @@ export declare const SwitchServiceGetResponseSchema: GenMessage & {
/**
- * Switch to register.
+ * Id of the switch.
*
- * @generated from field: metalstack.api.v2.Switch switch = 1;
+ * @generated from field: string id = 2;
*/
- switch?: Switch | undefined;
+ id: string;
+ /**
+ * Meta for this switch.
+ *
+ * @generated from field: metalstack.api.v2.Meta meta = 3;
+ */
+ meta?: Meta | undefined;
+ /**
+ * Rack ID if the switch resides in a rack.
+ *
+ * @generated from field: optional string rack = 4;
+ */
+ rack?: string | undefined;
+ /**
+ * Room ID if the switch resides in a room.
+ *
+ * @generated from field: optional string room = 5;
+ */
+ room?: string | undefined;
+ /**
+ * Partition the switch belongs to.
+ *
+ * @generated from field: string partition = 6;
+ */
+ partition: string;
+ /**
+ * ManagementIp is the switch's IP for management access.
+ *
+ * @generated from field: string management_ip = 7;
+ */
+ managementIp: string;
+ /**
+ * ManagementUser is the user name to use for management access.
+ *
+ * @generated from field: optional string management_user = 8;
+ */
+ managementUser?: string | undefined;
+ /**
+ * Nics are the front panel ports of the switch.
+ *
+ * @generated from field: repeated metalstack.infra.v2.SwitchRegisterNic nics = 9;
+ */
+ nics: SwitchRegisterNic[];
+ /**
+ * SwitchOs is the OS running on the switch.
+ *
+ * @generated from field: metalstack.api.v2.SwitchOS os = 10;
+ */
+ os?: SwitchOS | undefined;
};
/**
* Describes the message metalstack.infra.v2.SwitchServiceRegisterRequest.
* Use `create(SwitchServiceRegisterRequestSchema)` to create a new message.
*/
export declare const SwitchServiceRegisterRequestSchema: GenMessage;
+/**
+ * SwitchRegisterNic is the switch nic used when registering a switch at the api.
+ *
+ * @generated from message metalstack.infra.v2.SwitchRegisterNic
+ */
+export type SwitchRegisterNic = Message<"metalstack.infra.v2.SwitchRegisterNic"> & {
+ /**
+ * Name of the switch port.
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+ /**
+ * Identifier of the port.
+ *
+ * @generated from field: string identifier = 2;
+ */
+ identifier: string;
+ /**
+ * NicState describes the current state of the switch port.
+ *
+ * @generated from field: metalstack.api.v2.NicState state = 3;
+ */
+ state?: NicState | undefined;
+};
+/**
+ * Describes the message metalstack.infra.v2.SwitchRegisterNic.
+ * Use `create(SwitchRegisterNicSchema)` to create a new message.
+ */
+export declare const SwitchRegisterNicSchema: GenMessage;
/**
* SwitchServiceRegisterResponse is the response payload for registering a switch.
*
diff --git a/js/metalstack/infra/v2/switch_pb.js b/js/metalstack/infra/v2/switch_pb.js
index 582c3eff..f2259b1a 100644
--- a/js/metalstack/infra/v2/switch_pb.js
+++ b/js/metalstack/infra/v2/switch_pb.js
@@ -10,7 +10,7 @@ import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
/**
* Describes the file metalstack/infra/v2/switch.proto.
*/
-export const file_metalstack_infra_v2_switch = /*@__PURE__*/ fileDesc("CiBtZXRhbHN0YWNrL2luZnJhL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5pbmZ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ydGJlYXRSZXNwb25zZRIKCgJpZBgBIAEoCRIwCglsYXN0X3N5bmMYAiABKAsyHS5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2hTeW5jEjYKD2xhc3Rfc3luY19lcnJvchgDIAEoCzIdLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaFN5bmMy/gIKDVN3aXRjaFNlcnZpY2USbgoDR2V0EiwubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBotLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUdldFJlc3BvbnNlIgrg8xgC6vMYAgECEnwKCFJlZ2lzdGVyEjEubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlUmVnaXN0ZXJSZXF1ZXN0GjIubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlUmVnaXN0ZXJSZXNwb25zZSIJ4PMYAurzGAEBEn8KCUhlYXJ0YmVhdBIyLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QaMy5tZXRhbHN0YWNrLmluZnJhLnYyLlN3aXRjaFNlcnZpY2VIZWFydGJlYXRSZXNwb25zZSIJ4PMYAurzGAEBQs8BChdjb20ubWV0YWxzdGFjay5pbmZyYS52MkILU3dpdGNoUHJvdG9QAVo5Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9pbmZyYS92MjtpbmZyYXYyogIDTUlYqgITTWV0YWxzdGFjay5JbmZyYS5WMsoCE01ldGFsc3RhY2tcSW5mcmFcVjLiAh9NZXRhbHN0YWNrXEluZnJhXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6SW5mcmE6OlYyYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_duration, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
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K4PMYAurzGAIBAhJ8CghSZWdpc3RlchIxLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZVJlZ2lzdGVyUmVxdWVzdBoyLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZVJlZ2lzdGVyUmVzcG9uc2UiCeDzGALq8xgBARJ/CglIZWFydGJlYXQSMi5tZXRhbHN0YWNrLmluZnJhLnYyLlN3aXRjaFNlcnZpY2VIZWFydGJlYXRSZXF1ZXN0GjMubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlSGVhcnRiZWF0UmVzcG9uc2UiCeDzGALq8xgBAULPAQoXY29tLm1ldGFsc3RhY2suaW5mcmEudjJCC1N3aXRjaFByb3RvUAFaOWdpdGh1Yi5jb20vbWV0YWwtc3RhY2svYXBpL2dvL21ldGFsc3RhY2svaW5mcmEvdjI7aW5mcmF2MqICA01JWKoCE01ldGFsc3RhY2suSW5mcmEuVjLKAhNNZXRhbHN0YWNrXEluZnJhXFYy4gIfTWV0YWxzdGFja1xJbmZyYVxWMlxHUEJNZXRhZGF0YeoCFU1ldGFsc3RhY2s6OkluZnJhOjpWMmIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_duration, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
/**
* Describes the message metalstack.infra.v2.SwitchServiceGetRequest.
* Use `create(SwitchServiceGetRequestSchema)` to create a new message.
@@ -26,21 +26,26 @@ export const SwitchServiceGetResponseSchema = /*@__PURE__*/ messageDesc(file_met
* Use `create(SwitchServiceRegisterRequestSchema)` to create a new message.
*/
export const SwitchServiceRegisterRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 2);
+/**
+ * Describes the message metalstack.infra.v2.SwitchRegisterNic.
+ * Use `create(SwitchRegisterNicSchema)` to create a new message.
+ */
+export const SwitchRegisterNicSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 3);
/**
* Describes the message metalstack.infra.v2.SwitchServiceRegisterResponse.
* Use `create(SwitchServiceRegisterResponseSchema)` to create a new message.
*/
-export const SwitchServiceRegisterResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 3);
+export const SwitchServiceRegisterResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 4);
/**
* Describes the message metalstack.infra.v2.SwitchServiceHeartbeatRequest.
* Use `create(SwitchServiceHeartbeatRequestSchema)` to create a new message.
*/
-export const SwitchServiceHeartbeatRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 4);
+export const SwitchServiceHeartbeatRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 5);
/**
* Describes the message metalstack.infra.v2.SwitchServiceHeartbeatResponse.
* Use `create(SwitchServiceHeartbeatResponseSchema)` to create a new message.
*/
-export const SwitchServiceHeartbeatResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 5);
+export const SwitchServiceHeartbeatResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 6);
/**
* SwitchService provides infrastructure switch management operations.
*
diff --git a/js/metalstack/infra/v2/switch_pb.ts b/js/metalstack/infra/v2/switch_pb.ts
index 5f325834..28932ff7 100644
--- a/js/metalstack/infra/v2/switch_pb.ts
+++ b/js/metalstack/infra/v2/switch_pb.ts
@@ -7,9 +7,10 @@ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2
import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
import type { Duration } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_duration } from "@bufbuild/protobuf/wkt";
+import type { Meta } from "../../api/v2/common_pb";
import { file_metalstack_api_v2_common } from "../../api/v2/common_pb";
import { file_metalstack_api_v2_predefined_rules } from "../../api/v2/predefined_rules_pb";
-import type { Switch, SwitchBGPPortState, SwitchPortStatus, SwitchSync } from "../../api/v2/switch_pb";
+import type { NicState, Switch, SwitchBGPPortState, SwitchOS, SwitchPortStatus, SwitchSync } from "../../api/v2/switch_pb";
import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
import type { Message } from "@bufbuild/protobuf";
@@ -17,7 +18,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file metalstack/infra/v2/switch.proto.
*/
export const file_metalstack_infra_v2_switch: GenFile = /*@__PURE__*/
- fileDesc("CiBtZXRhbHN0YWNrL2luZnJhL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5pbmZyYS52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKHFN3aXRjaFNlcnZpY2VSZWdpc3RlclJlcXVlc3QSKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkoKHVN3aXRjaFNlcnZpY2VSZWdpc3RlclJlc3BvbnNlEikKBnN3aXRjaBgBIAEoCzIZLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaCLzAwodU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QSGQoCaWQYASABKAlCDbpICnIIwLOusQIBaAESKwoIZHVyYXRpb24YAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEgoFZXJyb3IYAyABKAlIAIgBARJXCgtwb3J0X3N0YXRlcxgEIAMoCzJCLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QuUG9ydFN0YXRlc0VudHJ5El4KD2JncF9wb3J0X3N0YXRlcxgFIAMoCzJFLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QuQmdwUG9ydFN0YXRlc0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XRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9pbmZyYS92MjtpbmZyYXYyogIDTUlYqgITTWV0YWxzdGFjay5JbmZyYS5WMsoCE01ldGFsc3RhY2tcSW5mcmFcVjLiAh9NZXRhbHN0YWNrXEluZnJhXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6SW5mcmE6OlYyYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_duration, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
+ fileDesc("CiBtZXRhbHN0YWNrL2luZnJhL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5pbmZyYS52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIp0DChxTd2l0Y2hTZXJ2aWNlUmVnaXN0ZXJSZXF1ZXN0EhkKAmlkGAIgASgJQg26SApyCMCzrrECAWgBEiUKBG1ldGEYAyABKAsyFy5tZXRhbHN0YWNrLmFwaS52Mi5NZXRhEh4KBHJhY2sYBCABKAlCC7pICHIGwLOusQIBSACIAQESHgoEcm9vbRgFIAEoCUILukgIcgbAs66xAgFIAYgBARIeCglwYXJ0aXRpb24YBiABKAlCC7pICHIG0LOusQIBEh4KDW1hbmFnZW1lbnRfaXAYByABKAlCB7pIBHICcAESKAoPbWFuYWdlbWVudF91c2VyGAggASgJQgq6SAdyBRACGIABSAKIAQESNAoEbmljcxgJIAMoCzImLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoUmVnaXN0ZXJOaWMSJwoCb3MYCiABKAsyGy5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2hPU0IHCgVfcmFja0IHCgVfcm9vbUISChBfbWFuYWdlbWVudF91c2VySgQIARACU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ay5hcGkudjIuU3dpdGNoU3luYxI2Cg9sYXN0X3N5bmNfZXJyb3IYAyABKAsyHS5tZXRhbHN0YWNrLmFwaS52Mi5Td2l0Y2hTeW5jMv4CCg1Td2l0Y2hTZXJ2aWNlEm4KA0dldBIsLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUdldFJlcXVlc3QaLS5tZXRhbHN0YWNrLmluZnJhLnYyLlN3aXRjaFNlcnZpY2VHZXRSZXNwb25zZSIK4PMYAurzGAIBAhJ8CghSZWdpc3RlchIxLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZVJlZ2lzdGVyUmVxdWVzdBoyLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZVJlZ2lzdGVyUmVzcG9uc2UiCeDzGALq8xgBARJ/CglIZWFydGJlYXQSMi5tZXRhbHN0YWNrLmluZnJhLnYyLlN3aXRjaFNlcnZpY2VIZWFydGJlYXRSZXF1ZXN0GjMubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlSGVhcnRiZWF0UmVzcG9uc2UiCeDzGALq8xgBAULPAQoXY29tLm1ldGFsc3RhY2suaW5mcmEudjJCC1N3aXRjaFByb3RvUAFaOWdpdGh1Yi5jb20vbWV0YWwtc3RhY2svYXBpL2dvL21ldGFsc3RhY2svaW5mcmEvdjI7aW5mcmF2MqICA01JWKoCE01ldGFsc3RhY2suSW5mcmEuVjLKAhNNZXRhbHN0YWNrXEluZnJhXFYy4gIfTWV0YWxzdGFja1xJbmZyYVxWMlxHUEJNZXRhZGF0YeoCFU1ldGFsc3RhY2s6OkluZnJhOjpWMmIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_duration, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
/**
* SwitchServiceGetRequest is the request payload for getting a switch.
@@ -68,11 +69,67 @@ export const SwitchServiceGetResponseSchema: GenMessage & {
/**
- * Switch to register.
+ * Id of the switch.
*
- * @generated from field: metalstack.api.v2.Switch switch = 1;
+ * @generated from field: string id = 2;
*/
- switch?: Switch | undefined;
+ id: string;
+
+ /**
+ * Meta for this switch.
+ *
+ * @generated from field: metalstack.api.v2.Meta meta = 3;
+ */
+ meta?: Meta | undefined;
+
+ /**
+ * Rack ID if the switch resides in a rack.
+ *
+ * @generated from field: optional string rack = 4;
+ */
+ rack?: string | undefined;
+
+ /**
+ * Room ID if the switch resides in a room.
+ *
+ * @generated from field: optional string room = 5;
+ */
+ room?: string | undefined;
+
+ /**
+ * Partition the switch belongs to.
+ *
+ * @generated from field: string partition = 6;
+ */
+ partition: string;
+
+ /**
+ * ManagementIp is the switch's IP for management access.
+ *
+ * @generated from field: string management_ip = 7;
+ */
+ managementIp: string;
+
+ /**
+ * ManagementUser is the user name to use for management access.
+ *
+ * @generated from field: optional string management_user = 8;
+ */
+ managementUser?: string | undefined;
+
+ /**
+ * Nics are the front panel ports of the switch.
+ *
+ * @generated from field: repeated metalstack.infra.v2.SwitchRegisterNic nics = 9;
+ */
+ nics: SwitchRegisterNic[];
+
+ /**
+ * SwitchOs is the OS running on the switch.
+ *
+ * @generated from field: metalstack.api.v2.SwitchOS os = 10;
+ */
+ os?: SwitchOS | undefined;
};
/**
@@ -82,6 +139,41 @@ export type SwitchServiceRegisterRequest = Message<"metalstack.infra.v2.SwitchSe
export const SwitchServiceRegisterRequestSchema: GenMessage = /*@__PURE__*/
messageDesc(file_metalstack_infra_v2_switch, 2);
+/**
+ * SwitchRegisterNic is the switch nic used when registering a switch at the api.
+ *
+ * @generated from message metalstack.infra.v2.SwitchRegisterNic
+ */
+export type SwitchRegisterNic = Message<"metalstack.infra.v2.SwitchRegisterNic"> & {
+ /**
+ * Name of the switch port.
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+
+ /**
+ * Identifier of the port.
+ *
+ * @generated from field: string identifier = 2;
+ */
+ identifier: string;
+
+ /**
+ * NicState describes the current state of the switch port.
+ *
+ * @generated from field: metalstack.api.v2.NicState state = 3;
+ */
+ state?: NicState | undefined;
+};
+
+/**
+ * Describes the message metalstack.infra.v2.SwitchRegisterNic.
+ * Use `create(SwitchRegisterNicSchema)` to create a new message.
+ */
+export const SwitchRegisterNicSchema: GenMessage = /*@__PURE__*/
+ messageDesc(file_metalstack_infra_v2_switch, 3);
+
/**
* SwitchServiceRegisterResponse is the response payload for registering a switch.
*
@@ -101,7 +193,7 @@ export type SwitchServiceRegisterResponse = Message<"metalstack.infra.v2.SwitchS
* Use `create(SwitchServiceRegisterResponseSchema)` to create a new message.
*/
export const SwitchServiceRegisterResponseSchema: GenMessage = /*@__PURE__*/
- messageDesc(file_metalstack_infra_v2_switch, 3);
+ messageDesc(file_metalstack_infra_v2_switch, 4);
/**
* SwitchServiceHeartbeatRequest is the request payload for sending a switch heartbeat.
@@ -150,7 +242,7 @@ export type SwitchServiceHeartbeatRequest = Message<"metalstack.infra.v2.SwitchS
* Use `create(SwitchServiceHeartbeatRequestSchema)` to create a new message.
*/
export const SwitchServiceHeartbeatRequestSchema: GenMessage = /*@__PURE__*/
- messageDesc(file_metalstack_infra_v2_switch, 4);
+ messageDesc(file_metalstack_infra_v2_switch, 5);
/**
* SwitchServiceHeartbeatResponse is the response payload for sending a switch heartbeat.
@@ -185,7 +277,7 @@ export type SwitchServiceHeartbeatResponse = Message<"metalstack.infra.v2.Switch
* Use `create(SwitchServiceHeartbeatResponseSchema)` to create a new message.
*/
export const SwitchServiceHeartbeatResponseSchema: GenMessage = /*@__PURE__*/
- messageDesc(file_metalstack_infra_v2_switch, 5);
+ messageDesc(file_metalstack_infra_v2_switch, 6);
/**
* SwitchService provides infrastructure switch management operations.
diff --git a/proto/metalstack/admin/v2/switch.proto b/proto/metalstack/admin/v2/switch.proto
index 4d8edd63..50f92b9e 100644
--- a/proto/metalstack/admin/v2/switch.proto
+++ b/proto/metalstack/admin/v2/switch.proto
@@ -3,7 +3,6 @@ syntax = "proto3";
package metalstack.admin.v2;
import "buf/validate/validate.proto";
-import "google/protobuf/timestamp.proto";
import "metalstack/api/v2/common.proto";
import "metalstack/api/v2/machine.proto";
import "metalstack/api/v2/predefined_rules.proto";
@@ -80,6 +79,13 @@ message SwitchServiceListResponse {
// SwitchServiceUpdateRequest is the request payload for updating a switch.
message SwitchServiceUpdateRequest {
+ reserved 3;
+ reserved "updated_at";
+ reserved 9;
+ reserved "nics";
+ reserved 10;
+ reserved "os";
+
// ID of the switch.
string id = 1 [(buf.validate.field).string = {
hostname: true
@@ -87,9 +93,6 @@ message SwitchServiceUpdateRequest {
}];
// UpdateMeta contains the timestamp and strategy to be used in this update request.
metalstack.api.v2.UpdateMeta update_meta = 2 [(buf.validate.field).required = true];
- // UpdatedAt is the date when this entity was updated.
- // Must be part of the update request to ensure optimistic locking.
- google.protobuf.Timestamp updated_at = 3;
// Description of the switch.
optional string description = 4 [(buf.validate.field).string.(metalstack.api.v2.is_description) = true];
// ReplaceMode is used to mark a switch ready for replacement.
@@ -100,10 +103,6 @@ message SwitchServiceUpdateRequest {
optional string management_user = 7 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
// ConsoleCommand is the command for accessing the switch's console.
optional string console_command = 8 [(buf.validate.field).string.(metalstack.api.v2.is_description) = true];
- // Nics are the front panel ports of the switch.
- repeated metalstack.api.v2.SwitchNic nics = 9;
- // SwitchOs is the OS running on the switch.
- optional metalstack.api.v2.SwitchOS os = 10;
}
// SwitchServiceUpdateResponse is the response payload for updating a switch.
diff --git a/proto/metalstack/infra/v2/switch.proto b/proto/metalstack/infra/v2/switch.proto
index cfa30660..6bb96239 100644
--- a/proto/metalstack/infra/v2/switch.proto
+++ b/proto/metalstack/infra/v2/switch.proto
@@ -45,8 +45,43 @@ message SwitchServiceGetResponse {
// SwitchServiceRegisterRequest is the request payload for registering a switch.
message SwitchServiceRegisterRequest {
- // Switch to register.
- metalstack.api.v2.Switch switch = 1;
+ reserved 1;
+ reserved "switch";
+
+ // Id of the switch.
+ string id = 2 [(buf.validate.field).string = {
+ hostname: true
+ [metalstack.api.v2.is_name]: true
+ }];
+ // Meta for this switch.
+ metalstack.api.v2.Meta meta = 3;
+ // Rack ID if the switch resides in a rack.
+ optional string rack = 4 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
+ // Room ID if the switch resides in a room.
+ optional string room = 5 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
+ // Partition the switch belongs to.
+ string partition = 6 [(buf.validate.field).string.(metalstack.api.v2.is_partition) = true];
+ // ManagementIp is the switch's IP for management access.
+ string management_ip = 7 [(buf.validate.field).string.ip = true];
+ // ManagementUser is the user name to use for management access.
+ optional string management_user = 8 [(buf.validate.field).string = {
+ min_len: 2
+ max_len: 128
+ }];
+ // Nics are the front panel ports of the switch.
+ repeated SwitchRegisterNic nics = 9;
+ // SwitchOs is the OS running on the switch.
+ metalstack.api.v2.SwitchOS os = 10;
+}
+
+// SwitchRegisterNic is the switch nic used when registering a switch at the api.
+message SwitchRegisterNic {
+ // Name of the switch port.
+ string name = 1 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
+ // Identifier of the port.
+ string identifier = 2 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
+ // NicState describes the current state of the switch port.
+ metalstack.api.v2.NicState state = 3;
}
// SwitchServiceRegisterResponse is the response payload for registering a switch.
diff --git a/python/metalstack/admin/v2/switch_pb2.py b/python/metalstack/admin/v2/switch_pb2.py
index 36f51994..a8f0f7da 100644
--- a/python/metalstack/admin/v2/switch_pb2.py
+++ b/python/metalstack/admin/v2/switch_pb2.py
@@ -23,14 +23,13 @@
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
-from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
from metalstack.api.v2 import machine_pb2 as metalstack_dot_api_dot_v2_dot_machine__pb2
from metalstack.api.v2 import predefined_rules_pb2 as metalstack_dot_api_dot_v2_dot_predefined__rules__pb2
from metalstack.api.v2 import switch_pb2 as metalstack_dot_api_dot_v2_dot_switch__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/admin/v2/switch.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/machine.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n\x17SwitchServiceGetRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\"M\n\x18SwitchServiceGetResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"P\n\x18SwitchServiceListRequest\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32\x1e.metalstack.api.v2.SwitchQueryR\x05query\"R\n\x19SwitchServiceListResponse\x12\x35\n\x08switches\x18\x01 \x03(\x0b\x32\x19.metalstack.api.v2.SwitchR\x08switches\"\xb9\x05\n\x1aSwitchServiceUpdateRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x46\n\x0bupdate_meta\x18\x02 \x01(\x0b\x32\x1d.metalstack.api.v2.UpdateMetaB\x06\xbaH\x03\xc8\x01\x01R\nupdateMeta\x12\x39\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x32\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x00R\x0b\x64\x65scription\x88\x01\x01\x12V\n\x0creplace_mode\x18\x05 \x01(\x0e\x32$.metalstack.api.v2.SwitchReplaceModeB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\x0breplaceMode\x88\x01\x01\x12\x31\n\rmanagement_ip\x18\x06 \x01(\tB\x07\xbaH\x04r\x02p\x01H\x02R\x0cmanagementIp\x88\x01\x01\x12\x39\n\x0fmanagement_user\x18\x07 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01H\x03R\x0emanagementUser\x88\x01\x01\x12\x39\n\x0f\x63onsole_command\x18\x08 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x04R\x0e\x63onsoleCommand\x88\x01\x01\x12\x30\n\x04nics\x18\t \x03(\x0b\x32\x1c.metalstack.api.v2.SwitchNicR\x04nics\x12\x30\n\x02os\x18\n \x01(\x0b\x32\x1b.metalstack.api.v2.SwitchOSH\x05R\x02os\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0f\n\r_replace_modeB\x10\n\x0e_management_ipB\x12\n\x10_management_userB\x12\n\x10_console_commandB\x05\n\x03_os\"P\n\x1bSwitchServiceUpdateResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"Q\n\x1aSwitchServiceDeleteRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x14\n\x05\x66orce\x18\x02 \x01(\x08R\x05\x66orce\"P\n\x1bSwitchServiceDeleteResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"y\n\x1bSwitchServiceMigrateRequest\x12,\n\nold_switch\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\toldSwitch\x12,\n\nnew_switch\x18\x02 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\tnewSwitch\"Q\n\x1cSwitchServiceMigrateResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xa8\x01\n\x18SwitchServicePortRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12&\n\x08nic_name\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\x07nicName\x12\x45\n\x06status\x18\x03 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x06status\"N\n\x19SwitchServicePortResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xa3\x01\n%SwitchServiceConnectedMachinesRequest\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32\x1e.metalstack.api.v2.SwitchQueryR\x05query\x12\x44\n\rmachine_query\x18\x02 \x01(\x0b\x32\x1f.metalstack.api.v2.MachineQueryR\x0cmachineQuery\"\x85\x01\n&SwitchServiceConnectedMachinesResponse\x12[\n\x16switches_with_machines\x18\x01 \x03(\x0b\x32%.metalstack.api.v2.SwitchWithMachinesR\x14switchesWithMachines2\xea\x06\n\rSwitchService\x12n\n\x03Get\x12,.metalstack.admin.v2.SwitchServiceGetRequest\x1a-.metalstack.admin.v2.SwitchServiceGetResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x12q\n\x04List\x12-.metalstack.admin.v2.SwitchServiceListRequest\x1a..metalstack.admin.v2.SwitchServiceListResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x12v\n\x06Update\x12/.metalstack.admin.v2.SwitchServiceUpdateRequest\x1a\x30.metalstack.admin.v2.SwitchServiceUpdateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12v\n\x06\x44\x65lete\x12/.metalstack.admin.v2.SwitchServiceDeleteRequest\x1a\x30.metalstack.admin.v2.SwitchServiceDeleteResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12y\n\x07Migrate\x12\x30.metalstack.admin.v2.SwitchServiceMigrateRequest\x1a\x31.metalstack.admin.v2.SwitchServiceMigrateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12p\n\x04Port\x12-.metalstack.admin.v2.SwitchServicePortRequest\x1a..metalstack.admin.v2.SwitchServicePortResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12\x98\x01\n\x11\x43onnectedMachines\x12:.metalstack.admin.v2.SwitchServiceConnectedMachinesRequest\x1a;.metalstack.admin.v2.SwitchServiceConnectedMachinesResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x42\xcf\x01\n\x17\x63om.metalstack.admin.v2B\x0bSwitchProtoP\x01Z9github.com/metal-stack/api/go/metalstack/admin/v2;adminv2\xa2\x02\x03MAX\xaa\x02\x13Metalstack.Admin.V2\xca\x02\x13Metalstack\\Admin\\V2\xe2\x02\x1fMetalstack\\Admin\\V2\\GPBMetadata\xea\x02\x15Metalstack::Admin::V2b\x06proto3')
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/admin/v2/switch.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/machine.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n\x17SwitchServiceGetRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\"M\n\x18SwitchServiceGetResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"P\n\x18SwitchServiceListRequest\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32\x1e.metalstack.api.v2.SwitchQueryR\x05query\"R\n\x19SwitchServiceListResponse\x12\x35\n\x08switches\x18\x01 \x03(\x0b\x32\x19.metalstack.api.v2.SwitchR\x08switches\"\xbb\x04\n\x1aSwitchServiceUpdateRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x46\n\x0bupdate_meta\x18\x02 \x01(\x0b\x32\x1d.metalstack.api.v2.UpdateMetaB\x06\xbaH\x03\xc8\x01\x01R\nupdateMeta\x12\x32\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x00R\x0b\x64\x65scription\x88\x01\x01\x12V\n\x0creplace_mode\x18\x05 \x01(\x0e\x32$.metalstack.api.v2.SwitchReplaceModeB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\x0breplaceMode\x88\x01\x01\x12\x31\n\rmanagement_ip\x18\x06 \x01(\tB\x07\xbaH\x04r\x02p\x01H\x02R\x0cmanagementIp\x88\x01\x01\x12\x39\n\x0fmanagement_user\x18\x07 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01H\x03R\x0emanagementUser\x88\x01\x01\x12\x39\n\x0f\x63onsole_command\x18\x08 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x04R\x0e\x63onsoleCommand\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0f\n\r_replace_modeB\x10\n\x0e_management_ipB\x12\n\x10_management_userB\x12\n\x10_console_commandJ\x04\x08\x03\x10\x04J\x04\x08\t\x10\nJ\x04\x08\n\x10\x0bR\nupdated_atR\x04nicsR\x02os\"P\n\x1bSwitchServiceUpdateResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"Q\n\x1aSwitchServiceDeleteRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x14\n\x05\x66orce\x18\x02 \x01(\x08R\x05\x66orce\"P\n\x1bSwitchServiceDeleteResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"y\n\x1bSwitchServiceMigrateRequest\x12,\n\nold_switch\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\toldSwitch\x12,\n\nnew_switch\x18\x02 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\tnewSwitch\"Q\n\x1cSwitchServiceMigrateResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xa8\x01\n\x18SwitchServicePortRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12&\n\x08nic_name\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\x07nicName\x12\x45\n\x06status\x18\x03 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x06status\"N\n\x19SwitchServicePortResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xa3\x01\n%SwitchServiceConnectedMachinesRequest\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32\x1e.metalstack.api.v2.SwitchQueryR\x05query\x12\x44\n\rmachine_query\x18\x02 \x01(\x0b\x32\x1f.metalstack.api.v2.MachineQueryR\x0cmachineQuery\"\x85\x01\n&SwitchServiceConnectedMachinesResponse\x12[\n\x16switches_with_machines\x18\x01 \x03(\x0b\x32%.metalstack.api.v2.SwitchWithMachinesR\x14switchesWithMachines2\xea\x06\n\rSwitchService\x12n\n\x03Get\x12,.metalstack.admin.v2.SwitchServiceGetRequest\x1a-.metalstack.admin.v2.SwitchServiceGetResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x12q\n\x04List\x12-.metalstack.admin.v2.SwitchServiceListRequest\x1a..metalstack.admin.v2.SwitchServiceListResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x12v\n\x06Update\x12/.metalstack.admin.v2.SwitchServiceUpdateRequest\x1a\x30.metalstack.admin.v2.SwitchServiceUpdateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12v\n\x06\x44\x65lete\x12/.metalstack.admin.v2.SwitchServiceDeleteRequest\x1a\x30.metalstack.admin.v2.SwitchServiceDeleteResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12y\n\x07Migrate\x12\x30.metalstack.admin.v2.SwitchServiceMigrateRequest\x1a\x31.metalstack.admin.v2.SwitchServiceMigrateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12p\n\x04Port\x12-.metalstack.admin.v2.SwitchServicePortRequest\x1a..metalstack.admin.v2.SwitchServicePortResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12\x98\x01\n\x11\x43onnectedMachines\x12:.metalstack.admin.v2.SwitchServiceConnectedMachinesRequest\x1a;.metalstack.admin.v2.SwitchServiceConnectedMachinesResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x42\xcf\x01\n\x17\x63om.metalstack.admin.v2B\x0bSwitchProtoP\x01Z9github.com/metal-stack/api/go/metalstack/admin/v2;adminv2\xa2\x02\x03MAX\xaa\x02\x13Metalstack.Admin.V2\xca\x02\x13Metalstack\\Admin\\V2\xe2\x02\x1fMetalstack\\Admin\\V2\\GPBMetadata\xea\x02\x15Metalstack::Admin::V2b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -80,34 +79,34 @@
_globals['_SWITCHSERVICE'].methods_by_name['Port']._serialized_options = b'\322\363\030\001\001\340\363\030\001'
_globals['_SWITCHSERVICE'].methods_by_name['ConnectedMachines']._loaded_options = None
_globals['_SWITCHSERVICE'].methods_by_name['ConnectedMachines']._serialized_options = b'\322\363\030\002\001\002\340\363\030\002'
- _globals['_SWITCHSERVICEGETREQUEST']._serialized_start=258
- _globals['_SWITCHSERVICEGETREQUEST']._serialized_end=314
- _globals['_SWITCHSERVICEGETRESPONSE']._serialized_start=316
- _globals['_SWITCHSERVICEGETRESPONSE']._serialized_end=393
- _globals['_SWITCHSERVICELISTREQUEST']._serialized_start=395
- _globals['_SWITCHSERVICELISTREQUEST']._serialized_end=475
- _globals['_SWITCHSERVICELISTRESPONSE']._serialized_start=477
- _globals['_SWITCHSERVICELISTRESPONSE']._serialized_end=559
- _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_start=562
- _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_end=1259
- _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_start=1261
- _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_end=1341
- _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_start=1343
- _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_end=1424
- _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_start=1426
- _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_end=1506
- _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_start=1508
- _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_end=1629
- _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_start=1631
- _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_end=1712
- _globals['_SWITCHSERVICEPORTREQUEST']._serialized_start=1715
- _globals['_SWITCHSERVICEPORTREQUEST']._serialized_end=1883
- _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_start=1885
- _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_end=1963
- _globals['_SWITCHSERVICECONNECTEDMACHINESREQUEST']._serialized_start=1966
- _globals['_SWITCHSERVICECONNECTEDMACHINESREQUEST']._serialized_end=2129
- _globals['_SWITCHSERVICECONNECTEDMACHINESRESPONSE']._serialized_start=2132
- _globals['_SWITCHSERVICECONNECTEDMACHINESRESPONSE']._serialized_end=2265
- _globals['_SWITCHSERVICE']._serialized_start=2268
- _globals['_SWITCHSERVICE']._serialized_end=3142
+ _globals['_SWITCHSERVICEGETREQUEST']._serialized_start=225
+ _globals['_SWITCHSERVICEGETREQUEST']._serialized_end=281
+ _globals['_SWITCHSERVICEGETRESPONSE']._serialized_start=283
+ _globals['_SWITCHSERVICEGETRESPONSE']._serialized_end=360
+ _globals['_SWITCHSERVICELISTREQUEST']._serialized_start=362
+ _globals['_SWITCHSERVICELISTREQUEST']._serialized_end=442
+ _globals['_SWITCHSERVICELISTRESPONSE']._serialized_start=444
+ _globals['_SWITCHSERVICELISTRESPONSE']._serialized_end=526
+ _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_start=529
+ _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_end=1100
+ _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_start=1102
+ _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_end=1182
+ _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_start=1184
+ _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_end=1265
+ _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_start=1267
+ _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_end=1347
+ _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_start=1349
+ _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_end=1470
+ _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_start=1472
+ _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_end=1553
+ _globals['_SWITCHSERVICEPORTREQUEST']._serialized_start=1556
+ _globals['_SWITCHSERVICEPORTREQUEST']._serialized_end=1724
+ _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_start=1726
+ _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_end=1804
+ _globals['_SWITCHSERVICECONNECTEDMACHINESREQUEST']._serialized_start=1807
+ _globals['_SWITCHSERVICECONNECTEDMACHINESREQUEST']._serialized_end=1970
+ _globals['_SWITCHSERVICECONNECTEDMACHINESRESPONSE']._serialized_start=1973
+ _globals['_SWITCHSERVICECONNECTEDMACHINESRESPONSE']._serialized_end=2106
+ _globals['_SWITCHSERVICE']._serialized_start=2109
+ _globals['_SWITCHSERVICE']._serialized_end=2983
# @@protoc_insertion_point(module_scope)
diff --git a/python/metalstack/admin/v2/switch_pb2.pyi b/python/metalstack/admin/v2/switch_pb2.pyi
index 3fe369a6..80d488eb 100644
--- a/python/metalstack/admin/v2/switch_pb2.pyi
+++ b/python/metalstack/admin/v2/switch_pb2.pyi
@@ -1,7 +1,4 @@
-import datetime
-
from buf.validate import validate_pb2 as _validate_pb2
-from google.protobuf import timestamp_pb2 as _timestamp_pb2
from metalstack.api.v2 import common_pb2 as _common_pb2
from metalstack.api.v2 import machine_pb2 as _machine_pb2
from metalstack.api.v2 import predefined_rules_pb2 as _predefined_rules_pb2
@@ -39,28 +36,22 @@ class SwitchServiceListResponse(_message.Message):
def __init__(self, switches: _Optional[_Iterable[_Union[_switch_pb2.Switch, _Mapping]]] = ...) -> None: ...
class SwitchServiceUpdateRequest(_message.Message):
- __slots__ = ("id", "update_meta", "updated_at", "description", "replace_mode", "management_ip", "management_user", "console_command", "nics", "os")
+ __slots__ = ("id", "update_meta", "description", "replace_mode", "management_ip", "management_user", "console_command")
ID_FIELD_NUMBER: _ClassVar[int]
UPDATE_META_FIELD_NUMBER: _ClassVar[int]
- UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
REPLACE_MODE_FIELD_NUMBER: _ClassVar[int]
MANAGEMENT_IP_FIELD_NUMBER: _ClassVar[int]
MANAGEMENT_USER_FIELD_NUMBER: _ClassVar[int]
CONSOLE_COMMAND_FIELD_NUMBER: _ClassVar[int]
- NICS_FIELD_NUMBER: _ClassVar[int]
- OS_FIELD_NUMBER: _ClassVar[int]
id: str
update_meta: _common_pb2.UpdateMeta
- updated_at: _timestamp_pb2.Timestamp
description: str
replace_mode: _switch_pb2.SwitchReplaceMode
management_ip: str
management_user: str
console_command: str
- nics: _containers.RepeatedCompositeFieldContainer[_switch_pb2.SwitchNic]
- os: _switch_pb2.SwitchOS
- def __init__(self, id: _Optional[str] = ..., update_meta: _Optional[_Union[_common_pb2.UpdateMeta, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., description: _Optional[str] = ..., replace_mode: _Optional[_Union[_switch_pb2.SwitchReplaceMode, str]] = ..., management_ip: _Optional[str] = ..., management_user: _Optional[str] = ..., console_command: _Optional[str] = ..., nics: _Optional[_Iterable[_Union[_switch_pb2.SwitchNic, _Mapping]]] = ..., os: _Optional[_Union[_switch_pb2.SwitchOS, _Mapping]] = ...) -> None: ...
+ def __init__(self, id: _Optional[str] = ..., update_meta: _Optional[_Union[_common_pb2.UpdateMeta, _Mapping]] = ..., description: _Optional[str] = ..., replace_mode: _Optional[_Union[_switch_pb2.SwitchReplaceMode, str]] = ..., management_ip: _Optional[str] = ..., management_user: _Optional[str] = ..., console_command: _Optional[str] = ...) -> None: ...
class SwitchServiceUpdateResponse(_message.Message):
__slots__ = ("switch",)
diff --git a/python/metalstack/infra/v2/switch_pb2.py b/python/metalstack/infra/v2/switch_pb2.py
index 74cf5922..7e98cea4 100644
--- a/python/metalstack/infra/v2/switch_pb2.py
+++ b/python/metalstack/infra/v2/switch_pb2.py
@@ -29,7 +29,7 @@
from metalstack.api.v2 import switch_pb2 as metalstack_dot_api_dot_v2_dot_switch__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/infra/v2/switch.proto\x12\x13metalstack.infra.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n\x17SwitchServiceGetRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\"M\n\x18SwitchServiceGetResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"Q\n\x1cSwitchServiceRegisterRequest\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"R\n\x1dSwitchServiceRegisterResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xbb\x04\n\x1dSwitchServiceHeartbeatRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x35\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x19\n\x05\x65rror\x18\x03 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x12\x63\n\x0bport_states\x18\x04 \x03(\x0b\x32\x42.metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntryR\nportStates\x12m\n\x0f\x62gp_port_states\x18\x05 \x03(\x0b\x32\x45.metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntryR\rbgpPortStates\x1a\x62\n\x0fPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x39\n\x05value\x18\x02 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusR\x05value:\x02\x38\x01\x1ag\n\x12\x42gpPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12;\n\x05value\x18\x02 \x01(\x0b\x32%.metalstack.api.v2.SwitchBGPPortStateR\x05value:\x02\x38\x01\x42\x08\n\x06_error\"\xb3\x01\n\x1eSwitchServiceHeartbeatResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tlast_sync\x18\x02 \x01(\x0b\x32\x1d.metalstack.api.v2.SwitchSyncR\x08lastSync\x12\x45\n\x0flast_sync_error\x18\x03 \x01(\x0b\x32\x1d.metalstack.api.v2.SwitchSyncR\rlastSyncError2\xfe\x02\n\rSwitchService\x12n\n\x03Get\x12,.metalstack.infra.v2.SwitchServiceGetRequest\x1a-.metalstack.infra.v2.SwitchServiceGetResponse\"\n\xe0\xf3\x18\x02\xea\xf3\x18\x02\x01\x02\x12|\n\x08Register\x12\x31.metalstack.infra.v2.SwitchServiceRegisterRequest\x1a\x32.metalstack.infra.v2.SwitchServiceRegisterResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x12\x7f\n\tHeartbeat\x12\x32.metalstack.infra.v2.SwitchServiceHeartbeatRequest\x1a\x33.metalstack.infra.v2.SwitchServiceHeartbeatResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x42\xcf\x01\n\x17\x63om.metalstack.infra.v2B\x0bSwitchProtoP\x01Z9github.com/metal-stack/api/go/metalstack/infra/v2;infrav2\xa2\x02\x03MIX\xaa\x02\x13Metalstack.Infra.V2\xca\x02\x13Metalstack\\Infra\\V2\xe2\x02\x1fMetalstack\\Infra\\V2\\GPBMetadata\xea\x02\x15Metalstack::Infra::V2b\x06proto3')
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/infra/v2/switch.proto\x12\x13metalstack.infra.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n\x17SwitchServiceGetRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\"M\n\x18SwitchServiceGetResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xe6\x03\n\x1cSwitchServiceRegisterRequest\x12\x1d\n\x02id\x18\x02 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12+\n\x04meta\x18\x03 \x01(\x0b\x32\x17.metalstack.api.v2.MetaR\x04meta\x12$\n\x04rack\x18\x04 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01H\x00R\x04rack\x88\x01\x01\x12$\n\x04room\x18\x05 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01H\x01R\x04room\x88\x01\x01\x12)\n\tpartition\x18\x06 \x01(\tB\x0b\xbaH\x08r\x06\xd0\xb3\xae\xb1\x02\x01R\tpartition\x12,\n\rmanagement_ip\x18\x07 \x01(\tB\x07\xbaH\x04r\x02p\x01R\x0cmanagementIp\x12\x38\n\x0fmanagement_user\x18\x08 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x02R\x0emanagementUser\x88\x01\x01\x12:\n\x04nics\x18\t \x03(\x0b\x32&.metalstack.infra.v2.SwitchRegisterNicR\x04nics\x12+\n\x02os\x18\n \x01(\x0b\x32\x1b.metalstack.api.v2.SwitchOSR\x02osB\x07\n\x05_rackB\x07\n\x05_roomB\x12\n\x10_management_userJ\x04\x08\x01\x10\x02R\x06switch\"\x94\x01\n\x11SwitchRegisterNic\x12\x1f\n\x04name\x18\x01 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\x04name\x12+\n\nidentifier\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\nidentifier\x12\x31\n\x05state\x18\x03 \x01(\x0b\x32\x1b.metalstack.api.v2.NicStateR\x05state\"R\n\x1dSwitchServiceRegisterResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\xbb\x04\n\x1dSwitchServiceHeartbeatRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\x12\x35\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x19\n\x05\x65rror\x18\x03 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x12\x63\n\x0bport_states\x18\x04 \x03(\x0b\x32\x42.metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntryR\nportStates\x12m\n\x0f\x62gp_port_states\x18\x05 \x03(\x0b\x32\x45.metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntryR\rbgpPortStates\x1a\x62\n\x0fPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x39\n\x05value\x18\x02 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusR\x05value:\x02\x38\x01\x1ag\n\x12\x42gpPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12;\n\x05value\x18\x02 \x01(\x0b\x32%.metalstack.api.v2.SwitchBGPPortStateR\x05value:\x02\x38\x01\x42\x08\n\x06_error\"\xb3\x01\n\x1eSwitchServiceHeartbeatResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tlast_sync\x18\x02 \x01(\x0b\x32\x1d.metalstack.api.v2.SwitchSyncR\x08lastSync\x12\x45\n\x0flast_sync_error\x18\x03 \x01(\x0b\x32\x1d.metalstack.api.v2.SwitchSyncR\rlastSyncError2\xfe\x02\n\rSwitchService\x12n\n\x03Get\x12,.metalstack.infra.v2.SwitchServiceGetRequest\x1a-.metalstack.infra.v2.SwitchServiceGetResponse\"\n\xe0\xf3\x18\x02\xea\xf3\x18\x02\x01\x02\x12|\n\x08Register\x12\x31.metalstack.infra.v2.SwitchServiceRegisterRequest\x1a\x32.metalstack.infra.v2.SwitchServiceRegisterResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x12\x7f\n\tHeartbeat\x12\x32.metalstack.infra.v2.SwitchServiceHeartbeatRequest\x1a\x33.metalstack.infra.v2.SwitchServiceHeartbeatResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x42\xcf\x01\n\x17\x63om.metalstack.infra.v2B\x0bSwitchProtoP\x01Z9github.com/metal-stack/api/go/metalstack/infra/v2;infrav2\xa2\x02\x03MIX\xaa\x02\x13Metalstack.Infra.V2\xca\x02\x13Metalstack\\Infra\\V2\xe2\x02\x1fMetalstack\\Infra\\V2\\GPBMetadata\xea\x02\x15Metalstack::Infra::V2b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -39,6 +39,22 @@
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.metalstack.infra.v2B\013SwitchProtoP\001Z9github.com/metal-stack/api/go/metalstack/infra/v2;infrav2\242\002\003MIX\252\002\023Metalstack.Infra.V2\312\002\023Metalstack\\Infra\\V2\342\002\037Metalstack\\Infra\\V2\\GPBMetadata\352\002\025Metalstack::Infra::V2'
_globals['_SWITCHSERVICEGETREQUEST'].fields_by_name['id']._loaded_options = None
_globals['_SWITCHSERVICEGETREQUEST'].fields_by_name['id']._serialized_options = b'\272H\nr\010h\001\300\263\256\261\002\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['id']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['id']._serialized_options = b'\272H\nr\010h\001\300\263\256\261\002\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['rack']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['rack']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['room']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['room']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['partition']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['partition']._serialized_options = b'\272H\010r\006\320\263\256\261\002\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['management_ip']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['management_ip']._serialized_options = b'\272H\004r\002p\001'
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['management_user']._loaded_options = None
+ _globals['_SWITCHSERVICEREGISTERREQUEST'].fields_by_name['management_user']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
+ _globals['_SWITCHREGISTERNIC'].fields_by_name['name']._loaded_options = None
+ _globals['_SWITCHREGISTERNIC'].fields_by_name['name']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
+ _globals['_SWITCHREGISTERNIC'].fields_by_name['identifier']._loaded_options = None
+ _globals['_SWITCHREGISTERNIC'].fields_by_name['identifier']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._loaded_options = None
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_options = b'8\001'
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._loaded_options = None
@@ -55,18 +71,20 @@
_globals['_SWITCHSERVICEGETREQUEST']._serialized_end=280
_globals['_SWITCHSERVICEGETRESPONSE']._serialized_start=282
_globals['_SWITCHSERVICEGETRESPONSE']._serialized_end=359
- _globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_start=361
- _globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_end=442
- _globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_start=444
- _globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_end=526
- _globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_start=529
- _globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_end=1100
- _globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_start=887
- _globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_end=985
- _globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_start=987
- _globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_end=1090
- _globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_start=1103
- _globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_end=1282
- _globals['_SWITCHSERVICE']._serialized_start=1285
- _globals['_SWITCHSERVICE']._serialized_end=1667
+ _globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_start=362
+ _globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_end=848
+ _globals['_SWITCHREGISTERNIC']._serialized_start=851
+ _globals['_SWITCHREGISTERNIC']._serialized_end=999
+ _globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_start=1001
+ _globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_end=1083
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_start=1086
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_end=1657
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_start=1444
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_end=1542
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_start=1544
+ _globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_end=1647
+ _globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_start=1660
+ _globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_end=1839
+ _globals['_SWITCHSERVICE']._serialized_start=1842
+ _globals['_SWITCHSERVICE']._serialized_end=2224
# @@protoc_insertion_point(module_scope)
diff --git a/python/metalstack/infra/v2/switch_pb2.pyi b/python/metalstack/infra/v2/switch_pb2.pyi
index 3b7c6c21..f79261a2 100644
--- a/python/metalstack/infra/v2/switch_pb2.pyi
+++ b/python/metalstack/infra/v2/switch_pb2.pyi
@@ -8,7 +8,7 @@ from metalstack.api.v2 import switch_pb2 as _switch_pb2
from google.protobuf.internal import containers as _containers
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
-from collections.abc import Mapping as _Mapping
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
DESCRIPTOR: _descriptor.FileDescriptor
@@ -26,10 +26,36 @@ class SwitchServiceGetResponse(_message.Message):
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
class SwitchServiceRegisterRequest(_message.Message):
- __slots__ = ("switch",)
- SWITCH_FIELD_NUMBER: _ClassVar[int]
- switch: _switch_pb2.Switch
- def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
+ __slots__ = ("id", "meta", "rack", "room", "partition", "management_ip", "management_user", "nics", "os")
+ ID_FIELD_NUMBER: _ClassVar[int]
+ META_FIELD_NUMBER: _ClassVar[int]
+ RACK_FIELD_NUMBER: _ClassVar[int]
+ ROOM_FIELD_NUMBER: _ClassVar[int]
+ PARTITION_FIELD_NUMBER: _ClassVar[int]
+ MANAGEMENT_IP_FIELD_NUMBER: _ClassVar[int]
+ MANAGEMENT_USER_FIELD_NUMBER: _ClassVar[int]
+ NICS_FIELD_NUMBER: _ClassVar[int]
+ OS_FIELD_NUMBER: _ClassVar[int]
+ id: str
+ meta: _common_pb2.Meta
+ rack: str
+ room: str
+ partition: str
+ management_ip: str
+ management_user: str
+ nics: _containers.RepeatedCompositeFieldContainer[SwitchRegisterNic]
+ os: _switch_pb2.SwitchOS
+ def __init__(self, id: _Optional[str] = ..., meta: _Optional[_Union[_common_pb2.Meta, _Mapping]] = ..., rack: _Optional[str] = ..., room: _Optional[str] = ..., partition: _Optional[str] = ..., management_ip: _Optional[str] = ..., management_user: _Optional[str] = ..., nics: _Optional[_Iterable[_Union[SwitchRegisterNic, _Mapping]]] = ..., os: _Optional[_Union[_switch_pb2.SwitchOS, _Mapping]] = ...) -> None: ...
+
+class SwitchRegisterNic(_message.Message):
+ __slots__ = ("name", "identifier", "state")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ IDENTIFIER_FIELD_NUMBER: _ClassVar[int]
+ STATE_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ identifier: str
+ state: _switch_pb2.NicState
+ def __init__(self, name: _Optional[str] = ..., identifier: _Optional[str] = ..., state: _Optional[_Union[_switch_pb2.NicState, _Mapping]] = ...) -> None: ...
class SwitchServiceRegisterResponse(_message.Message):
__slots__ = ("switch",)