diff --git a/crds/base/robot.roboscale.io_buildmanagers.yaml b/crds/base/robot.roboscale.io_buildmanagers.yaml index bdc53864..8361eadd 100644 --- a/crds/base/robot.roboscale.io_buildmanagers.yaml +++ b/crds/base/robot.roboscale.io_buildmanagers.yaml @@ -189,8 +189,8 @@ spec: applied if the scope type is `Path`. type: string scopeType: - description: Type of the BuildManager scope. Allowed scopes - are `Workspace` and `Path`. + description: Type of the scope. Allowed scopes are `Workspace` + and `Path`. type: string workspace: description: Name of the workspace. Should be selected among @@ -470,8 +470,8 @@ spec: applied if the scope type is `Path`. type: string scopeType: - description: Type of the BuildManager scope. Allowed - scopes are `Workspace` and `Path`. + description: Type of the scope. Allowed scopes are `Workspace` + and `Path`. type: string workspace: description: Name of the workspace. Should be selected diff --git a/crds/base/robot.roboscale.io_launchmanagers.yaml b/crds/base/robot.roboscale.io_launchmanagers.yaml index 43565f37..56c52b9b 100644 --- a/crds/base/robot.roboscale.io_launchmanagers.yaml +++ b/crds/base/robot.roboscale.io_launchmanagers.yaml @@ -233,12 +233,6 @@ spec: - Run - Custom type: string - required: - - cmd - - disableSourcingWs - - executable - - launchfile - - package type: object instances: description: Cluster selector. If the current instance name @@ -252,12 +246,27 @@ spec: be defined relative, not absolute. (eg. `cmd_vel` instead of /cmd_vel``) type: boolean - workspace: - description: Name of the workspace. Should be selected among - the existing workspaces in WorkspaceManager's manifests. - type: string + scope: + description: Selects the scope for launch. + properties: + path: + description: Absolute path of the directory. It's being + applied if the scope type is `Path`. + type: string + scopeType: + description: Type of the scope. Allowed scopes are `Workspace` + and `Path`. + type: string + workspace: + description: Name of the workspace. Should be selected among + the existing workspaces in WorkspaceManager's manifests. + It's being applied if the scope type is `Workspace`. + type: string + required: + - scopeType + type: object required: - - workspace + - scope type: object description: Launch descriptions. Every object defined here generates a launching command in the specified workspace. diff --git a/crds/base/robot.roboscale.io_robots.yaml b/crds/base/robot.roboscale.io_robots.yaml index fe5014c8..ff8dd2b3 100644 --- a/crds/base/robot.roboscale.io_robots.yaml +++ b/crds/base/robot.roboscale.io_robots.yaml @@ -940,8 +940,8 @@ spec: It's being applied if the scope type is `Path`. type: string scopeType: - description: Type of the BuildManager scope. - Allowed scopes are `Workspace` and `Path`. + description: Type of the scope. Allowed scopes + are `Workspace` and `Path`. type: string workspace: description: Name of the workspace. Should be diff --git a/pom.xml b/pom.xml index b7ab48ae..fbe0c1fa 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.roboscale.robot robot-fabric8-client - 0.1.0-alpha.19 + 0.1.0-alpha.20 robot-fabric8-client https://robolaunch.io diff --git a/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerspec/steps/Scope.java b/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerspec/steps/Scope.java index ff644de9..c96cff44 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerspec/steps/Scope.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerspec/steps/Scope.java @@ -23,11 +23,11 @@ public void setPath(String path) { } /** - * Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`. + * Type of the scope. Allowed scopes are `Workspace` and `Path`. */ @com.fasterxml.jackson.annotation.JsonProperty("scopeType") @io.fabric8.generator.annotation.Required() - @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`.") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the scope. Allowed scopes are `Workspace` and `Path`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String scopeType; diff --git a/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerstatus/steps/step/Scope.java b/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerstatus/steps/step/Scope.java index edd961da..a7ffabb3 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerstatus/steps/step/Scope.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/buildmanagerstatus/steps/step/Scope.java @@ -23,11 +23,11 @@ public void setPath(String path) { } /** - * Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`. + * Type of the scope. Allowed scopes are `Workspace` and `Path`. */ @com.fasterxml.jackson.annotation.JsonProperty("scopeType") @io.fabric8.generator.annotation.Required() - @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`.") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the scope. Allowed scopes are `Workspace` and `Path`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String scopeType; diff --git a/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/Launches.java b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/Launches.java index 65d66bf7..1d766cab 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/Launches.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/Launches.java @@ -1,7 +1,7 @@ package io.roboscale.robot.v1alpha1.launchmanagerspec; @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) -@com.fasterxml.jackson.annotation.JsonPropertyOrder({"container","entrypoint","instances","namespacing","workspace"}) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"container","entrypoint","instances","namespacing","scope"}) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") public class Launches implements io.fabric8.kubernetes.api.model.KubernetesResource { @@ -71,20 +71,20 @@ public void setNamespacing(Boolean namespacing) { } /** - * Name of the workspace. Should be selected among the existing workspaces in WorkspaceManager's manifests. + * Selects the scope for launch. */ - @com.fasterxml.jackson.annotation.JsonProperty("workspace") + @com.fasterxml.jackson.annotation.JsonProperty("scope") @io.fabric8.generator.annotation.Required() - @com.fasterxml.jackson.annotation.JsonPropertyDescription("Name of the workspace. Should be selected among the existing workspaces in WorkspaceManager's manifests.") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Selects the scope for launch.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) - private String workspace; + private io.roboscale.robot.v1alpha1.launchmanagerspec.launches.Scope scope; - public String getWorkspace() { - return workspace; + public io.roboscale.robot.v1alpha1.launchmanagerspec.launches.Scope getScope() { + return scope; } - public void setWorkspace(String workspace) { - this.workspace = workspace; + public void setScope(io.roboscale.robot.v1alpha1.launchmanagerspec.launches.Scope scope) { + this.scope = scope; } } diff --git a/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Entrypoint.java b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Entrypoint.java index 8e7499b2..7cd805c0 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Entrypoint.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Entrypoint.java @@ -10,7 +10,6 @@ public class Entrypoint implements io.fabric8.kubernetes.api.model.KubernetesRes * Custom command to launch packages or start nodes. Required if the launch type is `Custom`. */ @com.fasterxml.jackson.annotation.JsonProperty("cmd") - @io.fabric8.generator.annotation.Required() @com.fasterxml.jackson.annotation.JsonPropertyDescription("Custom command to launch packages or start nodes. Required if the launch type is `Custom`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String cmd; @@ -27,7 +26,6 @@ public void setCmd(String cmd) { * If `true`, workspaces are not sourced by default. Used if the launch type is `Custom`. */ @com.fasterxml.jackson.annotation.JsonProperty("disableSourcingWs") - @io.fabric8.generator.annotation.Required() @com.fasterxml.jackson.annotation.JsonPropertyDescription("If `true`, workspaces are not sourced by default. Used if the launch type is `Custom`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private Boolean disableSourcingWs; @@ -44,7 +42,6 @@ public void setDisableSourcingWs(Boolean disableSourcingWs) { * Executable file name. (eg. `webcam_pub.py`) Required and used if the launch type is `Run`. */ @com.fasterxml.jackson.annotation.JsonProperty("executable") - @io.fabric8.generator.annotation.Required() @com.fasterxml.jackson.annotation.JsonPropertyDescription("Executable file name. (eg. `webcam_pub.py`) Required and used if the launch type is `Run`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String executable; @@ -61,7 +58,6 @@ public void setExecutable(String executable) { * Launchfile. (eg. `nav_launch.py`) Required and used if the launch type is `Launch`. */ @com.fasterxml.jackson.annotation.JsonProperty("launchfile") - @io.fabric8.generator.annotation.Required() @com.fasterxml.jackson.annotation.JsonPropertyDescription("Launchfile. (eg. `nav_launch.py`) Required and used if the launch type is `Launch`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String launchfile; @@ -78,7 +74,6 @@ public void setLaunchfile(String launchfile) { * Package name. (eg. `robolaunch_cloudy_navigation`) */ @com.fasterxml.jackson.annotation.JsonProperty("package") - @io.fabric8.generator.annotation.Required() @com.fasterxml.jackson.annotation.JsonPropertyDescription("Package name. (eg. `robolaunch_cloudy_navigation`)") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String _package; diff --git a/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Scope.java b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Scope.java new file mode 100644 index 00000000..00ee9e3f --- /dev/null +++ b/src/main/java/io/roboscale/robot/v1alpha1/launchmanagerspec/launches/Scope.java @@ -0,0 +1,58 @@ +package io.roboscale.robot.v1alpha1.launchmanagerspec.launches; + +@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"path","scopeType","workspace"}) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") +public class Scope implements io.fabric8.kubernetes.api.model.KubernetesResource { + + /** + * Absolute path of the directory. It's being applied if the scope type is `Path`. + */ + @com.fasterxml.jackson.annotation.JsonProperty("path") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Absolute path of the directory. It's being applied if the scope type is `Path`.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String path; + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + /** + * Type of the scope. Allowed scopes are `Workspace` and `Path`. + */ + @com.fasterxml.jackson.annotation.JsonProperty("scopeType") + @io.fabric8.generator.annotation.Required() + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the scope. Allowed scopes are `Workspace` and `Path`.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String scopeType; + + public String getScopeType() { + return scopeType; + } + + public void setScopeType(String scopeType) { + this.scopeType = scopeType; + } + + /** + * Name of the workspace. Should be selected among the existing workspaces in WorkspaceManager's manifests. It's being applied if the scope type is `Workspace`. + */ + @com.fasterxml.jackson.annotation.JsonProperty("workspace") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Name of the workspace. Should be selected among the existing workspaces in WorkspaceManager's manifests. It's being applied if the scope type is `Workspace`.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String workspace; + + public String getWorkspace() { + return workspace; + } + + public void setWorkspace(String workspace) { + this.workspace = workspace; + } +} + diff --git a/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/attachedbuildobject/status/steps/step/Scope.java b/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/attachedbuildobject/status/steps/step/Scope.java index bb42ef9e..38f0b15d 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/attachedbuildobject/status/steps/step/Scope.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/attachedbuildobject/status/steps/step/Scope.java @@ -23,11 +23,11 @@ public void setPath(String path) { } /** - * Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`. + * Type of the scope. Allowed scopes are `Workspace` and `Path`. */ @com.fasterxml.jackson.annotation.JsonProperty("scopeType") @io.fabric8.generator.annotation.Required() - @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the BuildManager scope. Allowed scopes are `Workspace` and `Path`.") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Type of the scope. Allowed scopes are `Workspace` and `Path`.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) private String scopeType;