public class OcciConnector extends Object implements FHNConnector
| Modifier and Type | Field and Description |
|---|---|
protected cz.cesnet.cloud.occi.api.EntityBuilder |
eb |
| Constructor and Description |
|---|
OcciConnector(org.gcube.resources.federation.fhnmanager.api.type.VMProvider provider)
Create an OCCI connector for the given VM provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
associatePublicIp(URI uri) |
void |
connect()
Connect to the remote infrastructure.
|
URI |
createVM(String vmName,
OSTemplate ot,
org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt,
File scriptPath)
Create a VM.
|
URI |
createVM(String vmName,
OSTemplate ot,
org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt,
String script)
Create a VM
|
URI |
createVM(String vmName,
OSTemplate ot,
org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt,
URL scriptURL)
Create a VM.
|
void |
destroyVM(URI vmUri)
Destroy the VM with the given URI.
|
void |
destroyVM(VM vm)
Destroy a VM.
|
String |
getEndpoint()
Return the endpoint of the remote infrastructure.
|
Network |
getNetwork(URI uri) |
OSTemplate |
getOSTemplate(URI uri)
Return the VM template identified by the given URI.
|
org.gcube.resources.federation.fhnmanager.api.type.VMProvider |
getProvider()
Return the provider this connector has been created for.
|
org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate |
getResourceTemplate(URI uri) |
Storage |
getStorage(URI uri)
Return the storage identified by the given URI.
|
VM |
getVM(URI uri)
Return the VM identified by the given URI.
|
boolean |
isPublicNetwork(cz.cesnet.cloud.occi.core.Resource netResource) |
Collection<Network> |
listNetworks()
Return the list of available networks.
|
Collection<URI> |
listNetworkURIs()
Return the list of URIs of available networks.
|
Collection<OSTemplate> |
listOSTemplates()
Return the list of available OS templates.
|
Collection<URI> |
listOSTemplatesURIs()
Return a list of URIs of the available OS templates.
|
Collection<org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate> |
listResourceTemplates()
Return the list of available Resource templates.
|
Collection<URI> |
listResourceTemplatesURIs()
Return the list of URIs of available resource templates.
|
Collection<Storage> |
listStorages()
Return the list of available storage items.
|
Collection<URI> |
listStorageURIs()
Return the list of URIs of available storage items.
|
Collection<VM> |
listVM()
Return the list of available VMs (in any state).
|
Collection<URI> |
listVMURIs()
Return the list of URIs of the available VMs (in any state).
|
void |
setTrustStore(String path) |
void |
startVM(URI vmURI)
Start the VM with the given URI.
|
void |
startVM(VM vm)
Start the given VM.
|
void |
stopVM(URI vmURI)
Stop the VM with the given URI.
|
void |
stopVM(VM vm)
Start the given VM.
|
public OcciConnector(org.gcube.resources.federation.fhnmanager.api.type.VMProvider provider)
throws UnsupportedCredentialsTypeException
provider - the provider this connector has been created for.UnsupportedCredentialsTypeException - in case this connector does not support the credentials
associated with the provider.public org.gcube.resources.federation.fhnmanager.api.type.VMProvider getProvider()
public void connect()
throws cz.cesnet.cloud.occi.api.exception.CommunicationException
connect in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic String getEndpoint()
public Collection<OSTemplate> listOSTemplates() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistOSTemplates in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<URI> listOSTemplatesURIs() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistOSTemplatesURIs in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<URI> listResourceTemplatesURIs() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistResourceTemplatesURIs in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic OSTemplate getOSTemplate(URI uri)
FHNConnectorgetOSTemplate in interface FHNConnectoruri - the URI of the OS template.public Collection<org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate> listResourceTemplates() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistResourceTemplates in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate getResourceTemplate(URI uri)
getResourceTemplate in interface FHNConnectoruri - the URI of the resource templates.public Collection<URI> listVMURIs() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistVMURIs in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<VM> listVM() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic VM getVM(URI uri)
FHNConnectorgetVM in interface FHNConnectoruri - the uri of the VMpublic boolean isPublicNetwork(cz.cesnet.cloud.occi.core.Resource netResource)
public void associatePublicIp(URI uri) throws cz.cesnet.cloud.occi.api.exception.CommunicationException, UnknownHostException, URISyntaxException
associatePublicIp in interface FHNConnectorURISyntaxExceptionUnknownHostExceptioncz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic URI createVM(String vmName, OSTemplate ot, org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt, File scriptPath) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorcreateVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic URI createVM(String vmName, OSTemplate ot, org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt, String script) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorcreateVM in interface FHNConnectorvmName - the name of the VMscript - the contextualization script to run at startupcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic URI createVM(String vmName, OSTemplate ot, org.gcube.resources.federation.fhnmanager.api.type.ResourceTemplate rt, URL scriptURL) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorcreateVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void startVM(VM vm) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorstartVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void startVM(URI vmURI) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorstartVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void stopVM(VM vm) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorstopVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void stopVM(URI vmURI) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorstopVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void destroyVM(VM vm) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectordestroyVM in interface FHNConnectorvm - the VM to destroy.cz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic void destroyVM(URI vmUri) throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectordestroyVM in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<URI> listNetworkURIs() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistNetworkURIs in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<Network> listNetworks() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistNetworks in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Network getNetwork(URI uri)
getNetwork in interface FHNConnectoruri - the URI of the network.public Collection<URI> listStorageURIs() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistStorageURIs in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Collection<Storage> listStorages() throws cz.cesnet.cloud.occi.api.exception.CommunicationException
FHNConnectorlistStorages in interface FHNConnectorcz.cesnet.cloud.occi.api.exception.CommunicationExceptionpublic Storage getStorage(URI uri)
FHNConnectorgetStorage in interface FHNConnectoruri - the uri.public void setTrustStore(String path)
setTrustStore in interface FHNConnectorCopyright © 2017. All Rights Reserved.