diff --git a/src/app/cartography/models/node.ts b/src/app/cartography/models/node.ts
index a92c836f..bad991c8 100644
--- a/src/app/cartography/models/node.ts
+++ b/src/app/cartography/models/node.ts
@@ -70,6 +70,7 @@ export class Properties {
qemu_path: string;
environment: string;
extra_hosts: string;
+ start_command: string;
replicate_network_connection_state: boolean;
memory: number;
tpm: boolean;
diff --git a/src/app/components/project-map/node-editors/configurator/docker/configurator-docker.component.html b/src/app/components/project-map/node-editors/configurator/docker/configurator-docker.component.html
index 7be22add..bcb467f1 100644
--- a/src/app/components/project-map/node-editors/configurator/docker/configurator-docker.component.html
+++ b/src/app/components/project-map/node-editors/configurator/docker/configurator-docker.component.html
@@ -33,17 +33,27 @@
-
+
+
+
+
+
MB
-
+
-
+
+
+
-
+
+
+
+
+
+
+ {{ type.name }} ({{ type.value }})
+
+
+
+
+
+
Replicate network connection state
-
+
+
+
+
+
+
diff --git a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts
index 130904f4..4a17f44a 100644
--- a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts
+++ b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts
@@ -22,6 +22,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
node: Node;
name: string;
generalSettingsForm: UntypedFormGroup;
+ networkSettingsForm: UntypedFormGroup;
consoleTypes: string[] = [];
onCloseOptions = [];
bootPriorities = [];
@@ -54,6 +55,10 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
name: new UntypedFormControl('', Validators.required),
ram: new UntypedFormControl('', Validators.required),
});
+
+ this.networkSettingsForm = this.formBuilder.group({
+ mac_address: new UntypedFormControl('', Validators.pattern(this.qemuConfigurationService.getMacAddrRegex())),
+ });
}
ngOnInit() {
@@ -103,16 +108,16 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
}
onSaveClick() {
- if (this.generalSettingsForm.valid) {
- this.node.custom_adapters = [];
- this.customAdapters.adapters.forEach((n) => {
- this.node.custom_adapters.push({
- adapter_number: n.adapter_number,
- adapter_type: n.adapter_type,
- });
- });
-
- this.node.properties.adapters = this.node.custom_adapters.length;
+ if (this.generalSettingsForm.valid && this.networkSettingsForm.valid) {
+ // this.node.custom_adapters = [];
+ // this.customAdapters.adapters.forEach((n) => {
+ // this.node.custom_adapters.push({
+ // adapter_number: n.adapter_number,
+ // adapter_type: n.adapter_type,
+ // });
+ // });
+ //
+ // this.node.properties.adapters = this.node.custom_adapters.length;
this.nodeService.updateNodeWithCustomAdapters(this.controller, this.node).subscribe(() => {
this.toasterService.success(`Node ${this.node.name} updated.`);
diff --git a/src/app/services/docker-configuration.service.ts b/src/app/services/docker-configuration.service.ts
index c6059350..9cd5cb58 100644
--- a/src/app/services/docker-configuration.service.ts
+++ b/src/app/services/docker-configuration.service.ts
@@ -27,4 +27,8 @@ export class DockerConfigurationService {
return consoleResolutions;
}
+
+ getMacAddrRegex() {
+ return /^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$/;
+ }
}
diff --git a/src/app/services/qemu-configuration.service.ts b/src/app/services/qemu-configuration.service.ts
index c975acbe..706b7013 100644
--- a/src/app/services/qemu-configuration.service.ts
+++ b/src/app/services/qemu-configuration.service.ts
@@ -76,34 +76,6 @@ export class QemuConfigurationService {
{ value: 'vmxnet3', name: 'VMWare Paravirtualized Ethernet v3' },
];
- // let networkTypes = [
- // 'e1000',
- // 'e1000-82544gc',
- // 'e1000-82545em',
- // 'e1000e',
- // 'rocker',
- // 'Intel Gigabit Ethernet',
- // 'i82550',
- // 'i82551',
- // 'i82557a',
- // 'i82557b',
- // 'i82557c',
- // 'i82558a',
- // 'i82558b',
- // 'i82559a',
- // 'i82559b',
- // 'i82559c',
- // 'i82559er',
- // 'i82562',
- // 'i82801',
- // 'ne2k_pci',
- // 'pcnet',
- // 'rtl8139',
- // 'virtio',
- // 'virtio-net-pci',
- // 'vmxnet3',
- // ];
-
return networkTypes;
}
@@ -146,4 +118,8 @@ export class QemuConfigurationService {
return priorities;
}
+
+ getMacAddrRegex() {
+ return /^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$/;
+ }
}