SEBA-975 cordctl should work with xos 4.x
Change-Id: Ibd64d9eb4a61bc46ec39e971a71a971a82577e01
diff --git a/internal/pkg/commands/command.go b/internal/pkg/commands/command.go
index 51f8d01..50a50dc 100644
--- a/internal/pkg/commands/command.go
+++ b/internal/pkg/commands/command.go
@@ -36,8 +36,6 @@
OUTPUT_TABLE OutputType = iota
OUTPUT_JSON
OUTPUT_YAML
-
- CORE_VERSION_CONSTRAINT = ">= 3, < 4" // Support XOS major version 3
)
// Make it easy to override output stream for testing
diff --git a/internal/pkg/commands/common.go b/internal/pkg/commands/common.go
index 4629534..273bd5e 100644
--- a/internal/pkg/commands/common.go
+++ b/internal/pkg/commands/common.go
@@ -108,7 +108,7 @@
return nil, nil, err
}
- constraint, err := versionUtils.NewConstraint(CORE_VERSION_CONSTRAINT)
+ constraint, err := versionUtils.NewConstraint(config.CORE_VERSION_CONSTRAINT)
if err != nil {
return nil, nil, err
}
@@ -117,7 +117,7 @@
return nil, nil, corderrors.WithStackTrace(&corderrors.VersionConstraintError{
Name: "xos-core",
Version: serverVersion.String(),
- Constraint: CORE_VERSION_CONSTRAINT})
+ Constraint: config.CORE_VERSION_CONSTRAINT})
}
}
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 382e0c2..e335bfc 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -34,7 +34,7 @@
OUTPUT_JSON
OUTPUT_YAML
- CORE_VERSION_CONSTRAINT = ">= 3, < 4" // Support XOS major version 3
+ CORE_VERSION_CONSTRAINT = ">= 3, < 5" // Support XOS major versions 3 and 4
)
var CharReplacer = strings.NewReplacer("\\t", "\t", "\\n", "\n")