<?xml version="1.0" encoding="UTF-8"?>
<Resource>
	<ID/>
	<Type>Service</Type>
	<Profile>
		<Description>ResourceManager creates and manages a VRE context</Description>
		<Class>VREManagement</Class>
		<Name>ResourceManager</Name>
		<Version>1.0.0</Version>	
		<Packages>
			<Main deployable="true">
				<Description>ResourceManager creates and manages Scopes within a gCube infrastructure</Description>
				<Name>ResourceManager-service</Name>
				<Version>1.1.0</Version>
				<Mandatory level="VRE"/>
				<Shareable level="NONE"/>
				<GHNRequirements>
					<!-- <Requirement category="MEM_RAM_SIZE" operator="ge" value="1000"/>  -->
				</GHNRequirements>				
				<Dependencies>
					<Dependency>
						<Service>
							<Class>VREManagement</Class>
							<Name>ResourceManager</Name>
							<Version>1.00.00</Version>
						</Service>
						<Package>ResourceManager-stubs</Package>
						<Version>1.1.0</Version>
						<Scope level="GHN"/>
						<Optional>false</Optional>
					</Dependency>
					<Dependency>
						<Service>
							<Class>VREManagement</Class>
							<Name>ResourceBroker</Name>
							<Version>1.0.0</Version>
						</Service>
						<Package>RBStubs</Package>
						<Version>[1.00.00, 2.00.00)</Version>
						<Scope level="GHN"/>
						<Optional>false</Optional>
					</Dependency>
					<Dependency>
						<Service>
							<Class>VREManagement</Class>
							<Name>SoftwareGateway</Name>
							<Version>1.00.00</Version>
						</Service>
						<Package>SoftwareGateway-stubs</Package>
						<Version>[1.00.00, 1.02.00)</Version>
						<Scope level="GHN"/>
						<Optional>false</Optional>
					</Dependency>
					<Dependency>
						<Service>
							<Class>VREManagement</Class>
							<Name>ResourceBrokerSerialization</Name>
							<Version>1.0.0</Version>
						</Service>
						<Package>ResourceBroker-serialization</Package>
						<Version>[1.0.6, 2.0.0)</Version>
						<Scope level="GHN"/>
						<Optional>false</Optional>
					</Dependency>
				</Dependencies>
				<GARArchive>org.gcube.vremanagement.resourcemanager.gar</GARArchive>
				<PortType>
						<Name>gcube/vremanagement/ResourceManager</Name>
						<Security/>			
						<WSDL>
<definitions name="ResourceManager"
    targetNamespace="http://gcube-system.org/namespaces/vremanagement/resourcemanager"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://gcube-system.org/namespaces/vremanagement/resourcemanager"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:provider="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider"
    xmlns:coretypes="http://gcube-system.org/namespaces/common/core/types"
    xmlns:corefaults="http://gcube-system.org/namespaces/common/core/faults"
    xmlns:vretypes="http://gcube-system.org/common/vremanagement/types"
    xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
    xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"    
    xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
    xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<import namespace="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider"  location="../gcube/common/core/providers/GCUBEProvider.wsdl"/>

	<import namespace="http://gcube-system.org/namespaces/common/core/faults" location="../gcube/common/core/faults/GCUBEFaults.wsdl"/>
	
	<import namespace="http://gcube-system.org/common/vremanagement/types" location="VREManagementTypes.wsdl"/> 


<!--============================================================

                      T Y P E S
                      
  ============================================================-->
<types>
<xsd:schema targetNamespace="http://gcube-system.org/namespaces/vremanagement/resourcemanager"
    xmlns:tns="http://gcube-system.org/namespaces/vremanagement/resourcemanager"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   
   <xsd:import namespace="http://gcube-system.org/namespaces/common/core/types" schemaLocation="../gcube/common/core/types/GCUBETypes.xsd"/>
   <xsd:import namespace="http://gcube-system.org/common/vremanagement/types" schemaLocation="VREManagementTypes.xsd"/>
	
	<xsd:simpleType name="resourceID">
		<xsd:restriction base="xsd:string" />
	</xsd:simpleType>    	
    
    <xsd:element name="VOID">
   		<xsd:complexType/>
    </xsd:element>		
    	
	<xsd:complexType name="ServiceItem">	
			<xsd:sequence>
				<xsd:element name="ServiceClass" type="xsd:string"/> 
		  		<xsd:element name="ServiceName" type="xsd:string"/>
		  		<xsd:element name="ServiceVersion" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		  		<xsd:element name="GHN" type="tns:resourceID" minOccurs="0" maxOccurs="1"/>		  		
		 	</xsd:sequence>
  	</xsd:complexType>
	
	<xsd:complexType name="ServiceList">	
			<xsd:sequence>
				<xsd:element name="service" type="tns:ServiceItem" minOccurs="1" maxOccurs="unbounded"/> 
		  		<xsd:element name="GHN" type="tns:resourceID" minOccurs="0" maxOccurs="unbounded"/>		  		
		 	</xsd:sequence>
  	</xsd:complexType>	
	
	<xsd:complexType name="ResourceItem">	
			<xsd:sequence>
				<xsd:element name="ID" type="tns:resourceID"/>
				<xsd:element name="Type" type="xsd:string"/>  		  				  	
		 	</xsd:sequence>
  	</xsd:complexType>
  	
	<xsd:complexType name="ResourceList">	
			<xsd:sequence>
				<xsd:element name="resource" type="tns:ResourceItem" minOccurs="1" maxOccurs="unbounded"/>		  		
		 	</xsd:sequence>
  	</xsd:complexType>	
  		
	<xsd:element name="addResourcesParameters"> 
    	<xsd:complexType>	
			<xsd:sequence>
				<xsd:element name="services" type="tns:ServiceList" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="resources" type="tns:ResourceList" minOccurs="0" maxOccurs="1"/>				 		  		    
                <xsd:element name="targetScope" type="coretypes:scope" minOccurs="0" maxOccurs="1"/>
		 	</xsd:sequence>
  		</xsd:complexType>		
	</xsd:element> 
	
	<xsd:element name="removeResourcesParameters"> 
    	<xsd:complexType>	
			<xsd:sequence>
				<xsd:element name="services" type="tns:ServiceList" minOccurs="0" maxOccurs="1"/>				
				<xsd:element name="resources" type="tns:ResourceList" minOccurs="0" maxOccurs="1"/> 		  		
                <xsd:element name="targetScope" type="coretypes:scope" minOccurs="0" maxOccurs="1"/>        
		 	</xsd:sequence>
  		</xsd:complexType>	
	</xsd:element>	
	
	<xsd:element name="sendReportParameters"> 
    	<xsd:complexType>	
			<xsd:sequence>
				<xsd:element name="callbackID" type="xsd:string"/>
                <xsd:element name="report" type="xsd:string"/>        
		 	</xsd:sequence>
  		</xsd:complexType>	
	</xsd:element>	

	<xsd:complexType name="ScopeOption">	
			<xsd:sequence>
				<xsd:element name="name" type="xsd:string"/>
				<xsd:element name="value" type="xsd:string"/>  		  				  	
		 	</xsd:sequence>
  	</xsd:complexType>
	
	<xsd:element name="optionsParameters"> 
    	<xsd:complexType>	
			<xsd:sequence>
				<xsd:element name="ScopeOptionList" type="tns:ScopeOption" minOccurs="1" maxOccurs="unbounded"/>                        
		 	</xsd:sequence>
  		</xsd:complexType>	
	</xsd:element>
	
	<xsd:element name="disposeScopeParameters"> 
    	<xsd:complexType>
    		<xsd:sequence>
    			<xsd:element name="Name" type="coretypes:scope"/>
    		</xsd:sequence>
    	</xsd:complexType>				
	</xsd:element>
	
	<xsd:element name="createScopeParameters"> 
    	<xsd:complexType>
    		<xsd:sequence>
    			<xsd:element name="Name" type="coretypes:scope"/>		
    			<xsd:element name="ServiceMap" type="xsd:string" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="tns:optionsParameters"/>
				<xsd:element ref="tns:addResourcesParameters"/> 				                       
		 	</xsd:sequence>  		
    	</xsd:complexType>				
	</xsd:element>
	
	<xsd:element name="GHN" type="tns:resourceID"/>		
	
	<xsd:element name="reportID" type="xsd:string"/>
	
	<xsd:element name="report" type="xsd:string"/>			
	
	<xsd:element name="InvalidScopeFaultType">
		<xsd:complexType>
              <xsd:complexContent>
                    <xsd:extension base="corefaults:GCUBEUnrecoverableFault">
                        <xsd:sequence/>                        
                    </xsd:extension>
                </xsd:complexContent>
    	</xsd:complexType>
	</xsd:element>
	<xsd:element name="InvalidOptionsFaultType">
		<xsd:complexType>
              <xsd:complexContent>
                    <xsd:extension base="corefaults:GCUBEUnrecoverableFault">
                        <xsd:sequence/>                        
                    </xsd:extension>
                </xsd:complexContent>
    	</xsd:complexType>
	</xsd:element>
	<xsd:element name="ResourcesCreationFaultType">
		<xsd:complexType>
              <xsd:complexContent>
                    <xsd:extension base="corefaults:GCUBEUnrecoverableFault">
                        <xsd:sequence/>                        
                    </xsd:extension>
                </xsd:complexContent>
    	</xsd:complexType>
	</xsd:element>
	<xsd:element name="ResourcesRemovalFaultType">
		<xsd:complexType>
              <xsd:complexContent>
                    <xsd:extension base="corefaults:GCUBEUnrecoverableFault">
                        <xsd:sequence/>                        
                    </xsd:extension>
                </xsd:complexContent>
    	</xsd:complexType>
	</xsd:element>
	<xsd:element name="NoSuchReportFaultType">
		<xsd:complexType>
              <xsd:complexContent>
                    <xsd:extension base="corefaults:GCUBEUnrecoverableFault">
                        <xsd:sequence/>                        
                    </xsd:extension>
                </xsd:complexContent>
    	</xsd:complexType>
	</xsd:element>	 	

</xsd:schema>
</types>

 <!--============================================================

                       M E S S A G E S

  ============================================================-->

    <message name="AddResourcesInputMessage">
        <part name="request" element="tns:addResourcesParameters"/>
    </message>
    <message name="ReportID">
        <part name="request" element="tns:reportID"/>
    </message>   
	<message name="RemoveResourcesInputMessage">
         <part name="request" element="tns:removeResourcesParameters"/>
    </message>        
	<message name="SendReportInputMessage">
        <part name="request" element="tns:sendReportParameters"/>
    </message>        	
    <message name="ChangeScopeOptionsInputMessage">
        <part name="request" element="tns:optionsParameters"/>
    </message>    
    <message name="DisposeScopeInputMessage">
        <part name="request" element="tns:disposeScopeParameters"/>
    </message>   
    <message name="CreateScopeInputMessage">
        <part name="request" element="tns:createScopeParameters"/>
    </message>    
    <message name="GetReportInputMessage">
        <part name="request" element="tns:reportID"/>
    </message>
    <message name="GetReportResponseMessage">
        <part name="request" element="tns:report"/>
    </message>
	<message name="VoidMessage">
		<part name="response" element="tns:VOID"/>
	</message>	
	<wsdl:message name="InvalidScopeFaultMessage">
	   <part name="fault" element="tns:InvalidScopeFaultType"/>
  	</wsdl:message>
  	<wsdl:message name="InvalidOptionsFaultMessage">
	   <part name="fault" element="tns:InvalidOptionsFaultType"/>
  	</wsdl:message>
  	<wsdl:message name="ResourcesCreationFaultMessage">
	   <part name="fault" element="tns:ResourcesCreationFaultType"/>
  	</wsdl:message>
  	<wsdl:message name="ResourcesRemovalFaultMessage">
	   <part name="fault" element="tns:ResourcesRemovalFaultType"/>
  	</wsdl:message>
  	<wsdl:message name="NoSuchReportFaultMessage">
	   <part name="fault" element="tns:NoSuchReportFaultType"/>
  	</wsdl:message>
<!--============================================================

                       P O R T T Y P E
                      
  ============================================================-->
<portType name="ResourceManagerPortType" 
    wsdlpp:extends="provider:GCUBEProvider">
    
    <operation name="AddResources">
        <input message="tns:AddResourcesInputMessage"/>
        <output message="tns:ReportID"/>
        <fault name="fault" message="tns:ResourcesCreationFaultMessage"/>
        <fault name="fault1" message="tns:InvalidScopeFaultMessage"/>
    </operation>
 
	<operation name="RemoveResources">
        <input message="tns:RemoveResourcesInputMessage"/>
        <output message="tns:ReportID"/>
        <fault name="fault" message="tns:ResourcesRemovalFaultMessage"/>
        <fault name="fault1" message="tns:InvalidScopeFaultMessage"/>
    </operation>    
    	
	<operation name="ChangeScopeOptions">
        <input message="tns:ChangeScopeOptionsInputMessage"/>
        <output message="tns:VoidMessage"/>
        <fault name="fault" message="tns:InvalidOptionsFaultMessage"/>
        <fault name="fault1" message="tns:InvalidScopeFaultMessage"/>
    </operation>
    
    <operation name="DisposeScope">
        <input message="tns:DisposeScopeInputMessage"/>
        <output message="tns:ReportID"/>
        <fault name="fault" message="tns:InvalidScopeFaultMessage"/>
    </operation>
    
    <operation name="CreateScope">
        <input message="tns:CreateScopeInputMessage"/>
        <output message="tns:ReportID"/>
        <fault name="fault1" message="tns:InvalidScopeFaultMessage"/>
        <fault name="fault2" message="tns:InvalidOptionsFaultMessage"/>
        <fault name="fault3" message="tns:ResourcesCreationFaultMessage"/>
    </operation>
    
	<operation name="SendReport">
        <input message="tns:SendReportInputMessage"/>
        <output message="tns:VoidMessage"/>
        <fault name="fault" message="corefaults:GCUBEFaultMessage"/>
    </operation>
    
    <operation name="GetReport">
        <input message="tns:GetReportInputMessage"/>
        <output message="tns:GetReportResponseMessage"/>
        <fault name="fault1" message="tns:InvalidScopeFaultMessage"/>
        <fault name="fault2" message="tns:NoSuchReportFaultMessage"/>
    </operation>

</portType>

</definitions>
    </WSDL>
				</PortType>					
			</Main>
			<Software>
				<Description>Stubs for ResourceManager: provide facilities to interact with a ResourceManager instance</Description>
				<Name>ResourceManager-stubs</Name>
				<Version>1.1.0</Version>
				<MultiVersion value="true"/>
				<Mandatory level="GHN"/>
				<Shareable level="VO"/>					
				<Type>library</Type>
				<Files>
					<File>org.gcube.vremanagement.resourcemanager.stubs.jar</File>
				</Files>
			</Software>
			<Software>
				<Description>Test-suite for ResourceManager: provide sample usages of interaction with a ResourceManager instance</Description>
				<Name>ResourceManager-test-suite</Name>
				<Version>1.1.0</Version>
				<MultiVersion value="true"/>				
				<Shareable level="VO"/>		
				<Type>application</Type>
				<Files>
					<File>lib/org.gcube.vremanagement.resourcemanager.testsuite.jar</File>
				</Files>
			</Software>
		</Packages>			
	</Profile>
</Resource>