Skip to content

Commit 319fd1a

Browse files
committed
[grid] Moving grid docker package to a more logical location.
1 parent 1477907 commit 319fd1a

File tree

11 files changed

+20
-24
lines changed

11 files changed

+20
-24
lines changed

java/src/org/openqa/selenium/cli/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* build a {@link org.openqa.selenium.grid.config.Config} instance, for
2323
* which there are strongly-typed role-specific classes that use a
2424
* {@code Config}, such as
25-
* {@link org.openqa.selenium.grid.docker.DockerOptions}.
25+
* {@link org.openqa.selenium.grid.node.docker.DockerOptions}.
2626
*
2727
* <p>Assuming your {@code CliCommand} extends
2828
* {@link org.openqa.selenium.grid.TemplateGridCommand}, the process for

java/src/org/openqa/selenium/docker/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ java_library(
55
name = "docker",
66
srcs = glob(["**/*.java"]),
77
visibility = [
8-
"//java/src/org/openqa/selenium/grid/docker:__pkg__",
8+
"//java/src/org/openqa/selenium/grid/node/docker:__pkg__",
99
"//java/test/org/openqa/selenium/docker:__subpackages__",
1010
],
1111
deps = [

java/src/org/openqa/selenium/grid/docker/DockerAssetsPath.java renamed to java/src/org/openqa/selenium/grid/node/docker/DockerAssetsPath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.grid.docker;
18+
package org.openqa.selenium.grid.node.docker;
1919

2020
import org.openqa.selenium.remote.SessionId;
2121

java/src/org/openqa/selenium/grid/docker/DockerFlags.java renamed to java/src/org/openqa/selenium/grid/node/docker/DockerFlags.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.grid.docker;
18+
package org.openqa.selenium.grid.node.docker;
1919

2020
import static org.openqa.selenium.grid.config.StandardGridRoles.NODE_ROLE;
21-
import static org.openqa.selenium.grid.docker.DockerOptions.DEFAULT_ASSETS_PATH;
22-
import static org.openqa.selenium.grid.docker.DockerOptions.DEFAULT_DOCKER_URL;
23-
import static org.openqa.selenium.grid.docker.DockerOptions.DEFAULT_VIDEO_IMAGE;
24-
import static org.openqa.selenium.grid.docker.DockerOptions.DOCKER_SECTION;
2521

2622
import com.google.auto.service.AutoService;
2723

@@ -44,21 +40,21 @@ public class DockerFlags implements HasRoles {
4440
names = {"--docker-url"},
4541
description = "URL for connecting to the docker daemon"
4642
)
47-
@ConfigValue(section = DOCKER_SECTION, name = "url", example = DEFAULT_DOCKER_URL)
43+
@ConfigValue(section = DockerOptions.DOCKER_SECTION, name = "url", example = DockerOptions.DEFAULT_DOCKER_URL)
4844
private String dockerUrl;
4945

5046
@Parameter(
5147
names = {"--docker-host"},
5248
description = "Host name where the docker daemon is running"
5349
)
54-
@ConfigValue(section = DOCKER_SECTION, name = "host", example = "\"localhost\"")
50+
@ConfigValue(section = DockerOptions.DOCKER_SECTION, name = "host", example = "\"localhost\"")
5551
private String dockerHost;
5652

5753
@Parameter(
5854
names = {"--docker-port"},
5955
description = "Port where the docker daemon is running"
6056
)
61-
@ConfigValue(section = DOCKER_SECTION, name = "port", example = "2375")
57+
@ConfigValue(section = DockerOptions.DOCKER_SECTION, name = "port", example = "2375")
6258
private Integer dockerPort;
6359

6460
@Parameter(
@@ -69,7 +65,7 @@ public class DockerFlags implements HasRoles {
6965
variableArity = true,
7066
splitter = NonSplittingSplitter.class)
7167
@ConfigValue(
72-
section = DOCKER_SECTION,
68+
section = DockerOptions.DOCKER_SECTION,
7369
name = "configs",
7470
example = "[\"selenium/standalone-firefox:latest\", \"{\\\"browserName\\\": \\\"firefox\\\"}\"]")
7571
private List<String> images2Capabilities;
@@ -78,14 +74,14 @@ public class DockerFlags implements HasRoles {
7874
names = {"--docker-video-image"},
7975
description = "Docker image to be used when video recording is enabled"
8076
)
81-
@ConfigValue(section = DOCKER_SECTION, name = "video-image", example = DEFAULT_VIDEO_IMAGE)
82-
private String videoImage = DEFAULT_VIDEO_IMAGE;
77+
@ConfigValue(section = DockerOptions.DOCKER_SECTION, name = "video-image", example = DockerOptions.DEFAULT_VIDEO_IMAGE)
78+
private String videoImage = DockerOptions.DEFAULT_VIDEO_IMAGE;
8379

8480
@Parameter(
8581
names = {"--docker-assets-path"},
8682
description = "Absolute path where assets will be stored"
8783
)
88-
@ConfigValue(section = DOCKER_SECTION, name = "assets-path", example = DEFAULT_ASSETS_PATH)
84+
@ConfigValue(section = DockerOptions.DOCKER_SECTION, name = "assets-path", example = DockerOptions.DEFAULT_ASSETS_PATH)
8985
private String assetsPath;
9086

9187
@Override

java/src/org/openqa/selenium/grid/docker/DockerOptions.java renamed to java/src/org/openqa/selenium/grid/node/docker/DockerOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.grid.docker;
18+
package org.openqa.selenium.grid.node.docker;
19+
20+
import static org.openqa.selenium.Platform.WINDOWS;
1921

2022
import com.google.common.collect.HashMultimap;
2123
import com.google.common.collect.ImmutableMultimap;
@@ -49,8 +51,6 @@
4951
import java.util.concurrent.ExecutionException;
5052
import java.util.logging.Logger;
5153

52-
import static org.openqa.selenium.Platform.WINDOWS;
53-
5454
public class DockerOptions {
5555

5656
static final String DOCKER_SECTION = "docker";

java/src/org/openqa/selenium/grid/docker/DockerSession.java renamed to java/src/org/openqa/selenium/grid/node/docker/DockerSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.grid.docker;
18+
package org.openqa.selenium.grid.node.docker;
1919

2020
import org.openqa.selenium.Capabilities;
2121
import org.openqa.selenium.docker.Container;

java/src/org/openqa/selenium/grid/docker/DockerSessionFactory.java renamed to java/src/org/openqa/selenium/grid/node/docker/DockerSessionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.openqa.selenium.grid.docker;
18+
package org.openqa.selenium.grid.node.docker;
1919

2020
import static java.util.Optional.ofNullable;
2121
import static org.openqa.selenium.docker.ContainerConfig.image;

java/src/org/openqa/selenium/grid/node/local/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ java_library(
66
srcs = glob(["*.java"]),
77
visibility = [
88
"//java/src/org/openqa/selenium/grid/commands:__pkg__",
9-
"//java/src/org/openqa/selenium/grid/docker:__pkg__",
109
"//java/src/org/openqa/selenium/grid/node/config:__pkg__",
10+
"//java/src/org/openqa/selenium/grid/node/docker:__pkg__",
1111
"//java/src/org/openqa/selenium/grid/node/httpd:__pkg__",
1212
"//java/test/org/openqa/selenium/grid:__subpackages__",
1313
],
@@ -19,11 +19,11 @@ java_library(
1919
"//java/src/org/openqa/selenium/grid/component",
2020
"//java/src/org/openqa/selenium/grid/config",
2121
"//java/src/org/openqa/selenium/grid/data",
22-
"//java/src/org/openqa/selenium/grid/docker",
2322
"//java/src/org/openqa/selenium/grid/jmx",
2423
"//java/src/org/openqa/selenium/grid/log",
2524
"//java/src/org/openqa/selenium/grid/node",
2625
"//java/src/org/openqa/selenium/grid/node/config",
26+
"//java/src/org/openqa/selenium/grid/node/docker:docker",
2727
"//java/src/org/openqa/selenium/grid/node/relay",
2828
"//java/src/org/openqa/selenium/grid/security",
2929
"//java/src/org/openqa/selenium/grid/server",

java/src/org/openqa/selenium/grid/node/local/LocalNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import org.openqa.selenium.grid.data.SessionClosedEvent;
5757
import org.openqa.selenium.grid.data.Slot;
5858
import org.openqa.selenium.grid.data.SlotId;
59-
import org.openqa.selenium.grid.docker.DockerSession;
6059
import org.openqa.selenium.grid.jmx.JMXHelper;
6160
import org.openqa.selenium.grid.jmx.ManagedAttribute;
6261
import org.openqa.selenium.grid.jmx.ManagedService;
@@ -65,6 +64,7 @@
6564
import org.openqa.selenium.grid.node.Node;
6665
import org.openqa.selenium.grid.node.SessionFactory;
6766
import org.openqa.selenium.grid.node.config.NodeOptions;
67+
import org.openqa.selenium.grid.node.docker.DockerSession;
6868
import org.openqa.selenium.grid.security.Secret;
6969
import org.openqa.selenium.internal.Debug;
7070
import org.openqa.selenium.internal.Either;

0 commit comments

Comments
 (0)