From 28c77b5e9c982ef67e2797afb61695fe1eed0afb Mon Sep 17 00:00:00 2001 From: Ilja Rotar Date: Fri, 12 Dec 2025 09:07:08 +0100 Subject: [PATCH] Allow updating machine connections of a switch --- doc/index.html | 7 +++ go/metalstack/admin/v2/switch.pb.go | 68 +++++++++++++---------- proto/metalstack/admin/v2/switch.proto | 2 + python/metalstack/admin/v2/switch_pb2.py | 36 ++++++------ python/metalstack/admin/v2/switch_pb2.pyi | 6 +- 5 files changed, 71 insertions(+), 48 deletions(-) diff --git a/doc/index.html b/doc/index.html index f64bd5bf..d5b61b91 100644 --- a/doc/index.html +++ b/doc/index.html @@ -12324,6 +12324,13 @@

SwitchServiceUpdateReque

SwitchOs is the OS running on the switch.

+ + machine_connections + metalstack.api.v2.MachineConnection + repeated +

MachineConnections map machines to the nics they are connected to.

+ + diff --git a/go/metalstack/admin/v2/switch.pb.go b/go/metalstack/admin/v2/switch.pb.go index 5acce323..80daaaf2 100644 --- a/go/metalstack/admin/v2/switch.pb.go +++ b/go/metalstack/admin/v2/switch.pb.go @@ -231,9 +231,11 @@ type SwitchServiceUpdateRequest struct { // 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 + Os *v2.SwitchOS `protobuf:"bytes,10,opt,name=os,proto3,oneof" json:"os,omitempty"` + // MachineConnections map machines to the nics they are connected to. + MachineConnections []*v2.MachineConnection `protobuf:"bytes,11,rep,name=machine_connections,json=machineConnections,proto3" json:"machine_connections,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SwitchServiceUpdateRequest) Reset() { @@ -336,6 +338,13 @@ func (x *SwitchServiceUpdateRequest) GetOs() *v2.SwitchOS { return nil } +func (x *SwitchServiceUpdateRequest) GetMachineConnections() []*v2.MachineConnection { + if x != nil { + return x.MachineConnections + } + return nil +} + // SwitchServiceUpdateResponse. type SwitchServiceUpdateResponse struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -707,7 +716,7 @@ 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\"\x90\x06\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" + @@ -722,7 +731,8 @@ const file_metalstack_admin_v2_switch_proto_rawDesc = "" + "\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" + + " \x01(\v2\x1b.metalstack.api.v2.SwitchOSH\x05R\x02os\x88\x01\x01\x12U\n" + + "\x13machine_connections\x18\v \x03(\v2$.metalstack.api.v2.MachineConnectionR\x12machineConnectionsB\x0e\n" + "\f_descriptionB\x0f\n" + "\r_replace_modeB\x10\n" + "\x0e_management_ipB\x12\n" + @@ -797,7 +807,8 @@ var file_metalstack_admin_v2_switch_proto_goTypes = []any{ (v2.SwitchReplaceMode)(0), // 16: metalstack.api.v2.SwitchReplaceMode (*v2.SwitchNic)(nil), // 17: metalstack.api.v2.SwitchNic (*v2.SwitchOS)(nil), // 18: metalstack.api.v2.SwitchOS - (v2.SwitchPortStatus)(0), // 19: metalstack.api.v2.SwitchPortStatus + (*v2.MachineConnection)(nil), // 19: metalstack.api.v2.MachineConnection + (v2.SwitchPortStatus)(0), // 20: metalstack.api.v2.SwitchPortStatus } var file_metalstack_admin_v2_switch_proto_depIdxs = []int32{ 12, // 0: metalstack.admin.v2.SwitchServiceGetResponse.switch:type_name -> metalstack.api.v2.Switch @@ -808,28 +819,29 @@ var file_metalstack_admin_v2_switch_proto_depIdxs = []int32{ 16, // 5: metalstack.admin.v2.SwitchServiceUpdateRequest.replace_mode:type_name -> metalstack.api.v2.SwitchReplaceMode 17, // 6: metalstack.admin.v2.SwitchServiceUpdateRequest.nics:type_name -> metalstack.api.v2.SwitchNic 18, // 7: metalstack.admin.v2.SwitchServiceUpdateRequest.os:type_name -> metalstack.api.v2.SwitchOS - 12, // 8: metalstack.admin.v2.SwitchServiceUpdateResponse.switch:type_name -> metalstack.api.v2.Switch - 12, // 9: metalstack.admin.v2.SwitchServiceDeleteResponse.switch:type_name -> metalstack.api.v2.Switch - 12, // 10: metalstack.admin.v2.SwitchServiceMigrateResponse.switch:type_name -> metalstack.api.v2.Switch - 19, // 11: metalstack.admin.v2.SwitchServicePortRequest.status:type_name -> metalstack.api.v2.SwitchPortStatus - 12, // 12: metalstack.admin.v2.SwitchServicePortResponse.switch:type_name -> metalstack.api.v2.Switch - 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 - 1, // 19: metalstack.admin.v2.SwitchService.Get:output_type -> metalstack.admin.v2.SwitchServiceGetResponse - 3, // 20: metalstack.admin.v2.SwitchService.List:output_type -> metalstack.admin.v2.SwitchServiceListResponse - 5, // 21: metalstack.admin.v2.SwitchService.Update:output_type -> metalstack.admin.v2.SwitchServiceUpdateResponse - 7, // 22: metalstack.admin.v2.SwitchService.Delete:output_type -> metalstack.admin.v2.SwitchServiceDeleteResponse - 9, // 23: metalstack.admin.v2.SwitchService.Migrate:output_type -> metalstack.admin.v2.SwitchServiceMigrateResponse - 11, // 24: metalstack.admin.v2.SwitchService.Port:output_type -> metalstack.admin.v2.SwitchServicePortResponse - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] 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 + 19, // 8: metalstack.admin.v2.SwitchServiceUpdateRequest.machine_connections:type_name -> metalstack.api.v2.MachineConnection + 12, // 9: metalstack.admin.v2.SwitchServiceUpdateResponse.switch:type_name -> metalstack.api.v2.Switch + 12, // 10: metalstack.admin.v2.SwitchServiceDeleteResponse.switch:type_name -> metalstack.api.v2.Switch + 12, // 11: metalstack.admin.v2.SwitchServiceMigrateResponse.switch:type_name -> metalstack.api.v2.Switch + 20, // 12: metalstack.admin.v2.SwitchServicePortRequest.status:type_name -> metalstack.api.v2.SwitchPortStatus + 12, // 13: metalstack.admin.v2.SwitchServicePortResponse.switch:type_name -> metalstack.api.v2.Switch + 0, // 14: metalstack.admin.v2.SwitchService.Get:input_type -> metalstack.admin.v2.SwitchServiceGetRequest + 2, // 15: metalstack.admin.v2.SwitchService.List:input_type -> metalstack.admin.v2.SwitchServiceListRequest + 4, // 16: metalstack.admin.v2.SwitchService.Update:input_type -> metalstack.admin.v2.SwitchServiceUpdateRequest + 6, // 17: metalstack.admin.v2.SwitchService.Delete:input_type -> metalstack.admin.v2.SwitchServiceDeleteRequest + 8, // 18: metalstack.admin.v2.SwitchService.Migrate:input_type -> metalstack.admin.v2.SwitchServiceMigrateRequest + 10, // 19: metalstack.admin.v2.SwitchService.Port:input_type -> metalstack.admin.v2.SwitchServicePortRequest + 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 + 20, // [20:26] is the sub-list for method output_type + 14, // [14:20] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_metalstack_admin_v2_switch_proto_init() } diff --git a/proto/metalstack/admin/v2/switch.proto b/proto/metalstack/admin/v2/switch.proto index 28248294..0566d543 100644 --- a/proto/metalstack/admin/v2/switch.proto +++ b/proto/metalstack/admin/v2/switch.proto @@ -93,6 +93,8 @@ message SwitchServiceUpdateRequest { repeated metalstack.api.v2.SwitchNic nics = 9; // SwitchOs is the OS running on the switch. optional metalstack.api.v2.SwitchOS os = 10; + // MachineConnections map machines to the nics they are connected to. + repeated metalstack.api.v2.MachineConnection machine_connections = 11; } // SwitchServiceUpdateResponse. diff --git a/python/metalstack/admin/v2/switch_pb2.py b/python/metalstack/admin/v2/switch_pb2.py index 95165be6..aa34e787 100644 --- a/python/metalstack/admin/v2/switch_pb2.py +++ b/python/metalstack/admin/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/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(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\x06switch2\xbf\x05\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\x12r\n\x06Update\x12/.metalstack.admin.v2.SwitchServiceUpdateRequest\x1a\x30.metalstack.admin.v2.SwitchServiceUpdateResponse\"\x05\xd2\xf3\x18\x01\x01\x12r\n\x06\x44\x65lete\x12/.metalstack.admin.v2.SwitchServiceDeleteRequest\x1a\x30.metalstack.admin.v2.SwitchServiceDeleteResponse\"\x05\xd2\xf3\x18\x01\x01\x12u\n\x07Migrate\x12\x30.metalstack.admin.v2.SwitchServiceMigrateRequest\x1a\x31.metalstack.admin.v2.SwitchServiceMigrateResponse\"\x05\xd2\xf3\x18\x01\x01\x12l\n\x04Port\x12-.metalstack.admin.v2.SwitchServicePortRequest\x1a..metalstack.admin.v2.SwitchServicePortResponse\"\x05\xd2\xf3\x18\x01\x01\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\x1fgoogle/protobuf/timestamp.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\"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\"\x90\x06\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\x12U\n\x13machine_connections\x18\x0b \x03(\x0b\x32$.metalstack.api.v2.MachineConnectionR\x12machineConnectionsB\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\x06switch2\xbf\x05\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\x12r\n\x06Update\x12/.metalstack.admin.v2.SwitchServiceUpdateRequest\x1a\x30.metalstack.admin.v2.SwitchServiceUpdateResponse\"\x05\xd2\xf3\x18\x01\x01\x12r\n\x06\x44\x65lete\x12/.metalstack.admin.v2.SwitchServiceDeleteRequest\x1a\x30.metalstack.admin.v2.SwitchServiceDeleteResponse\"\x05\xd2\xf3\x18\x01\x01\x12u\n\x07Migrate\x12\x30.metalstack.admin.v2.SwitchServiceMigrateRequest\x1a\x31.metalstack.admin.v2.SwitchServiceMigrateResponse\"\x05\xd2\xf3\x18\x01\x01\x12l\n\x04Port\x12-.metalstack.admin.v2.SwitchServicePortRequest\x1a..metalstack.admin.v2.SwitchServicePortResponse\"\x05\xd2\xf3\x18\x01\x01\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) @@ -86,21 +86,21 @@ _globals['_SWITCHSERVICELISTRESPONSE']._serialized_start=444 _globals['_SWITCHSERVICELISTRESPONSE']._serialized_end=526 _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_start=529 - _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_end=1226 - _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_start=1228 - _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_end=1308 - _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_start=1310 - _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_end=1391 - _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_start=1393 - _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_end=1473 - _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_start=1475 - _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_end=1596 - _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_start=1598 - _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_end=1679 - _globals['_SWITCHSERVICEPORTREQUEST']._serialized_start=1682 - _globals['_SWITCHSERVICEPORTREQUEST']._serialized_end=1850 - _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_start=1852 - _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_end=1930 - _globals['_SWITCHSERVICE']._serialized_start=1933 - _globals['_SWITCHSERVICE']._serialized_end=2636 + _globals['_SWITCHSERVICEUPDATEREQUEST']._serialized_end=1313 + _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_start=1315 + _globals['_SWITCHSERVICEUPDATERESPONSE']._serialized_end=1395 + _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_start=1397 + _globals['_SWITCHSERVICEDELETEREQUEST']._serialized_end=1478 + _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_start=1480 + _globals['_SWITCHSERVICEDELETERESPONSE']._serialized_end=1560 + _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_start=1562 + _globals['_SWITCHSERVICEMIGRATEREQUEST']._serialized_end=1683 + _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_start=1685 + _globals['_SWITCHSERVICEMIGRATERESPONSE']._serialized_end=1766 + _globals['_SWITCHSERVICEPORTREQUEST']._serialized_start=1769 + _globals['_SWITCHSERVICEPORTREQUEST']._serialized_end=1937 + _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_start=1939 + _globals['_SWITCHSERVICEPORTRESPONSE']._serialized_end=2017 + _globals['_SWITCHSERVICE']._serialized_start=2020 + _globals['_SWITCHSERVICE']._serialized_end=2723 # @@protoc_insertion_point(module_scope) diff --git a/python/metalstack/admin/v2/switch_pb2.pyi b/python/metalstack/admin/v2/switch_pb2.pyi index c30fa375..1d31f8e9 100644 --- a/python/metalstack/admin/v2/switch_pb2.pyi +++ b/python/metalstack/admin/v2/switch_pb2.pyi @@ -38,7 +38,7 @@ 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", "updated_at", "description", "replace_mode", "management_ip", "management_user", "console_command", "nics", "os", "machine_connections") ID_FIELD_NUMBER: _ClassVar[int] UPDATE_META_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] @@ -49,6 +49,7 @@ class SwitchServiceUpdateRequest(_message.Message): CONSOLE_COMMAND_FIELD_NUMBER: _ClassVar[int] NICS_FIELD_NUMBER: _ClassVar[int] OS_FIELD_NUMBER: _ClassVar[int] + MACHINE_CONNECTIONS_FIELD_NUMBER: _ClassVar[int] id: str update_meta: _common_pb2.UpdateMeta updated_at: _timestamp_pb2.Timestamp @@ -59,7 +60,8 @@ class SwitchServiceUpdateRequest(_message.Message): 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: ... + machine_connections: _containers.RepeatedCompositeFieldContainer[_switch_pb2.MachineConnection] + 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]] = ..., machine_connections: _Optional[_Iterable[_Union[_switch_pb2.MachineConnection, _Mapping]]] = ...) -> None: ... class SwitchServiceUpdateResponse(_message.Message): __slots__ = ("switch",)