Adding gcube handlers

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@130974 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-08-04 15:24:47 +00:00
parent 32702a4f10
commit e3fe42f529
4 changed files with 39 additions and 2 deletions

10
distro/gcube-handlers.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<handlers>
<lifecycle>
<profile-management />
</lifecycle>
<request>
<request-validation />
<request-accounting />
</request>
</handlers

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<handlers>
<lifecycle>
<profile-management />
</lifecycle>
<request>
<request-validation />
<request-accounting />
</request>
</handlers

View File

@ -154,7 +154,7 @@ public class ContextManagementImplTest {
}
//@Test
@Test
public void devContextTest() throws ContextNotFoundException, ContextException {
String gcube = contextManagementImpl.create(null, "gcube");
logger.trace("/gcube : {}", gcube);

View File

@ -167,7 +167,7 @@ public class EntityManagementImplTest {
}
@Test
public void testCreateFacet() throws Exception {
public void testCreateContactFacet() throws Exception {
ScopeProvider.instance.set("/gcube/devsec");
ContactFacet contactFacet = new ContactFacetImpl();
@ -184,6 +184,23 @@ public class EntityManagementImplTest {
ContactFacet.class.getSimpleName(), stringWriter.toString());
logger.debug("Created : {}", json);
}
@Test
public void testCreateCPUFacet() throws Exception {
ScopeProvider.instance.set("/gcube/devsec/devVRE");
CPUFacetImpl cpuFacetImpl = new CPUFacetImpl();
cpuFacetImpl.setClockSpeed("1 GHz");
cpuFacetImpl.setModel("Opteron");
cpuFacetImpl.setVendor("AMD");
StringWriter stringWriter = new StringWriter();
Entities.marshal(cpuFacetImpl, stringWriter);
String json = entityManagementImpl.createFacet(
CPUFacet.class.getSimpleName(), stringWriter.toString());
logger.debug("Created : {}", json);
}
/*
* @Test public void testReadFacet() throws Exception{