diff --git a/doc/index.html b/doc/index.html
index b784dc57..4f37d19b 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -9905,7 +9905,8 @@
networks |
MachineNetwork |
repeated |
- Networks this machine should be attached to |
+ Networks this machine should be attached to
+Order of ips of external networks will be preserved. |
@@ -9994,7 +9995,8 @@ string
| repeated |
IPs to to attach to this machine additionally
-If none given, one ip address is acquired per network for the machine |
+If none given, one ip address is acquired per network for the machine
+Order of ips is preserved on the loopback interface.
diff --git a/go/metalstack/api/v2/machine.pb.go b/go/metalstack/api/v2/machine.pb.go
index fa793c0e..6ccb4ad0 100644
--- a/go/metalstack/api/v2/machine.pb.go
+++ b/go/metalstack/api/v2/machine.pb.go
@@ -1703,6 +1703,7 @@ type MachineAllocation struct {
// FilesystemLayout to create on the disks
FilesystemLayout *FilesystemLayout `protobuf:"bytes,8,opt,name=filesystem_layout,json=filesystemLayout,proto3" json:"filesystem_layout,omitempty"`
// Networks this machine should be attached to
+ // Order of ips of external networks will be preserved.
Networks []*MachineNetwork `protobuf:"bytes,9,rep,name=networks,proto3" json:"networks,omitempty"`
// Hostname of the allocated machine
Hostname string `protobuf:"bytes,10,opt,name=hostname,proto3" json:"hostname,omitempty"`
@@ -1881,6 +1882,7 @@ type MachineAllocationNetwork struct {
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
// IPs to to attach to this machine additionally
// If none given, one ip address is acquired per network for the machine
+ // Order of ips is preserved on the loopback interface.
Ips []string `protobuf:"bytes,2,rep,name=ips,proto3" json:"ips,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/go/tests/validation/common.go b/go/tests/validation/common.go
index 308cece6..c1997a54 100644
--- a/go/tests/validation/common.go
+++ b/go/tests/validation/common.go
@@ -27,14 +27,6 @@ func createString(n int) string {
return string(s)
}
-func createRepeatedString(n int) []string {
- arr := make([]string, n)
- for i := range arr {
- arr[i] = "opt" + string(rune('a'+(i%26)))
- }
- return arr
-}
-
func createDiskDevices(n int) []string {
devs := make([]string, n)
for i := range devs {
diff --git a/go/tests/validation/filesystem_test.go b/go/tests/validation/filesystem_test.go
index 70e0695b..e912af55 100644
--- a/go/tests/validation/filesystem_test.go
+++ b/go/tests/validation/filesystem_test.go
@@ -156,18 +156,6 @@ func TestValidateFilesystem(t *testing.T) {
wantErr: true,
wantErrorMessage: "validation error: mount_options: repeated value must contain unique items",
},
- {
- name: "Invalid Filesystem, mount_options more than 32 items",
- msg: &apiv2.Filesystem{
- Device: "/dev/sda3",
- Format: apiv2.Format_FORMAT_EXT4,
- MountOptions: createRepeatedString(33),
- },
- wantErr: true,
- wantErrorMessage: `validation errors:
- - mount_options: must contain no more than 32 item(s)
- - mount_options: repeated value must contain unique items`,
- },
{
name: "Invalid Filesystem, mount_options item too long",
msg: &apiv2.Filesystem{
diff --git a/js/metalstack/api/v2/machine_pb.d.ts b/js/metalstack/api/v2/machine_pb.d.ts
index 3f8aa41e..2dfa1715 100644
--- a/js/metalstack/api/v2/machine_pb.d.ts
+++ b/js/metalstack/api/v2/machine_pb.d.ts
@@ -648,6 +648,7 @@ export type MachineAllocation = Message<"metalstack.api.v2.MachineAllocation"> &
filesystemLayout?: FilesystemLayout | undefined;
/**
* Networks this machine should be attached to
+ * Order of ips of external networks will be preserved.
*
* @generated from field: repeated metalstack.api.v2.MachineNetwork networks = 9;
*/
@@ -722,6 +723,7 @@ export type MachineAllocationNetwork = Message<"metalstack.api.v2.MachineAllocat
/**
* IPs to to attach to this machine additionally
* If none given, one ip address is acquired per network for the machine
+ * Order of ips is preserved on the loopback interface.
*
* @generated from field: repeated string ips = 2;
*/
diff --git a/js/metalstack/api/v2/machine_pb.ts b/js/metalstack/api/v2/machine_pb.ts
index 45969783..110a0e9c 100644
--- a/js/metalstack/api/v2/machine_pb.ts
+++ b/js/metalstack/api/v2/machine_pb.ts
@@ -770,6 +770,7 @@ export type MachineAllocation = Message<"metalstack.api.v2.MachineAllocation"> &
/**
* Networks this machine should be attached to
+ * Order of ips of external networks will be preserved.
*
* @generated from field: repeated metalstack.api.v2.MachineNetwork networks = 9;
*/
@@ -856,6 +857,7 @@ export type MachineAllocationNetwork = Message<"metalstack.api.v2.MachineAllocat
/**
* IPs to to attach to this machine additionally
* If none given, one ip address is acquired per network for the machine
+ * Order of ips is preserved on the loopback interface.
*
* @generated from field: repeated string ips = 2;
*/
diff --git a/proto/metalstack/api/v2/machine.proto b/proto/metalstack/api/v2/machine.proto
index a0f75974..6016887f 100644
--- a/proto/metalstack/api/v2/machine.proto
+++ b/proto/metalstack/api/v2/machine.proto
@@ -305,6 +305,7 @@ message MachineAllocation {
// FilesystemLayout to create on the disks
FilesystemLayout filesystem_layout = 8;
// Networks this machine should be attached to
+ // Order of ips of external networks will be preserved.
repeated MachineNetwork networks = 9;
// Hostname of the allocated machine
string hostname = 10 [(buf.validate.field).string.hostname = true];
@@ -343,6 +344,7 @@ message MachineAllocationNetwork {
string network = 1 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
// IPs to to attach to this machine additionally
// If none given, one ip address is acquired per network for the machine
+ // Order of ips is preserved on the loopback interface.
repeated string ips = 2 [(buf.validate.field).repeated.(metalstack.api.v2.ips) = true];
}