Difference between revisions of "Programmatic Administration Interface"

From Gcube Wiki
Jump to: navigation, search
(Remove from a Scope)
(Add a gCube Resource to a Scope from the Parent Scope)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
<!--
== Introduction ==
+
 
+
 
{| align="right" style="color:red; border:1px solid #aaa; background-color: #f9f9f9; padding: 5px; font-size: 95%;" cellspacing="0"
 
{| align="right" style="color:red; border:1px solid #aaa; background-color: #f9f9f9; padding: 5px; font-size: 95%;" cellspacing="0"
 
|+  <b>Section contents</b>
 
|+  <b>Section contents</b>
Line 9: Line 7:
 
|[[Programmatic_Administration_Interface#Managing_a_Running_Instance_(RI) |Managing a Running Instance (RI)]]
 
|[[Programmatic_Administration_Interface#Managing_a_Running_Instance_(RI) |Managing a Running Instance (RI)]]
 
|-  
 
|-  
|[[Programmatic_Administration_Interface#Adding_/_Removing_a_Scope_to_a_gCube_Resource_(different_from_gHN_and_RI)|Adding / Removing a Scope to a gCube Resource <br>(different from gHN and RI)]]
+
|[[Programmatic_Administration_Interface#Programmatic_Administration_Interface#Adding_a_gCube_Resource_.28different_from_gHN_and_RI.29_to_a_Scope|Adding a gCube Resource (different from gHN and RI) to a Scope]]
 
|-  
 
|-  
|[[Programmatic_Administration_Interface#Registering_/_Unregistering_a_gCube_Resource_in_a_VO|Registering / Unregistering a gCube Resource in a VO]]
+
|[[Programmatic_Administration_Interface#Removing_a_gCube_Resource_.28different_from_gHN_and_RI.29_from_a_Scope|Removing a gCube Resource (different from gHN and RI) from a Scope ]]
 
|-  
 
|-  
 
|[[Programmatic_Administration_Interface#Editing_a_gCube_Resource |Editing a gCube Resource]]  
 
|[[Programmatic_Administration_Interface#Editing_a_gCube_Resource |Editing a gCube Resource]]  
Line 17: Line 15:
 
|[[Programmatic_Administration_Interface#Banning_a_gCube_Resource|Banning a gCube Resource]]  
 
|[[Programmatic_Administration_Interface#Banning_a_gCube_Resource|Banning a gCube Resource]]  
 
|}
 
|}
 
+
-->
 +
== Introduction ==
 
This section describes the programming interfaces that allow to configure, manage and control nodes, services, applications and resources in a gCube infrastructure. As the gCube technology is deployed as a distributed system, there exist several APIs to manage the different areas of the system. This section is a single point of reference for all these APIs by grouping them for their logical purpose.
 
This section describes the programming interfaces that allow to configure, manage and control nodes, services, applications and resources in a gCube infrastructure. As the gCube technology is deployed as a distributed system, there exist several APIs to manage the different areas of the system. This section is a single point of reference for all these APIs by grouping them for their logical purpose.
  
Line 24: Line 23:
 
{|class="wikitable" style="text-align: rigth; width: 1000px; border-collapse: separate; border-spacing: 0px; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="4" cellspacing="0"  
 
{|class="wikitable" style="text-align: rigth; width: 1000px; border-collapse: separate; border-spacing: 0px; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="4" cellspacing="0"  
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 1px 0"| [[Programmatic_Administration_Interface#Managing_a_gCube_Hosting_Node_(gHN) |Managing a gCube Hosting Node (gHN)]] || style="border-style: solid; border-width: 0 0 1px 0"| Describes operations related to manage a node of the infrastructure: how to shut it down or restart it (with and without deleting its state), how to add a new scope and remove an existing scope.  
+
| style="border-style: solid; border-width: 0 1px 1px 0"| Managing a gCube Hosting Node (gHN) || style="border-style: solid; border-width: 0 0 1px 0"| Describes operations related to manage a node of the infrastructure: how to shut it down or restart it (with and without deleting its state), how to add a new scope and remove an existing scope.  
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 1px 0"| [[Programmatic_Administration_Interface#Managing_a_Running_Instance_(RI) |Managing a Running Instance (RI)]] || style="border-style: solid; border-width: 0 0 1px 0"| Describes operation related to running instance management: how to add a new scope and remove an existing scope, how to deploy and undeploy them
+
| style="border-style: solid; border-width: 0 1px 1px 0"| Managing a Running Instance (RI) || style="border-style: solid; border-width: 0 0 1px 0"| Describes operation related to running instance management: how to add a new scope and remove an existing scope, how to deploy and undeploy them
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 1px 0"| [[Programmatic_Administration_Interface#Adding_/_Removing_a_Scope_to_a_gCube_Resource_(different_from_gHN_and_RI)|Adding / Removing a Scope to a gCube Resource <br>(different from gHN and RI)]] ||  style="border-style: solid; border-width: 0 0 1px 0"| Describes how to add and delete scopes to gCube Resources that are not nodes or service's instances. These operations can be performed only from a parent scope to a child scope, e.g. with them it is not possible to add a VO scope if a resource is registered only in another VO (see the next topic for this).
+
| style="border-style: solid; border-width: 0 1px 1px 0"| Adding/Removing a gCube Resource (different from gHN and RI) to/from a Scope ||  style="border-style: solid; border-width: 0 0 1px 0"| Describes how to add or remove scopes to/from gCube Resources that are not nodes or service's instances.  
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 1px 0"| [[Programmatic_Administration_Interface#Registering_/_Unregistering_a_gCube_Resource_in_a_VO|Registering / Unregistering a gCube Resource in a VO]] || style="border-style: solid; border-width: 0 0 1px 0" | Describes how to register and unregister gCube Resources in the context of a Virtual Organization.  
+
| style="border-style: solid; border-width: 0 1px 1px 0"| Deleting a gCube Resource || style="border-style: solid; border-width: 0 0 1px 0" | Describes how to unregister gCube Resources from a scope. Deleting a resource (differently from removing it from a scope) physically removes the resource from the Information System.
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 1px 0"| [[Programmatic_Administration_Interface#Editing_a_gCube_Resource |Editing a gCube Resource]] || style="border-style: solid; border-width: 0 0 1px 0"| Describes how to change the representation of gCube Resources in the Information System. Depending on the resource type, different components have to be contacted for this.
+
| style="border-style: solid; border-width: 0 1px 1px 0"| Editing a gCube Resource || style="border-style: solid; border-width: 0 0 1px 0"| Describes how to change the representation of gCube Resources in the Information System. Depending on the resource type, different components have to be contacted for this.
 
|-
 
|-
| style="border-style: solid; border-width: 0 1px 0 0"| [[Programmatic_Administration_Interface#Banning_a_gCube_Resource|Banning a gCube Resource]] ||  style="border-style: solid; border-width: 0 0 0 0"| Describes how to instruct the Information System to exclude certain gCube resource from a given scope. This operation is available for VO-Managers and makes sense especially for nodes and running instances, when the decision to join or not a scope is partially under the control of Site Managers.
+
| style="border-style: solid; border-width: 0 1px 0 0"| Banning a gCube Resource ||  style="border-style: solid; border-width: 0 0 0 0"| Describes how to instruct the Information System to exclude certain gCube resource from a given scope. This operation is available for VO-Managers and makes sense especially for nodes and running instances, when the decision to join or not a scope is partially under the control of Site Managers.
 
|}
 
|}
  
  
For each of them, a detailed explanation is provided about which component(s) must be contacted for doing what and which are the scope propagation rules.
+
For each of them, a detailed explanation is provided about which component(s) must be contacted for doing what and which are the scope constraints (if any).
  
 
== Managing a gCube Hosting Node (gHN) ==
 
== Managing a gCube Hosting Node (gHN) ==
Line 227: Line 226:
 
=== Add a gCube Resource to a Scope from the Parent Scope ===
 
=== Add a gCube Resource to a Scope from the Parent Scope ===
  
'''Target''': Add a gCube Resource to ''(i)'' a VRE scope from the parent VO or ''(ii)'' a VO scope from the infrastructure scope. If the resource is not in the parent scope, it must be [[Programmatic_Administration_Interface#Registering_/_Unregistering_a_gCube_Generic_Resource_in_a_VO|registered in that scope]] before to be added to any scope.
+
'''Target''': Add a gCube Resource to ''(i)'' a VRE scope from the parent VO or ''(ii)'' a VO scope from the infrastructure scope.
  
 
'''Component(s) to contact''':  
 
'''Component(s) to contact''':  
Line 253: Line 252:
 
:* '''How to find it''': on the classpath
 
:* '''How to find it''': on the classpath
  
:* '''Operation to invoke''': [[ExistClient#How_to_query_over_GCUBEResource_profiles|execute]]
+
:* '''Operation to invoke''': [[ExistClient#How_to_query_over_GCUBEResource_profiles|execute]] to retrieve the resource to copy
  
 
:* '''Parameters''': <code>query=GCUBEResourceQuery</code>(with an appropriate <code>QueryParameter</code> condition on the resource ID), <code>GCUBEScope=<original VO></code>,
 
:* '''Parameters''': <code>query=GCUBEResourceQuery</code>(with an appropriate <code>QueryParameter</code> condition on the resource ID), <code>GCUBEScope=<original VO></code>,
Line 289: Line 288:
 
'''Target''': Remove a gCube Resource from a scope
 
'''Target''': Remove a gCube Resource from a scope
  
'''Scope constraint''': if the resource joins only the current scope, after the removal it has also to be [[Programmatic_Administration_Interface#Delete_a_Resource_from_a_Scope|deleted]]
+
'''Scope constraint''':  
 +
:* if the resource joins only the current scope, after the removal it has also to be [[Programmatic_Administration_Interface#Delete_a_Resource_from_a_Scope|deleted]]
 +
:* after the removal, the resource must be also [[Programmatic_Administration_Interface#Editing_a_gCube_Generic_Resource|updated]] in the other scopes it belongs to, otherwise it will wrongly report there a scope where actually it is not registered anymore. In order to do so, the just removed scope must be removed from the local <code>GCUBEResource</code> object by invoking the method <code>GCUBEResource.removeScope(<scope to remove>)</code> and then the resource must be [[Programmatic_Administration_Interface#Editing_a_gCube_Generic_Resource|updated]] in all the remaining scopes.
 +
 
  
 
'''Component(s) to contact''':  
 
'''Component(s) to contact''':  
Line 297: Line 299:
 
:* '''Where''': the Running Instance managing the Scope to remove
 
:* '''Where''': the Running Instance managing the Scope to remove
  
:* '''How to find it''': query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is <code>/Resource/Profile/Body/Scope/text()=Scope Expression</code>, then extract the service URI from <code>/Resource/Profile/Body/Service/text()</code>
+
:* '''How to find it''': query on the IS that looks for a RI of the Resource Manager in the scope to remove or query on the IS that looks for the Generic Resource modeling the scope (the condition is <code>/Resource/Profile/Body/Scope/text()=Scope Expression</code>, then extract the service URI from <code>/Resource/Profile/Body/Service/text()</code>
  
 
:* '''Operation to invoke''': [[Resource_Manager#Request_to_remove_a_resource_from_the_scope|removeResources]]
 
:* '''Operation to invoke''': [[Resource_Manager#Request_to_remove_a_resource_from_the_scope|removeResources]]
  
 
:* '''Parameters''': <code>setID=<Resouurce ID></code>, <code>setType=<Resource Type></code>, <code>setTargetScope=<Scope to remove></code>
 
:* '''Parameters''': <code>setID=<Resouurce ID></code>, <code>setType=<Resource Type></code>, <code>setTargetScope=<Scope to remove></code>
 
'''Note''': after the removal, the resource must be also [[Programmatic_Administration_Interface#Editing_a_gCube_Resource|updated]] in the other scopes it belongs to, otherwise it will wrongly report there the scopes actually removed. In order to do so, the just removed scope must be removed from the local <code>GCUBEResource</code> object by invoking the method <code>GCUBEResource.removeScope(<scope to remove>)</code> and then the [[IS-Publisher#Publishing_a_profile|updateGCUBEResource]] operation of the IS-Publisher has to be invoked in all the remaining scopes.
 
  
 
== Deleting a gCube Resource  ==
 
== Deleting a gCube Resource  ==
Line 311: Line 311:
 
'''Target''': delete a resource from a scope  
 
'''Target''': delete a resource from a scope  
  
'''Scope constraint''': a resource can be deleted if and only if it joins only the current scope. If the resource joins other scopes, it has to be only [[Programmatic_Administration_Interface#Removing_a_gCube_Resource_(different_from_gHN_and_RI)_from_a_Scope |removed]] from the the current scope, but not deleted.
+
'''Scope constraint''': a resource can be deleted if and only if it joins only the current scope. If the resource joins other scopes, it has to be only [[Programmatic_Administration_Interface#Removing_a_gCube_Resource_(different_from_gHN_and_RI)_from_a_Scope |removed]] from the current scope, but not deleted.
 +
 
 +
'''Scope constraint''': before to delete a resource, it must be also [[Programmatic_Administration_Interface#Removing_a_gCube_Resource_(different_from_gHN_and_RI)_from_a_Scope |removed]] from the scope.
  
 
'''Component(s) to contact''':  
 
'''Component(s) to contact''':  
Line 321: Line 323:
 
:* '''How to find it''': on the classpath
 
:* '''How to find it''': on the classpath
  
:* '''Operation to invoke''': [[IS-Publisher#Publishing_a_profile|removeGCUBEResource]]. However, before to invoke this method, the resource must be [[Programmatic_Administration_Interface#Removing_a_gCube_Resource_(different_from_gHN_and_RI)_from_a_Scope |removed]] from the the scope.
+
:* '''Operation to invoke''': [[IS-Publisher#Publishing_a_profile|removeGCUBEResource]].
  
 
:* '''Parameters''': <code>GCUBEResource=<resource ID></code>, <code>Type=<resource type></code>, <code>GCUBEScope=<Scope to remove from></code>, <code>GCUBESecurityManager=ServiceContext.getContext()||<dummy manager></code>
 
:* '''Parameters''': <code>GCUBEResource=<resource ID></code>, <code>Type=<resource type></code>, <code>GCUBEScope=<Scope to remove from></code>, <code>GCUBESecurityManager=ServiceContext.getContext()||<dummy manager></code>
 
 
  
 
=== Delete from the Infrastructure ===
 
=== Delete from the Infrastructure ===
Line 332: Line 332:
  
 
The resource must be  
 
The resource must be  
* firstly [[Programmatic_Administration_Interface#Remove from a VO Scope|removed from the VOs]] it belongs to
+
* firstly, [[Programmatic_Administration_Interface#Remove_from_a_Scope_3|removed from the VOs]] it belongs to
* then [[Programmatic_Administration_Interface#Remove from the Infrastructure Scope|removed from the Infrastructure Scope]] if it is also registered there.
+
* then, [[Programmatic_Administration_Interface#Remove_from_a_Scope_3|removed from the Infrastructure Scope]] if it is also registered there.
* finally, it can be [[Programmatic_Administration_Interface#Delete a Resource from a Scope|deleted]] from all its scopes
+
* finally, it can be [[Programmatic_Administration_Interface#Delete_a_Resource_from_a_Scope|deleted]] from all its scopes
 +
 
 +
=== Exceptions ===
 +
 
 +
There exist exceptions to the standard way for deleting gCube Resources (in addition to  the ones described for [[Programmatic_Administration_Interface#Managing_a_Running_Instance_.28RI.29|Running Instances]] and [[Programmatic_Administration_Interface#Managing_a_gCube_Hosting_Node_.28gHN.29|gHNs]]).
 +
 
 +
 
 +
==== Delete a Scope Resource ====
 +
 
 +
'''Target''': delete a Generic Resource modeling a Scope on the Information System. The only way is to dispose the modelled Scope.
 +
 
 +
'''Component(s) to contact''':
 +
 
 +
* '''Name''': [[Resource_Manager|Resource Manager]]
 +
 
 +
:* '''Where''': the Running Instance managing the Scope
 +
 
 +
:* '''How to find it''': query on the IS that looks for a RI of the Resource Manager in the scope to remove or query on the IS that looks for the Generic Resource modeling the scope (the condition is <code>/Resource/Profile/Body/Scope/text()=Scope Expression</code>, then extract the service URI from <code>/Resource/Profile/Body/Service/text()</code>
 +
 
 +
:* '''Operation to invoke''': [[Resource_Manager#Disposing_the_scope|disposeScope]]
 +
 
 +
:* '''Parameters''': <code>DisposeScopeParameters.name=<Scope to dispose></code>
 +
 
 +
 
 +
==== Delete a Service ====
 +
 
 +
'''Target''': delete a deployable service
 +
 
 +
'''Component(s) to contact''':
 +
 
 +
* '''Name''': [[Software_Repository|Software Repository]]
 +
 
 +
:* '''Where''': the Running Instance available in the Scope
 +
 
 +
:* '''How to find it''': query on the IS that looks for a RI of the Software Repository in the scope
 +
 
 +
:* '''Operation to invoke''': [[Software_Repository#delete|delete]]
 +
 
 +
:* '''Parameters''': <code>Service ID =<identifier of the service to remove></code>
 +
 
 +
 
 +
==== Delete a Metadata Collection ====
 +
 
 +
'''Target''': delete a Metadata Collection.
 +
 
 +
'''Component(s) to contact''':
 +
 
 +
* '''Name''': [[Metadata_Manager|Metadata Manager]]
 +
 
 +
:* '''Where''': the Running Instance managing the Metadata Collection
 +
 
 +
:* '''How to find it''': query on the IS that looks for a RI of the Resource Manager in the current scope
 +
 
 +
:* '''Operation to invoke''': [[Metadata_Manager#MetadataManager_portType|deleteCollection]]
 +
 
 +
:* '''Parameters''': -
 +
 
 +
 
 +
==== Delete a Collection ====
 +
''To be completed''
  
 
== Editing a gCube Generic Resource ==
 
== Editing a gCube Generic Resource ==
  
'''Target''': edit a Generic Resource on the Information System.
 
  
=== Generic Way ===
+
=== Standard Way ===
 +
 
 +
'''Target''': edit a Generic Resource on the Information System.
  
 
'''Component(s) to contact''':  
 
'''Component(s) to contact''':  
Line 356: Line 416:
 
=== Exceptions ===
 
=== Exceptions ===
  
There exist exception to the general way to edit Generic Resources. These are mostly related to resources automatically generated by gCube Services that must be in turn contacted for editing.
+
There exist exceptions to the standard way for editing Generic Resources. These are mostly related to resources automatically generated by gCube Services that must be in turn contacted for the editing operation.
  
 
==== Scope Resources ====
 
==== Scope Resources ====
  
...
+
'''Target''': edit a Generic Resource modeling a Scope on the Information System.
 +
 
 +
'''Component(s) to contact''':
 +
 
 +
* '''Name''': [[Resource_Manager|Resource Manager]]
 +
 
 +
:* '''Where''': the Running Instance managing the Scope
 +
 
 +
:* '''How to find it''': query on the IS that looks for a RI of the Resource Manager in scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is <code>/Resource/Profile/Body/Scope/text()=Scope Expression</code>, then extract the service URI from <code>/Resource/Profile/Body/Service/text()</code>
 +
 
 +
:* '''Operation to invoke''': [[Resource_Manager#Set.2Fchange_the_scope_options|changeScopeOptions]]
 +
 
 +
:* '''Parameters''': <code>ScopeOption.name=<option name></code>, <code>ScopeOption.value=<option value></code>
  
 
== Banning a gCube Resource ==
 
== Banning a gCube Resource ==
 +
''To be completed''

Latest revision as of 19:07, 8 October 2010

Introduction

This section describes the programming interfaces that allow to configure, manage and control nodes, services, applications and resources in a gCube infrastructure. As the gCube technology is deployed as a distributed system, there exist several APIs to manage the different areas of the system. This section is a single point of reference for all these APIs by grouping them for their logical purpose.

This section includes the following topics:

Managing a gCube Hosting Node (gHN) Describes operations related to manage a node of the infrastructure: how to shut it down or restart it (with and without deleting its state), how to add a new scope and remove an existing scope.
Managing a Running Instance (RI) Describes operation related to running instance management: how to add a new scope and remove an existing scope, how to deploy and undeploy them
Adding/Removing a gCube Resource (different from gHN and RI) to/from a Scope Describes how to add or remove scopes to/from gCube Resources that are not nodes or service's instances.
Deleting a gCube Resource Describes how to unregister gCube Resources from a scope. Deleting a resource (differently from removing it from a scope) physically removes the resource from the Information System.
Editing a gCube Resource Describes how to change the representation of gCube Resources in the Information System. Depending on the resource type, different components have to be contacted for this.
Banning a gCube Resource Describes how to instruct the Information System to exclude certain gCube resource from a given scope. This operation is available for VO-Managers and makes sense especially for nodes and running instances, when the decision to join or not a scope is partially under the control of Site Managers.


For each of them, a detailed explanation is provided about which component(s) must be contacted for doing what and which are the scope constraints (if any).

Managing a gCube Hosting Node (gHN)

Shut down

Target: Shut down the node

Component(s) to contact:

  • Where: the Running Instance on the gHN
  • How to find it: query on the IS that looks for a RI of the gHNManager running on the gHN
  • Parameters: setClean=false, setRestart=false


Restart

Target: Restart the node and preserve its state

Component(s) to contact:

  • Where: the Running Instance on the gHN
  • How to find it: query on the IS that looks for a RI of the gHNManager running on the gHN
  • Parameters: setClean=false, setRestart=true


Restart and Clean

Target: Restart the node and clean its actual state

Component(s) to contact:

  • Where: the Running Instance on the gHN
  • How to find it: query on the IS that looks for a RI of the gHNManager running on the gHN
  • Parameters: setClean=true, setRestart=true


Add an existing Scope

Target: Add a scope to a gHN and the related Service Map is already available on the gHN

Component(s) to contact:

  • Where: the Running Instance managing the Scope to add
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<GHN ID>, setType=GHN, setTargetScope=<new Scope>


Add a new Scope

Target: Add a scope to a gHN and the related Service Map is not available on the gHN

Component(s) to contact:

  • Where: the Running Instance on the gHN
  • How to find it: query on the IS that looks for a RI of the gHNManager running on the gHN
  • Parameters: setScope=<new Scope>, setMap=<string serialization of the Map>
  • Where: the Running Instance managing the Scope to add
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<GHN ID>, setType=GHN, setTargetScope=<new Scope>


Remove from a Scope

Target: Remove a gHN from a scope

Component(s) to contact:

  • Where: the Running Instance managing the Scope to remove
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<GHN ID>, setType=GHN, setTargetScope=<Scope to remove>

Managing a Running Instance (RI)

Join a Scope

Target: Join a Running Instance to a scope

Component(s) to contact:

  • Where: the Running Instance managing the Scope to join
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<RI ID>, setType=RunningInstance, setTargetScope=<Scope to Join>


Remove from a Scope

Target: Remove a Running Instance from a scope

Component(s) to contact:

  • Where: the Running Instance managing the Scope to remove
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<RI ID>, setType=RunningInstance, setTargetScope=<Scope to remove>
  • Note: if the Running Instance is joined only to this scope, it is also undeployed


Deploy

Target: Deploy a new Running Instance in a Scope

Component(s) to contact:

  • Where: the Running Instance managing the Scope
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: ServiceItem.setServiceClass=<Service Class>, ServiceItem.setServiceName=<Service Name>, ServiceItem.setServiceVersion=<Service Version>, ServiceItem.setGHN=<GHN ID where to deploy> (optional, suggested gHN to use), setTargetScope=<Scope to deploy in>, ServiceList.setGHN=new String[] {"GHNID1","GHNID2","GHNID3","GHNID4","GHNID5"} (optional, suggested gHNs to use)


Undeploy

Target: Force the undeployment of a Running Instance from all the scopes it is joined; for a gentler undeploy, see here

Component(s) to contact:

  • Where: the Running Instance managing the Scope to remove or (if this not work) try all the other scopes to which the RI is joined
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: ServiceItem.setServiceClass=<Service Class of the RI>, ServiceItem.setServiceName=<Service Name of the RI>, ServiceItem.setServiceVersion=<Service Version of the RI>, setTargetScope=<Scope to undeploy from>

Adding a gCube Resource (different from gHN and RI) to a Scope

Add a gCube Resource to a Scope from the Parent Scope

Target: Add a gCube Resource to (i) a VRE scope from the parent VO or (ii) a VO scope from the infrastructure scope.

Component(s) to contact:

  • Where: the Running Instance managing the Scope to add
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the new scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<Resouurce ID>, setType=<Resource Type>, setTargetScope=<Scope to add>

Add a gCube Resource from a VO to another VO

Target: Copy a gCube Resource from a VO to another VO

Component(s) to contact:

  • Where: in the local instance of gCore
  • How to find it: on the classpath
  • Operation to invoke: execute to retrieve the resource to copy
  • Parameters: query=GCUBEResourceQuery(with an appropriate QueryParameter condition on the resource ID), GCUBEScope=<original VO>,
  • Where: in the local instance of gCore
  • How to find it: on the classpath
  • Operation to invoke: registerGCUBEResource. Before to register the resource, the scope must be added to the local GCUBEResource object by invoking the method GCUBEResource.addScope(<new scope>)
  • Parameters: GCUBEResource=<resource object obtained from the IS-Client>, GCUBEScope=<destination VO>, GCUBESecurityManager=ServiceContext.getContext()||<dummy manager>

Create a new gCube Resource

Target: Register a gCube Resource to (i) the infrastructure scope or (ii) a VO scope from scratch (e.g. the resource does not exist in any other scopes).

Component(s) to contact:

  • Where: in the local instance of gCore
  • How to find it: on the classpath
  • Operation to invoke: registerGCUBEResource. Before to register the resource, the scope must be added to the local GCUBEResource object by invoking the method GCUBEResource.addScope(<new scope>)
  • Parameters: GCUBEResource=<resource profile>, GCUBEScope=<new Scope>, GCUBESecurityManager=ServiceContext.getContext()||<dummy manager>

Removing a gCube Resource (different from gHN and RI) from a Scope

Remove from a Scope

Target: Remove a gCube Resource from a scope

Scope constraint:

  • if the resource joins only the current scope, after the removal it has also to be deleted
  • after the removal, the resource must be also updated in the other scopes it belongs to, otherwise it will wrongly report there a scope where actually it is not registered anymore. In order to do so, the just removed scope must be removed from the local GCUBEResource object by invoking the method GCUBEResource.removeScope(<scope to remove>) and then the resource must be updated in all the remaining scopes.


Component(s) to contact:

  • Where: the Running Instance managing the Scope to remove
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the scope to remove or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: setID=<Resouurce ID>, setType=<Resource Type>, setTargetScope=<Scope to remove>

Deleting a gCube Resource

Delete a Resource from a Scope

Target: delete a resource from a scope

Scope constraint: a resource can be deleted if and only if it joins only the current scope. If the resource joins other scopes, it has to be only removed from the current scope, but not deleted.

Scope constraint: before to delete a resource, it must be also removed from the scope.

Component(s) to contact:

  • Where: in the local instance of gCore
  • How to find it: on the classpath
  • Parameters: GCUBEResource=<resource ID>, Type=<resource type>, GCUBEScope=<Scope to remove from>, GCUBESecurityManager=ServiceContext.getContext()||<dummy manager>

Delete from the Infrastructure

Target: Delete a Resource from the infrastructure.

The resource must be

Exceptions

There exist exceptions to the standard way for deleting gCube Resources (in addition to the ones described for Running Instances and gHNs).


Delete a Scope Resource

Target: delete a Generic Resource modeling a Scope on the Information System. The only way is to dispose the modelled Scope.

Component(s) to contact:

  • Where: the Running Instance managing the Scope
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the scope to remove or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: DisposeScopeParameters.name=<Scope to dispose>


Delete a Service

Target: delete a deployable service

Component(s) to contact:

  • Where: the Running Instance available in the Scope
  • How to find it: query on the IS that looks for a RI of the Software Repository in the scope
  • Parameters: Service ID =<identifier of the service to remove>


Delete a Metadata Collection

Target: delete a Metadata Collection.

Component(s) to contact:

  • Where: the Running Instance managing the Metadata Collection
  • How to find it: query on the IS that looks for a RI of the Resource Manager in the current scope
  • Parameters: -


Delete a Collection

To be completed

Editing a gCube Generic Resource

Standard Way

Target: edit a Generic Resource on the Information System.

Component(s) to contact:

  • Where: in the local instance of gCore
  • How to find it: on the classpath
  • Parameters: GCUBEResource=<resource>, GCUBEScope=<Scope>, GCUBESecurityManager=ServiceContext.getContext()||<dummy manager>

Exceptions

There exist exceptions to the standard way for editing Generic Resources. These are mostly related to resources automatically generated by gCube Services that must be in turn contacted for the editing operation.

Scope Resources

Target: edit a Generic Resource modeling a Scope on the Information System.

Component(s) to contact:

  • Where: the Running Instance managing the Scope
  • How to find it: query on the IS that looks for a RI of the Resource Manager in scope or query on the IS that looks for the Generic Resource modeling the scope (the condition is /Resource/Profile/Body/Scope/text()=Scope Expression, then extract the service URI from /Resource/Profile/Body/Service/text()
  • Parameters: ScopeOption.name=<option name>, ScopeOption.value=<option value>

Banning a gCube Resource

To be completed