diff --git a/applications/rtdt-manager/data/venv_sdnconfig_full.json b/applications/rtdt-manager/data/venv_sdnconfig_full.json index 32fc735a2a851bd5bfab6f86eb11bbd93610d3a5..146796b1a502140a355b73709d91a00e0b4a6427 100644 --- a/applications/rtdt-manager/data/venv_sdnconfig_full.json +++ b/applications/rtdt-manager/data/venv_sdnconfig_full.json @@ -38,32 +38,32 @@ { "id": "1950bf78-2fe3-4e0f-a4a6-9c42c660fb36", "name": "eth1", - "configuration": "" + "configuration": {} }, { "id": "b0338d9a-50e4-477f-bb30-18ad3c61302f", "name": "eth1", - "configuration": "" + "configuration": {} }, { "id": "df55cdb4-aa55-495c-8e27-245e6ed6b806", "name": "eth2", - "configuration": "" + "configuration": {} }, { "id": "505f067f-62a4-484e-9f06-673f668a1908", "name": "eth1", - "configuration": "" + "configuration": {} }, { "id": "164c384d-7179-42c9-8c54-4d1ad148b7b8", "name": "eth2", - "configuration": "" + "configuration": {} }, { "id": "b279ea32-fa61-4167-93aa-54afe45cfdb0", "name": "eth1", - "configuration": "" + "configuration": {} } ], "links": [ @@ -212,7 +212,28 @@ } } ], - "plugins": [], + "plugins": [ + { + "id": "78e5a86f-6ba8-4468-97b2-441afca0ebc2", + "exec_path": "plugins/d1c269a2-6482-4010-b0d8-679dff73153b", + "manifest": { + "name": "Openconfig", + "firmware": "standard", + "author": "goSDN-Team", + "version": "1.0.0" + } + }, + { + "id": "caa55b54-570b-4dfc-90ec-c3eb0d6db03c", + "exec_path": "plugins/d1c269a2-6482-4010-b0d8-679dff73153b", + "manifest": { + "name": "Openconfig", + "firmware": "standard", + "author": "goSDN-Team", + "version": "1.0.0" + } + } + ], "networkelements": [ { "id": "db563e8d-0755-4df7-8458-56e3242b1cd4", @@ -222,7 +243,7 @@ "transport_username": "admin", "transport_password": "admin", "transport_tls": true, - "plugin": "78e5a86f-6ba8-4468-97b2-441afca0ebc2", + "plugin": "d1c269a2-6482-4010-b0d8-679dff73153b", "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":689,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.11\",\"prefix-length\":16},\"ip\":\"172.100.0.11\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::a\",\"prefix-length\":64},\"ip\":\"2001:db8::a\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:b\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:b\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":692,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fee9:fd3e\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fee9:fd3e\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":683,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fec1:7e5e\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fec1:7e5e\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch0\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"14843876\",\"physical\":\"32767196\",\"used\":\"17923320\"}},\"state\":{\"boot-time\":\"1740300792\",\"current-datetime\":\"2025-02-23T17:36:16Z\",\"software-version\":\"debian:12\"}}}", "pnd_id": "5f20f34b-cbd0-4511-9ddc-c50cf6a3b49e" }, @@ -234,7 +255,7 @@ "transport_username": "admin", "transport_password": "admin", "transport_tls": true, - "plugin": "caa55b54-570b-4dfc-90ec-c3eb0d6db03c", + "plugin": "d1c269a2-6482-4010-b0d8-679dff73153b", "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":687,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.12\",\"prefix-length\":16},\"ip\":\"172.100.0.12\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::9\",\"prefix-length\":64},\"ip\":\"2001:db8::9\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:c\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:c\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":691,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:feaa:12d1\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:feaa:12d1\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":685,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe0b:6be9\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe0b:6be9\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch1\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"14843372\",\"physical\":\"32767196\",\"used\":\"17923824\"}},\"state\":{\"boot-time\":\"1740300792\",\"current-datetime\":\"2025-02-23T17:36:16Z\",\"software-version\":\"debian:12\"}}}", "pnd_id": "5f20f34b-cbd0-4511-9ddc-c50cf6a3b49e" } diff --git a/applications/rtdt-manager/rtdt-manager/rtdt-manager.go b/applications/rtdt-manager/rtdt-manager/rtdt-manager.go index 6404a9e3a12d9f669ff521a033bb9c3621a2279b..37136d8c33ab51578398012fb5219008642c7dbc 100644 --- a/applications/rtdt-manager/rtdt-manager/rtdt-manager.go +++ b/applications/rtdt-manager/rtdt-manager/rtdt-manager.go @@ -80,25 +80,26 @@ func (r *RtdtManager) LaunchRealnetVEnv(realnetName string, sdnConfig *sdnconfig } //TODO: REPLACE THIS WITH ApplyConfiguration() ??? // Create the devices based on sdn config file - err = r.realnet.CreateDevices() - if err != nil { - fmt.Printf("Error: Couldn't create devices!") - return err - } - // Apply the topology based on links in the sdn config file: - err = r.realnet.UploadTopology() + // err = r.realnet.CreateDevices() + // if err != nil { + // fmt.Printf("Error: Couldn't create devices!") + // return err + // } + // // Apply the topology based on links in the sdn config file: + // err = r.realnet.UploadTopology() + // if err != nil { + // fmt.Printf("Error occured while trying to upload r.realnet topology to DB: %v\n", err) + // return err + // } + // return fmt.Errorf("--------------------ONLY RUN UNTIL HERE----------------------------") + + // This doesn't work for some reason.. + err = r.realnet.ApplyConfiguration(sdnConfig) if err != nil { - fmt.Printf("Error occured while trying to upload r.realnet topology to DB: %v\n", err) - return err + fmt.Printf("Failed to apply configuration: %v\n", err) } return fmt.Errorf("--------------------ONLY RUN UNTIL HERE----------------------------") - // This doesn't work for some reason.. - // err = r.realnet.ApplyConfiguration(sdnConfig) - // if err != nil { - // fmt.Printf("Failed to apply configuration: %v\n", err) - // } - // Now setup the just-created environment // Need to: // - Upload managed network elements diff --git a/applications/rtdt-manager/sdnconfig/sdnconfig.go b/applications/rtdt-manager/sdnconfig/sdnconfig.go index 30077b39d2aef2bd9c16fe0a283402f7dc15c490..23c70e86c6bdcd942488b04ab189c19ed77c8b78 100644 --- a/applications/rtdt-manager/sdnconfig/sdnconfig.go +++ b/applications/rtdt-manager/sdnconfig/sdnconfig.go @@ -12,6 +12,8 @@ import ( topoPb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" rtdt_auth "code.fbi.h-da.de/danet/gosdn/applications/rtdt-manager/rtdt-auth" "code.fbi.h-da.de/danet/gosdn/applications/rtdt-manager/util" + "github.com/google/uuid" + hcplugin "github.com/hashicorp/go-plugin" ) type SdnConfig struct { @@ -19,7 +21,7 @@ type SdnConfig struct { Nodes []Node `json:"nodes"` Ports []Port `json:"ports"` Links []Link `json:"links"` - Plugins []Plugin `json:"plugins"` + Plugins []Plugin `json:"plugins,omitempty"` NetworkElements []NetworkElement `json:"networkelements"` } type Metadata struct { @@ -41,11 +43,20 @@ type NetworkElement struct { } type Plugin struct { - ID string `json:"id"` - Manifest string `json:"manifest"` - State int `json:"state"` - ExecPath string `json:"exec_path"` + ID string `json:"id"` + Manifest PluginManifest `json:"manifest"` + State int `json:"state,omitempty"` + ExecPath string `json:"exec_path,omitempty"` + ReattachConfig hcplugin.ReattachConfig `json:"reattatch_config,omitempty" bson:"reattatch_config"` } + +type PluginManifest struct { + Name string `json:"name"` + Firmware string `json:"firmware"` + Author string `json:"author"` + Version string `json:"version"` +} + type Link struct { ID string `json:"ID"` Metadata Metadata `json:"Metadata"` @@ -63,10 +74,10 @@ type Node struct { } type Port struct { - ID string `json:"id"` - Name string `json:"name"` - Metadata Metadata `json:"metadata"` - Configuration string `json:"configuration"` + ID uuid.UUID `json:"id"` + Name string `json:"name,omitempty"` + Configuration PortConfig `json:"configuration,omitempty"` + Metadata conflict.Metadata `json:"metadata"` } // this is needed because port in link differs from port in port-store (configuration field) @@ -74,12 +85,12 @@ type Port struct { type LinkPort struct { ID string `json:"Id"` Name string `json:"Name"` - Metadata Metadata `json:"Metadata"` Configuration PortConfig `json:"Configuration"` + Metadata Metadata `json:"Metadata"` } type PortConfig struct { - IP string `json:"Ip"` - PrefixLength int64 `json:"PrefixLength"` + IP string `bson:"Ip"` + PrefixLength int64 `bson:"PrefixLength"` } func NewSdnConfig() *SdnConfig { @@ -109,13 +120,13 @@ func (s *SdnConfig) LoadSdnConfig(configFilename string) error { return fmt.Errorf("Error in LoadSdnConfig(): %w", err) } - jsonData, err := json.MarshalIndent(s, "", " ") - if err != nil { - return fmt.Errorf("Error marshalling struct to JSON: %w", err) - } - fmt.Println("------- SDNCONFIG ------------") - fmt.Println(string(jsonData)) - fmt.Println("------- SDNCONFIG ------------") + // jsonData, err := json.MarshalIndent(s, "", " ") + // if err != nil { + // return fmt.Errorf("Error marshalling struct to JSON: %w", err) + // } + // fmt.Println("------- SDNCONFIG ------------") + // fmt.Println(string(jsonData)) + // fmt.Println("------- SDNCONFIG ------------") return nil } @@ -201,7 +212,7 @@ func (p *LinkPort) Convert() *topoPb.Port { } func (p *Port) Convert() *topoPb.Port { return &topoPb.Port{ - Id: p.ID, + Id: p.ID.String(), Name: p.Name, Configuration: &topoPb.Configuration{}, } diff --git a/applications/rtdt-manager/test-config/downloaded-config.json b/applications/rtdt-manager/test-config/downloaded-config.json index 99af02e721055ac04fdf4c5459274198d7abc009..ccfe2ec8bca9c87c0aa08163d058b957bb34dc46 100644 --- a/applications/rtdt-manager/test-config/downloaded-config.json +++ b/applications/rtdt-manager/test-config/downloaded-config.json @@ -1,36 +1,36 @@ - { +{ "pndID": "5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d", "nodes": [ { "id": "db563e8d-0755-4df7-8458-56e3242b1cd4", "name": "gnmi-target-switch0", "metadata": { - "created_at": "2025-02-26T11:01:02.974Z", - "last_updated": "2025-02-26T11:01:02.974Z" + "created_at": "2025-02-26T19:18:45.367Z", + "last_updated": "2025-02-26T19:18:45.367Z" } }, { "id": "f14ccc06-0143-4196-9aba-7812fae01d11", "name": "gnmi-target-switch1", "metadata": { - "created_at": "2025-02-26T11:01:02.992Z", - "last_updated": "2025-02-26T11:01:02.992Z" + "created_at": "2025-02-26T19:18:45.448Z", + "last_updated": "2025-02-26T19:18:45.448Z" } }, { "id": "c1012f26-99ef-41d0-970b-4642012ebace", "name": "centos0", "metadata": { - "created_at": "2025-02-26T11:01:03.001Z", - "last_updated": "2025-02-26T11:01:03.001Z" + "created_at": "2025-02-26T19:18:45.479Z", + "last_updated": "2025-02-26T19:18:45.479Z" } }, { "id": "15f1104a-26a7-49e9-ba57-9eed8720e3ad", "name": "centos1", "metadata": { - "created_at": "2025-02-26T11:01:03.004Z", - "last_updated": "2025-02-26T11:01:03.004Z" + "created_at": "2025-02-26T19:18:45.483Z", + "last_updated": "2025-02-26T19:18:45.483Z" } } ], @@ -38,56 +38,56 @@ { "id": "1950bf78-2fe3-4e0f-a4a6-9c42c660fb36", "name": "eth1", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} }, { "id": "b0338d9a-50e4-477f-bb30-18ad3c61302f", "name": "eth1", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} }, { "id": "df55cdb4-aa55-495c-8e27-245e6ed6b806", "name": "eth2", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} }, { "id": "505f067f-62a4-484e-9f06-673f668a1908", "name": "eth1", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} }, { "id": "164c384d-7179-42c9-8c54-4d1ad148b7b8", "name": "eth2", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} }, { "id": "b279ea32-fa61-4167-93aa-54afe45cfdb0", "name": "eth1", - "metadata": { - "created_at": "0001-01-01T00:00:00Z", - "last_updated": "0001-01-01T00:00:00Z" + "configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 }, - "configuration": "" + "metadata": {} } ], "links": [ @@ -109,13 +109,13 @@ "SourcePort": { "Id": "1950bf78-2fe3-4e0f-a4a6-9c42c660fb36", "Name": "eth1", + "Configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.2", - "PrefixLength": 24 } }, "TargetNode": { @@ -129,13 +129,13 @@ "TargetPort": { "Id": "b0338d9a-50e4-477f-bb30-18ad3c61302f", "Name": "eth1", + "Configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.3", - "PrefixLength": 24 } } }, @@ -150,20 +150,20 @@ "id": "db563e8d-0755-4df7-8458-56e3242b1cd4", "name": "gnmi-target-switch0", "metadata": { - "created_at": "2025-02-26T11:01:02.974Z", - "last_updated": "2025-02-26T11:01:02.974Z" + "created_at": "2025-02-26T19:18:45.367Z", + "last_updated": "2025-02-26T19:18:45.367Z" } }, "SourcePort": { "Id": "df55cdb4-aa55-495c-8e27-245e6ed6b806", "Name": "eth2", + "Configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.2", - "PrefixLength": 24 } }, "TargetNode": { @@ -177,13 +177,13 @@ "TargetPort": { "Id": "505f067f-62a4-484e-9f06-673f668a1908", "Name": "eth1", + "Configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.3", - "PrefixLength": 24 } } }, @@ -198,20 +198,20 @@ "id": "f14ccc06-0143-4196-9aba-7812fae01d11", "name": "gnmi-target-switch1", "metadata": { - "created_at": "2025-02-26T11:01:02.992Z", - "last_updated": "2025-02-26T11:01:02.992Z" + "created_at": "2025-02-26T19:18:45.448Z", + "last_updated": "2025-02-26T19:18:45.448Z" } }, "SourcePort": { "Id": "164c384d-7179-42c9-8c54-4d1ad148b7b8", "Name": "eth2", + "Configuration": { + "IP": "192.168.178.2", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.2", - "PrefixLength": 24 } }, "TargetNode": { @@ -225,18 +225,51 @@ "TargetPort": { "Id": "b279ea32-fa61-4167-93aa-54afe45cfdb0", "Name": "eth1", + "Configuration": { + "IP": "192.168.178.3", + "PrefixLength": 24 + }, "Metadata": { "created_at": "0001-01-01T00:00:00Z", "last_updated": "0001-01-01T00:00:00Z" - }, - "Configuration": { - "Ip": "192.168.178.3", - "PrefixLength": 24 } } } ], - "plugins": null, + "plugins": [ + { + "id": "6b2a3974-9f8b-4476-baed-3f8febaf25e6", + "manifest": { + "name": "Openconfig", + "firmware": "standard", + "author": "goSDN-Team", + "version": "1.0.0" + }, + "reattatch_config": { + "Protocol": "grpc", + "ProtocolVersion": 0, + "Addr": null, + "Pid": 27, + "Test": false + } + }, + { + "id": "5ab71549-9d7e-4e66-a3e2-34dd03deff50", + "manifest": { + "name": "Openconfig", + "firmware": "standard", + "author": "goSDN-Team", + "version": "1.0.0" + }, + "reattatch_config": { + "Protocol": "grpc", + "ProtocolVersion": 0, + "Addr": null, + "Pid": 46, + "Test": false + } + } + ], "networkelements": [ { "id": "db563e8d-0755-4df7-8458-56e3242b1cd4", @@ -246,8 +279,8 @@ "transport_username": "admin", "transport_password": "admin", "transport_tls": true, - "plugin": "2455b300-67ee-4695-95cd-1c7a8e6e28ab", - "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":787,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.11\",\"prefix-length\":16},\"ip\":\"172.100.0.11\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::9\",\"prefix-length\":64},\"ip\":\"2001:db8::9\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:b\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:b\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":792,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe36:5da3\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe36:5da3\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":783,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fec9:790c\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fec9:790c\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch0\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"6650664\",\"physical\":\"63586184\",\"used\":\"56935520\"}},\"state\":{\"boot-time\":\"1740042208\",\"current-datetime\":\"2025-02-26T11:00:46Z\",\"software-version\":\"debian:12\"}}}", + "plugin": "d1c269a2-6482-4010-b0d8-679dff73153b", + "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1025,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.11\",\"prefix-length\":16},\"ip\":\"172.100.0.11\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::a\",\"prefix-length\":64},\"ip\":\"2001:db8::a\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:b\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:b\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1027,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe42:2347\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe42:2347\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1021,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe80:e8d8\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe80:e8d8\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch0\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"6126836\",\"physical\":\"32767196\",\"used\":\"26640360\"}},\"state\":{\"boot-time\":\"1740559631\",\"current-datetime\":\"2025-02-26T19:18:35Z\",\"software-version\":\"debian:12\"}}}", "pnd_id": "5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d" }, { @@ -258,8 +291,8 @@ "transport_username": "admin", "transport_password": "admin", "transport_tls": true, - "plugin": "3de782ef-e51b-472c-a0fb-8ba48768e7ac", - "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":789,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.12\",\"prefix-length\":16},\"ip\":\"172.100.0.12\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::a\",\"prefix-length\":64},\"ip\":\"2001:db8::a\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:c\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:c\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":791,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe7d:5116\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe7d:5116\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":785,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe4f:65ae\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe4f:65ae\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch1\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"6650664\",\"physical\":\"63586184\",\"used\":\"56935520\"}},\"state\":{\"boot-time\":\"1740042208\",\"current-datetime\":\"2025-02-26T11:00:46Z\",\"software-version\":\"debian:12\"}}}", + "plugin": "d1c269a2-6482-4010-b0d8-679dff73153b", + "model": "{\"openconfig-interfaces:interfaces\":{\"interface\":[{\"config\":{\"enabled\":true,\"mtu\":1500,\"name\":\"eth0\"},\"name\":\"eth0\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1023,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"172.100.0.12\",\"prefix-length\":16},\"ip\":\"172.100.0.12\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"2001:db8::9\",\"prefix-length\":64},\"ip\":\"2001:db8::9\"}]}}},{\"config\":{\"index\":1},\"index\":1,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::42:acff:fe64:c\",\"prefix-length\":64},\"ip\":\"fe80::42:acff:fe64:c\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth1\"},\"name\":\"eth1\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1028,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fec8:de01\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fec8:de01\"}]}}}]}},{\"config\":{\"enabled\":true,\"mtu\":9500,\"name\":\"eth2\"},\"name\":\"eth2\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1019,\"loopback-mode\":false,\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"fe80::a8c1:abff:fe5f:5950\",\"prefix-length\":64},\"ip\":\"fe80::a8c1:abff:fe5f:5950\"}]}}}]}},{\"config\":{\"enabled\":false,\"mtu\":0,\"name\":\"lo\"},\"name\":\"lo\",\"state\":{\"admin-status\":\"UP\",\"ifindex\":1,\"loopback-mode\":true,\"oper-status\":\"UNKNOWN\"},\"subinterfaces\":{\"subinterface\":[{\"config\":{\"index\":0},\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"127.0.0.1\",\"prefix-length\":8},\"ip\":\"127.0.0.1\"}]}},\"openconfig-if-ip:ipv6\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"::1\",\"prefix-length\":128},\"ip\":\"::1\"}]}}}]}}]},\"openconfig-network-instance:network-instances\":{\"network-instance\":[{\"config\":{\"name\":\"DEFAULT\"},\"name\":\"DEFAULT\",\"protocols\":{\"protocol\":[{\"config\":{\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\"},\"identifier\":\"openconfig-policy-types:STATIC\",\"name\":\"STATIC\",\"static-routes\":{\"static\":[{\"config\":{\"prefix\":\"0.0.0.0/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_172.100.0.1\",\"next-hop\":\"172.100.0.1\"},\"index\":\"AUTO_172.100.0.1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"0.0.0.0/0\"},{\"config\":{\"prefix\":\"::/0\"},\"next-hops\":{\"next-hop\":[{\"config\":{\"index\":\"AUTO_2001:db8::1\",\"next-hop\":\"2001:db8::1\"},\"index\":\"AUTO_2001:db8::1\",\"interface-ref\":{\"config\":{\"interface\":\"eth0\"}}}]},\"prefix\":\"::/0\"}]}}]}}]},\"openconfig-system:system\":{\"clock\":{\"config\":{\"timezone-name\":\"UTC\"}},\"config\":{\"domain-name\":\"Not.implemented.yet\",\"hostname\":\"gnmi-target-switch1\",\"motd-banner\":\"\\nThe programs included with the Debian GNU/Linux system are free software;\\nthe exact distribution terms for each program are described in the\\nindividual files in /usr/share/doc/*/copyright.\\n\\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\\npermitted by applicable law.\\n\"},\"memory\":{\"state\":{\"free\":\"6126836\",\"physical\":\"32767196\",\"used\":\"26640360\"}},\"state\":{\"boot-time\":\"1740559631\",\"current-datetime\":\"2025-02-26T19:18:35Z\",\"software-version\":\"debian:12\"}}}", "pnd_id": "5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d" } ] diff --git a/applications/rtdt-manager/venv/venv.go b/applications/rtdt-manager/venv/venv.go index 7fffc7eeadc60e670998e1df167f605b590b4247..1e9edbf042fb1150f3eb2942407ba50b556c87e7 100644 --- a/applications/rtdt-manager/venv/venv.go +++ b/applications/rtdt-manager/venv/venv.go @@ -81,8 +81,8 @@ func NewVEnv(name, clabFilename, user, pass string, wg *sync.WaitGroup, sdnConfi } } - fmt.Printf("[%s] - Sleep for 15 seconds to give containers time to settle..\n", name) - time.Sleep(time.Second * 15) + fmt.Printf("[%s] - Sleep for 10 seconds to give containers time to settle..\n", name) + time.Sleep(time.Second * 10) // Now log into gosdn physical network dialOption := grpc.WithTransportCredentials(insecure.NewCredentials()) gosdnconn, err := grpc.NewClient(gosdnAddress, dialOption, grpc.WithDefaultCallOptions()) @@ -131,6 +131,8 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error { fmt.Println("PARSING ERROR") return err } + fmt.Println("Going to try and upload this sdnconfig json:") + fmt.Println(string(sdnConfigParsed)) configService := configPb.NewConfigurationManagementServiceClient(v.auth.GetConn()) request := &configPb.ImportSDNConfigRequest{ Timestamp: util.Now(), diff --git a/controller/interfaces/networkelement/networkElement.go b/controller/interfaces/networkelement/networkElement.go index 9a595d10a730cfd7eb2445c6639207019378d06e..39b7ae9c3297a68c1f3ff22dc3637255d8c3ea04 100644 --- a/controller/interfaces/networkelement/networkElement.go +++ b/controller/interfaces/networkelement/networkElement.go @@ -2,6 +2,7 @@ package networkelement import ( "context" + "fmt" "code.fbi.h-da.de/danet/gosdn/controller/conflict" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/plugin" @@ -79,12 +80,14 @@ func EnsureIntendedConfigurationIsAppliedOnNetworkElement(mne NetworkElement) er if err != nil { return err } + fmt.Println("Made it here 0") req := &gpb.SetRequest{} path, err := ygot.StringToStructuredPath("/") if err != nil { return err } + fmt.Println("Made it here 1") req.Update = []*gpb.Update{{ Path: path, @@ -93,11 +96,13 @@ func EnsureIntendedConfigurationIsAppliedOnNetworkElement(mne NetworkElement) er }, }} + // This is where ApplyConfig fails for some reason.. response, err := mne.Transport().CustomSet(context.Background(), req) if err != nil { log.Errorf("Failed to apply model of network element err=%+v, response=%+v", err, response) return err } + fmt.Println("Made it here 2") return nil } diff --git a/controller/northbound/server/configurationmanagement.go b/controller/northbound/server/configurationmanagement.go index 0dabea7d5c4ad56622e78b8e989f0f9b59000abd..8b93acc6c6c6be762ef1536fc8a162cce6287222 100644 --- a/controller/northbound/server/configurationmanagement.go +++ b/controller/northbound/server/configurationmanagement.go @@ -3,6 +3,7 @@ package server import ( "context" "encoding/json" + "fmt" "time" cmpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/configurationmanagement" @@ -81,6 +82,7 @@ type loadedSDNConfig struct { // ExportSDNConfig returns the SDN configuration. func (c ConfigurationManagementServer) ExportSDNConfig(ctx context.Context, request *cmpb.ExportSDNConfigRequest) (*cmpb.ExportSDNConfigResponse, error) { if err := c.protoValidator.Validate(request); err != nil { + fmt.Printf("Error in gosdn when exporting/validating sdn config: %v\n", err) return nil, status.Errorf(codes.Aborted, "%v", err) } @@ -93,6 +95,23 @@ func (c ConfigurationManagementServer) ExportSDNConfig(ctx context.Context, requ return nil, err } + // This shouldn't really be needed since re-applying is not possible at this moment + // But for completeness-sake it could still be included + Plugins, err := c.pluginService.GetAll() + if err != nil { + return nil, err + } + for _, plug := range Plugins { + loadedPlugin := plugin.LoadedPlugin{ + ID: plug.ID().String(), + ExecPath: plug.ExecPath(), + Manifest: *plug.Manifest(), + ReattachConfig: *plug.GetClient().ReattachConfig(), + } + sdnConfig.Plugins = append(sdnConfig.Plugins, loadedPlugin) + + } + sdnConfig.Nodes, err = c.nodeService.GetAll() if err != nil { return nil, err @@ -122,6 +141,7 @@ func (c ConfigurationManagementServer) ExportSDNConfig(ctx context.Context, requ // ImportSDNConfig receives an SDN configuration and imports it. func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, request *cmpb.ImportSDNConfigRequest) (*cmpb.ImportSDNConfigResponse, error) { if err := c.protoValidator.Validate(request); err != nil { + fmt.Printf("Error in gosdn when importing/validating sdn config: %v\n", err) return nil, status.Errorf(codes.Aborted, "%v", err) } @@ -129,6 +149,7 @@ func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, requ var sdnConfig = loadedSDNConfig{} err := json.Unmarshal([]byte(request.SdnConfigData), &sdnConfig) if err != nil { + fmt.Printf("Error in gosdn when importing/unmarshalling sdn config: %v\n", err) return nil, err } @@ -319,6 +340,7 @@ func (c ConfigurationManagementServer) createNetworkElements(sdnConfig *loadedSD if err != nil { return err } + fmt.Println(inputNetworkElement.Name, "DEBUG CHECK 0") createdNetworkElement, err := nucleus.NewNetworkElement( inputNetworkElement.Name, @@ -333,6 +355,7 @@ func (c ConfigurationManagementServer) createNetworkElements(sdnConfig *loadedSD return err } + fmt.Println(inputNetworkElement.Name, "DEBUG CHECK 1") if err := c.mneService.Add(createdNetworkElement); err != nil { return err } @@ -341,6 +364,7 @@ func (c ConfigurationManagementServer) createNetworkElements(sdnConfig *loadedSD return err } + fmt.Println(inputNetworkElement.Name, "DEBUG CHECK 2") err = c.mneService.UpdateModel(createdNetworkElement.ID(), inputNetworkElement.Model) if err != nil { return err @@ -351,9 +375,15 @@ func (c ConfigurationManagementServer) createNetworkElements(sdnConfig *loadedSD return err } + networkElementAsString, err := networkElement.GetModelAsString() + if err != nil { + return err + } + fmt.Println(inputNetworkElement.Name, "DEBUG CHECK 3, networkElement:", networkElementAsString) if err := networkelement.EnsureIntendedConfigurationIsAppliedOnNetworkElement(networkElement); err != nil { return err } + fmt.Println(inputNetworkElement.Name, "DEBUG CHECK 4") } return nil }