diff --git a/applications/venv-manager/node/node.go b/applications/venv-manager/node/node.go index d33e3e475b523277c07d60ebdbe5f306d5c8ef26..bdb9e49d09f2ebf1d5c9e220d99428a7650563f9 100644 --- a/applications/venv-manager/node/node.go +++ b/applications/venv-manager/node/node.go @@ -26,8 +26,16 @@ func (n *Node) FillAllFields(containerRegistryURL string) { // Works if linux and our gnmi target is used. softwareVersion := n.YangData.System.State.SoftwareVersion if softwareVersion != nil { - n.Kind = "linux" - n.Image = containerRegistryURL + *softwareVersion + // Checks if software version is in compatible format. + result, _ := regexp.MatchString(`^([A-Za-z0-9\.\/])*:([A-Za-z0-9\.])*`, *softwareVersion) + if result { + n.Kind = "linux" + n.Image = containerRegistryURL + *softwareVersion + return + } + + n.Kind = "couldn't detect kind" + n.Image = "couldn't detect image" return }