Difference between revisions of "Package Repository"

From Gcube Wiki
Jump to: navigation, search
(Introduction)
(Implentation Overview)
Line 15: Line 15:
 
The resource state contains information about the stored service archives. The resource home is used by the web service to create and find the resource.  
 
The resource state contains information about the stored service archives. The resource home is used by the web service to create and find the resource.  
  
The web service provides to the clients, e.g. HNM, access to the Package Repository functionality (see Section 3.2.1.3 below).
+
The web service provides to the clients, e.g. HNM, access to the Package Repository functionality ([[ Package_Repository#Functionality | see below ]]).
A Service Archive has the following structure:
+
 
 +
 
 +
 
 +
==== Functionality ====
 +
 
 +
The signatures of the actual implemented methods are presented below. These operations allow uploading, deleting, list, and getting a DILIGENT package. As well as other advanced operations that operate over packages dependencies.
 +
 
 +
 
 +
:1. '''store'''
 +
<pre>
 +
store (ServiceIDURLDescription) -> String
 +
</pre>
 +
 
 +
This operation stores a service archive into the Package Repository and assigns status pending to it. Pending status means that service archive is valid, and unique ID was not previously used but cannot be deployed.
 +
 
 +
''ServiceIDURLDescription'' type contains the unique ID assigned to the service, the URL from where the service archive can be downloaded, and the service description.
 +
 
 +
''Return'' String contains unique ID if service archive is valid, null otherwise.
 +
 
 +
:2. '''approve'''
 +
<pre>
 +
approve (String) -> String
 +
</pre>
 +
 
 +
Approve an already stored service achive, if unique ID passed exists with pending status.
 +
 
 +
''Return'' It returns approved if operation success, an error message otherwise.
 +
 
 +
:3. '''delete'''
 +
<pre>
 +
delete (String) -> String
 +
</pre>
 +
 
 +
This operation deletes a stored DILIGENT service archive from the Package Repository if unique ID passed exists. This implies the removal of all software packages from the Grid and from the local cache.  
 +
 
 +
''Return'' A message reporting success of failure is returned.
 +
 
 +
:4. '''get'''
 +
<pre>
 +
get (ServiceIDPackage) -> String
 +
</pre>
 +
 
 +
To identify an unique package on the repository two values must be provided: (i) DILIGENT unique ID and (ii) package name.
 +
 
 +
''Return'' The method returns the URI from where the requested package can be downloaded.
 +
 
 +
:5. '''getServiceProfile'''
 +
<pre>
 +
getServiceProfile (String) -> String
 +
</pre>
 +
 
 +
''Return'' From a given unique ID this method return the corresponding Service Profile if exists, null otherwise.
 +
 
 +
:6. '''getServiceProfileID'''
 +
<pre>
 +
getServiceProfileID (ClsssName) -> String
 +
</pre>
 +
 
 +
''Return'' From a given class and name parameter this method return the corresponding DILIGENT unique ID if exists, null otherwise.
 +
 
 +
:7. '''listPending'''
 +
<pre>
 +
listPending ( ) -> String
 +
</pre>
 +
 
 +
''Return'' This operation returns an XML containing all stored service archives with status pending. The XML structure is as follow:
 +
<pre>
 +
<Resultset>
 +
  <Result>
 +
    <UniqueID>String</UniqueID>
 +
    <Class>String</Class>
 +
    <Name>String</Name>
 +
    <PackageName>String</PackageName>
 +
  </Result>
 +
</Resultset>
 +
</pre>
 +
 
 +
:8. '''listApproved'''
 +
<pre>
 +
listApproved ( ) -> String
 +
</pre>
 +
 
 +
''Return''  This operation returns an XML containing all stored service archives with status approved. The XML structure is as follow:
 +
<pre>
 +
<Resultset>
 +
  <Result>
 +
    <UniqueID>String</UniqueID>
 +
    <Class>String</Class>
 +
    <Name>String</Name>
 +
    <PackageName>String</PackageName>
 +
  </Result>
 +
</Resultset>
 +
</pre>
 +
 
 +
:9. '''listNonDeployableServices'''
 +
<pre>
 +
listNonDeployableServices ( ) -> String
 +
</pre>
 +
 
 +
With this functionality it is possible to know which stored packages are not deployable due missing dependencies.
 +
 
 +
''Return'' a XML with the following structure:
 +
<pre>
 +
<Resultset>
 +
  <Result>
 +
    <Class>String</Class>
 +
    <Name>String</Name>
 +
    <PackageName>String</PackageName>
 +
  </Result>
 +
</Resultset>
 +
</pre>
 +
 
 +
:10. '''listAllDependenciesChain'''
 +
<pre>
 +
listAllDependenciesChain (String) -> ListPackageArray
 +
</pre>
 +
 
 +
This operation lists all dependencies declared on the WSRF package declared on the service profile of a given unique ID.
 +
 
 +
''Return'' Returned object type includes unique ID, package name, and type.
 +
 
 +
:11. '''listSameDHNPackages'''
 +
<pre>
 +
listSameDHNPackages (String) -> ListPackageArray
 +
</pre>
 +
 
 +
This operation lists all same DHN dependencies declared on the WSRF package declared on the service profile of a given unique ID.
 +
 
 +
''Return'' Returned object type includes unique ID, package name, and type.
 +
 
 +
:12. '''listSameDLPackages'''
 +
<pre>
 +
listSameDLPackages (String) -> ListPackageArray
 +
</pre>
 +
 
 +
This operation lists all same DL dependencies declared on the WSRF package declared on the service profile of a given unique ID.
 +
 
 +
''Return'' Returned object type includes unique ID, package name, and type.
 +
 
 +
:13. '''listSameVOPackages'''
 +
<pre>
 +
listSameVOPackages (String) -> ListPackageArray
 +
</pre>
 +
 
 +
This operation lists all same VO dependencies declared on the WSRF package declared on the service profile of a given unique ID.
 +
 
 +
''Return'' Returned object type includes unique ID, package name, and type.
  
 
=== Dependencies ===
 
=== Dependencies ===
  
 
=== Usage Example ===
 
=== Usage Example ===

Revision as of 16:35, 14 September 2007

Package Repository

Introduction

The Package Repository validates, stores, and manages DILIGENT packages. It checks packages dependencies and giving both access to packages relations and access to the stored packages supports the dynamic packages deployment.

This repository accepts registration requests coming from the Service Archive Registration Protlet that is part of the VDL service, whilst accepts access requests from the DL service and the HNM service.

Implentation Overview

This component is responsible for the validation, storage, and maintenance of the DILIGENT service archives, each service archive contains all files declared on the Service Profile . It checks packages dependencies and by ensuring access to them, it supports the dynamic packages deployment.

The Package Repository is a WSRF service, implemented as specified by the Singleton Pattern . Accordingly, it splits the implementation into three sub-components: (i) the resource itself that contains Package Repository state, (ii) the resource home that manages the resource, and (iii) the web service that gives access to components functionality.

The resource state contains information about the stored service archives. The resource home is used by the web service to create and find the resource.

The web service provides to the clients, e.g. HNM, access to the Package Repository functionality ( see below ).


Functionality

The signatures of the actual implemented methods are presented below. These operations allow uploading, deleting, list, and getting a DILIGENT package. As well as other advanced operations that operate over packages dependencies.


1. store
store (ServiceIDURLDescription) -> String

This operation stores a service archive into the Package Repository and assigns status pending to it. Pending status means that service archive is valid, and unique ID was not previously used but cannot be deployed.

ServiceIDURLDescription type contains the unique ID assigned to the service, the URL from where the service archive can be downloaded, and the service description.

Return String contains unique ID if service archive is valid, null otherwise.

2. approve
approve (String) -> String

Approve an already stored service achive, if unique ID passed exists with pending status.

Return It returns approved if operation success, an error message otherwise.

3. delete
delete (String) -> String

This operation deletes a stored DILIGENT service archive from the Package Repository if unique ID passed exists. This implies the removal of all software packages from the Grid and from the local cache.

Return A message reporting success of failure is returned.

4. get
get (ServiceIDPackage) -> String

To identify an unique package on the repository two values must be provided: (i) DILIGENT unique ID and (ii) package name.

Return The method returns the URI from where the requested package can be downloaded.

5. getServiceProfile
getServiceProfile (String) -> String

Return From a given unique ID this method return the corresponding Service Profile if exists, null otherwise.

6. getServiceProfileID
getServiceProfileID (ClsssName) -> String

Return From a given class and name parameter this method return the corresponding DILIGENT unique ID if exists, null otherwise.

7. listPending
listPending ( ) -> String

Return This operation returns an XML containing all stored service archives with status pending. The XML structure is as follow:

<Resultset>
  <Result>
    <UniqueID>String</UniqueID>
    <Class>String</Class>
    <Name>String</Name>
    <PackageName>String</PackageName>
  </Result>
</Resultset>
8. listApproved
listApproved ( ) -> String

Return This operation returns an XML containing all stored service archives with status approved. The XML structure is as follow:

<Resultset>
  <Result>
    <UniqueID>String</UniqueID>
    <Class>String</Class>
    <Name>String</Name>
    <PackageName>String</PackageName>
  </Result>
</Resultset>
9. listNonDeployableServices
listNonDeployableServices ( ) -> String

With this functionality it is possible to know which stored packages are not deployable due missing dependencies.

Return a XML with the following structure:

<Resultset>
  <Result>
    <Class>String</Class>
    <Name>String</Name>
    <PackageName>String</PackageName>
  </Result>
</Resultset>
10. listAllDependenciesChain
listAllDependenciesChain (String) -> ListPackageArray

This operation lists all dependencies declared on the WSRF package declared on the service profile of a given unique ID.

Return Returned object type includes unique ID, package name, and type.

11. listSameDHNPackages
listSameDHNPackages (String) -> ListPackageArray

This operation lists all same DHN dependencies declared on the WSRF package declared on the service profile of a given unique ID.

Return Returned object type includes unique ID, package name, and type.

12. listSameDLPackages
listSameDLPackages (String) -> ListPackageArray

This operation lists all same DL dependencies declared on the WSRF package declared on the service profile of a given unique ID.

Return Returned object type includes unique ID, package name, and type.

13. listSameVOPackages
listSameVOPackages (String) -> ListPackageArray

This operation lists all same VO dependencies declared on the WSRF package declared on the service profile of a given unique ID.

Return Returned object type includes unique ID, package name, and type.

Dependencies

Usage Example