@Extension @ExportedBean public class DockerTraceabilityRootAction extends Object implements hudson.model.RootAction, hudson.search.SearchableModelObject, hudson.model.Saveable
| Constructor and Description |
|---|
DockerTraceabilityRootAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerID(String containerID)
Adds new container ID to the registry.
|
void |
doContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Gets a container
Fingerprint page. |
org.kohsuke.stapler.HttpResponse |
doDeleteContainer(String id)
Removes the container reference from the registry.
|
void |
doImage(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Gets an image
Fingerprint page. |
org.kohsuke.stapler.HttpResponse |
doQueryContainer(String id,
String mode,
long since,
long until)
Queries container statuses via API.
|
org.kohsuke.stapler.HttpResponse |
doRawContainerInfo(String id)
Retrieves the latest container status via API.
|
org.kohsuke.stapler.HttpResponse |
doRawImageInfo(String id)
Retrieves the latest raw status via API.
|
org.kohsuke.stapler.HttpResponse |
doSubmitContainerStatus(String inspectData,
String hostId,
String hostName,
String status,
long time,
String environment,
String imageName)
Submits a new event through Jenkins API.
|
org.kohsuke.stapler.HttpResponse |
doSubmitReport(String json)
Submits a new
DockerTraceabilityReport via API. |
hudson.model.Api |
getApi() |
Set<String> |
getContainerIDs()
Get a list of all Docker container IDs.
|
List<DockerContainerRecord> |
getContainerRecords()
Gets a last container record for every registered container.
|
DockerDeploymentFacet |
getDeploymentFacet(String containerId) |
String |
getDisplayName() |
hudson.model.Fingerprint |
getFingerprint(String containerId) |
String |
getIconFileName() |
static DockerTraceabilityRootAction |
getInstance()
Gets the
DockerTraceabilityRootAction of Jenkins instance. |
DockerContainerRecord |
getLastDeploymentRecord(String containerId) |
hudson.security.Permission |
getRequiredPermission() |
hudson.search.Search |
getSearch() |
hudson.search.SearchIndex |
getSearchIndex() |
String |
getSearchName() |
String |
getSearchUrl() |
String |
getUrlName() |
List<DockerAPIReport> |
records() |
void |
removeContainerID(String containerID)
Removes the container ID from the registry.
|
void |
save() |
public hudson.model.Api getApi()
@Nonnull public Set<String> getContainerIDs()
@Exported @Nonnull public List<DockerAPIReport> records()
@Nonnull public void addContainerID(@Nonnull String containerID) throws IOException
containerID - Container ID.IOException - Cannot save the list to the disk@Nonnull public void removeContainerID(@Nonnull String containerID) throws IOException
containerID - Container ID.IOException - Cannot save the list to the disk@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public hudson.model.Fingerprint getFingerprint(@Nonnull String containerId)
@CheckForNull public DockerDeploymentFacet getDeploymentFacet(@Nonnull String containerId)
@CheckForNull public DockerContainerRecord getLastDeploymentRecord(@Nonnull String containerId)
@Nonnull public List<DockerContainerRecord> getContainerRecords()
public String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getUrlName()
getUrlName in interface hudson.model.Actionpublic org.kohsuke.stapler.HttpResponse doSubmitContainerStatus(@QueryParameter(required=true)
String inspectData,
@QueryParameter(required=false)
String hostId,
@QueryParameter(required=false)
String hostName,
@QueryParameter(required=false)
String status,
@QueryParameter(required=false)
long time,
@QueryParameter(required=false)@CheckForNull
String environment,
@QueryParameter(required=false)@CheckForNull
String imageName)
throws IOException,
javax.servlet.ServletException
inspectData - JSON output of docker inspect container (array of container infos)hostName - Optional name of the host, which submitted the event
"unknown" by defaulthostId - Optional host ID.
"unknown" by defaultstatus - Optional status of the container.
By default, an artificial DockerEventType.NONE will be used.time - Optional time when the event happened.
The time is specified in seconds since January 1, 1970, 00:00:00 GMT
Default value - current timeenvironment - Optional field, which describes the environmentimageName - Optional field, which provides the name of the imageHttpResponseIOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doSubmitReport(@QueryParameter(required=true)
String json)
throws IOException,
javax.servlet.ServletException
DockerTraceabilityReport via API.json - String representation of DockerTraceabilityReportHttpResponsejavax.servlet.ServletException - Servlet errorIOException - Processing errorpublic void doContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
Fingerprint page.req - Stapler requestrsp - Stapler responseid - Container ID. Method supports full 64-char IDs only.IOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doDeleteContainer(@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
id - Container ID. Method supports full 64-char IDs only.IOException - Cannot save the updated DockerTraceabilityRootActionjavax.servlet.ServletException - Servlet exceptionpublic void doImage(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
Fingerprint page.req - Stapler requestrsp - Stapler responseid - Image ID. Method supports full 64-char IDs only.IOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doRawContainerInfo(@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
id - ID of the container, for which the info should be retrieved.
Short container IDs are not supported.IOException - Processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doQueryContainer(@QueryParameter(required=true)
String id,
@QueryParameter(required=false)
String mode,
@QueryParameter(required=false)
long since,
@QueryParameter(required=false)
long until)
throws IOException,
javax.servlet.ServletException
id - ID of the container, for which the info should be retrieved.
Short container IDs are not supported.mode - QueryMode. Default value - QueryMode#inspectContainersince - Optional starting time.
If the value equals to 0, the filter will be ignored (default in QueryParameter).until - End time.
If the value equals to 0, the filter will be ignored (default in QueryParameter).IOException - Processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doRawImageInfo(@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
id - ID of the image, for which the info should be retrieved.
Short container IDs are not supported.HttpResponseIOException - Processing errorjavax.servlet.ServletException - Servlet error@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public hudson.security.Permission getRequiredPermission()
public hudson.search.Search getSearch()
getSearch in interface hudson.search.SearchableModelObjectpublic String getSearchName()
getSearchName in interface hudson.search.SearchItempublic String getSearchUrl()
getSearchUrl in interface hudson.search.SearchItempublic hudson.search.SearchIndex getSearchIndex()
getSearchIndex in interface hudson.search.SearchItempublic void save()
throws IOException
save in interface hudson.model.SaveableIOException@CheckForNull public static DockerTraceabilityRootAction getInstance()
DockerTraceabilityRootAction of Jenkins instance.Copyright © 2015–2016. All rights reserved.