forked from pjanik/orion.server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 422288 - Use docker.io to enhance the Orion shell capability
- Loading branch information
Anthony Hunter
committed
Nov 26, 2013
1 parent
ad54c9b
commit ef0f602
Showing
7 changed files
with
711 additions
and
27 deletions.
There are no files selected for viewing
129 changes: 129 additions & 0 deletions
129
...erver.servlets/src/org/eclipse/orion/internal/server/servlets/docker/DockerContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.orion.internal.server.servlets.docker; | ||
|
||
/** | ||
* The response for container requests using the Docker Remote API. | ||
* | ||
* @author Anthony Hunter | ||
*/ | ||
public class DockerContainer extends DockerResponse { | ||
|
||
public static final String COMMAND = "Command"; | ||
|
||
public static final String CREATED = "Created"; | ||
|
||
public static final String ID = "Id"; | ||
|
||
public static final String IMAGE = "Image"; | ||
|
||
public static final String NAME = "Name"; | ||
|
||
public static final String NAMES = "Names"; | ||
|
||
public static final String PORTS = "Ports"; | ||
|
||
public static final String SIZE_ROOT_FS = "SizeRootFs"; | ||
|
||
public static final String SIZE_RW = "SizeRw"; | ||
|
||
public static final String STATUS = "Status"; | ||
|
||
private String command; | ||
|
||
private String created; | ||
|
||
private String id; | ||
|
||
private String image; | ||
|
||
private String name; | ||
|
||
private String ports; | ||
|
||
private int size; | ||
|
||
private int sizeRootFs; | ||
|
||
private String status; | ||
|
||
public String getCommand() { | ||
return command; | ||
} | ||
|
||
public String getCreated() { | ||
return created; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getImage() { | ||
return image; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getPorts() { | ||
return ports; | ||
} | ||
|
||
public int getSize() { | ||
return size; | ||
} | ||
|
||
public int getSizeRootFs() { | ||
return sizeRootFs; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setCommand(String command) { | ||
this.command = command; | ||
} | ||
|
||
public void setCreated(String created) { | ||
this.created = created; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public void setImage(String image) { | ||
this.image = image; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public void setPorts(String ports) { | ||
this.ports = ports; | ||
} | ||
|
||
public void setSize(int size) { | ||
this.size = size; | ||
} | ||
|
||
public void setSizeRootFs(int sizeRootFs) { | ||
this.sizeRootFs = sizeRootFs; | ||
} | ||
|
||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...rver.servlets/src/org/eclipse/orion/internal/server/servlets/docker/DockerContainers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.orion.internal.server.servlets.docker; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* The response for container list request using the Docker Remote API. | ||
* | ||
* @author Anthony Hunter | ||
*/ | ||
public class DockerContainers extends DockerResponse { | ||
private List<DockerContainer> containers; | ||
|
||
public DockerContainers() { | ||
super(); | ||
this.containers = new ArrayList<DockerContainer>(); | ||
} | ||
|
||
public List<DockerContainer> getContainers() { | ||
return containers; | ||
} | ||
|
||
public void addContainer(DockerContainer Container) { | ||
this.containers.add(Container); | ||
} | ||
|
||
} |
97 changes: 97 additions & 0 deletions
97
...on.server.servlets/src/org/eclipse/orion/internal/server/servlets/docker/DockerImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.orion.internal.server.servlets.docker; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* The response for image requests using the Docker Remote API. | ||
* | ||
* @author Anthony Hunter | ||
*/ | ||
public class DockerImage extends DockerResponse { | ||
|
||
public static final String CREATED = "Created"; | ||
|
||
public static final String ID = "Id"; | ||
|
||
public static final String REPOTAGS = "RepoTags"; | ||
|
||
public static final String SIZE = "Size"; | ||
|
||
public static final String VIRTUAL_SIZE = "VirtualSize"; | ||
|
||
private String created; | ||
|
||
private String id; | ||
|
||
private String repository; | ||
|
||
private long size; | ||
|
||
private List<String> tags; | ||
|
||
private long virtualSize; | ||
|
||
public DockerImage() { | ||
super(); | ||
this.tags = new ArrayList<String>(); | ||
} | ||
|
||
public void addTag(String repoTag) { | ||
this.tags.add(repoTag); | ||
} | ||
|
||
public String getCreated() { | ||
return created; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getRepository() { | ||
return repository; | ||
} | ||
|
||
public long getSize() { | ||
return size; | ||
} | ||
|
||
public List<String> getTags() { | ||
return tags; | ||
} | ||
|
||
public long getVirtualSize() { | ||
return virtualSize; | ||
} | ||
|
||
public void setCreated(String created) { | ||
this.created = created; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public void setRepository(String repository) { | ||
this.repository = repository; | ||
} | ||
|
||
public void setSize(long size) { | ||
this.size = size; | ||
} | ||
|
||
public void setVirtualSize(long virtualSize) { | ||
this.virtualSize = virtualSize; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...n.server.servlets/src/org/eclipse/orion/internal/server/servlets/docker/DockerImages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.orion.internal.server.servlets.docker; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* The response for image list request using the Docker Remote API. | ||
* | ||
* @author Anthony Hunter | ||
*/ | ||
public class DockerImages extends DockerResponse { | ||
private List<DockerImage> images; | ||
|
||
public DockerImages() { | ||
super(); | ||
this.images = new ArrayList<DockerImage>(); | ||
} | ||
|
||
public List<DockerImage> getImages() { | ||
return images; | ||
} | ||
|
||
public void addImage(DockerImage image) { | ||
this.images.add(image); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.