From 2485f435106ac5909776cb85ebd5c63e441a5539 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 23 Feb 2021 11:51:37 +0100 Subject: [PATCH] Fixing test --- .../instances/SmartgearResourcesTest.java | 31 +++----------- .../instances/multicontext/BasicTest.java | 35 ++-------------- .../instances/multicontext/ComplexTest.java | 42 +++---------------- .../instances/multicontext/EnhancedTest.java | 35 +++------------- 4 files changed, 21 insertions(+), 122 deletions(-) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java index a6dae0b..fc86247 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java @@ -87,8 +87,9 @@ public class SmartgearResourcesTest extends ContextTest { private static Logger logger = LoggerFactory .getLogger(SmartgearResourcesTest.class); - public static final String HOSTING_NODE = "{\"@class\":\"HostingNode\",\"header\":{\"@class\":\"Header\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"creator\":null,\"creationTime\":null,\"lastUpdateTime\":null},\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"NetworkingFacet\",\"header\":null,\"hostName\":\"pc-frosini.isti.cnr.it\",\"domainName\":\"isti.cnr.it\",\"mask\":null,\"broadcastAddress\":null,\"IPAddress\":\"127.0.1.1\",\"Port\":8080}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"CPUFacet\",\"header\":null,\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"vendor\":\"GenuineIntel\",\"clockSpeed\":\"2872.828\",\"cache_size\":\"6144 KB\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"bogomips\":\"6199.91\",\"fpu\":\"yes\",\"stepping\":\"9\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"wp\":\"yes\",\"clflush_size\":\"64\",\"siblings\":\"4\",\"microcode\":\"0x17\",\"cpu_family\":\"6\",\"cpu_cores\":\"4\",\"physical_id\":\"0\",\"cpuid_level\":\"13\",\"fpu_exception\":\"yes\",\"apicid\":\"0\",\"cache_alignment\":\"64\",\"processor\":\"0\",\"core_id\":\"0\",\"initial_apicid\":\"0\",\"modelNumber\":\"58\"}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"CPUFacet\",\"header\":null,\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"vendor\":\"GenuineIntel\",\"clockSpeed\":\"2617.199\",\"cache_size\":\"6144 KB\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"bogomips\":\"6199.91\",\"fpu\":\"yes\",\"stepping\":\"9\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"wp\":\"yes\",\"clflush_size\":\"64\",\"siblings\":\"4\",\"microcode\":\"0x17\",\"cpu_family\":\"6\",\"cpu_cores\":\"4\",\"physical_id\":\"0\",\"cpuid_level\":\"13\",\"fpu_exception\":\"yes\",\"apicid\":\"2\",\"cache_alignment\":\"64\",\"processor\":\"1\",\"core_id\":\"1\",\"initial_apicid\":\"2\",\"modelNumber\":\"58\"}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"CPUFacet\",\"header\":null,\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"vendor\":\"GenuineIntel\",\"clockSpeed\":\"2610.660\",\"cache_size\":\"6144 KB\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"bogomips\":\"6199.91\",\"fpu\":\"yes\",\"stepping\":\"9\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"wp\":\"yes\",\"clflush_size\":\"64\",\"siblings\":\"4\",\"microcode\":\"0x17\",\"cpu_family\":\"6\",\"cpu_cores\":\"4\",\"physical_id\":\"0\",\"cpuid_level\":\"13\",\"fpu_exception\":\"yes\",\"apicid\":\"4\",\"cache_alignment\":\"64\",\"processor\":\"2\",\"core_id\":\"2\",\"initial_apicid\":\"4\",\"modelNumber\":\"58\"}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"CPUFacet\",\"header\":null,\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"vendor\":\"GenuineIntel\",\"clockSpeed\":\"2712.257\",\"cache_size\":\"6144 KB\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"bogomips\":\"6199.91\",\"fpu\":\"yes\",\"stepping\":\"9\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"wp\":\"yes\",\"clflush_size\":\"64\",\"siblings\":\"4\",\"microcode\":\"0x17\",\"cpu_family\":\"6\",\"cpu_cores\":\"4\",\"physical_id\":\"0\",\"cpuid_level\":\"13\",\"fpu_exception\":\"yes\",\"apicid\":\"6\",\"cache_alignment\":\"64\",\"processor\":\"3\",\"core_id\":\"3\",\"initial_apicid\":\"6\",\"modelNumber\":\"58\"}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"SoftwareFacet\",\"header\":null,\"name\":\"amd64\",\"group\":\"Linux\",\"version\":\"4.4.0-47-generic\",\"description\":null,\"qualifier\":null,\"optional\":false}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"SimplePropertyFacet\",\"header\":null,\"name\":\"ENVIRONMENT_VARIABLES\",\"value\":\"\",\"TERM\":\"xterm\",\"XDG_SESSION_PATH\":\"/org/freedesktop/DisplayManager/Session0\",\"JAVA_HOME\":\"/usr/lib/jvm/java-7-oracle\",\"J2REDIR\":\"/usr/lib/jvm/java-7-oracle/jre\",\"LESSCLOSE\":\"/usr/bin/lesspipe %s %s\",\"UPSTART_SESSION\":\"unix:abstract=/com/ubuntu/upstart-session/1000/1613\",\"J2SDKDIR\":\"/usr/lib/jvm/java-7-oracle\",\"SESSION_MANAGER\":\"local/pc-frosini.isti.cnr.it:@/tmp/.ICE-unix/1849,unix/pc-frosini.isti.cnr.it:/tmp/.ICE-unix/1849\",\"LC_NUMERIC\":\"it_IT.UTF-8\",\"GNOME_DESKTOP_SESSION_ID\":\"this-is-deprecated\",\"Java\":\"1.7.0_80\",\"COMPIZ_CONFIG_PROFILE\":\"ubuntu\",\"GDMSESSION\":\"ubuntu\",\"IM_CONFIG_PHASE\":\"1\",\"MANDATORY_PATH\":\"/usr/share/gconf/ubuntu.mandatory.path\",\"SmartGearsDistributionBundle\":\"2.0.1-SNAPSHOT\",\"PWD\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"SESSIONTYPE\":\"gnome-session\",\"GIO_LAUNCHED_DESKTOP_FILE_PID\":\"7474\",\"GTK_IM_MODULE\":\"ibus\",\"XDG_GREETER_DATA_DIR\":\"/var/lib/lightdm-data/lucafrosini\",\"XDG_SESSION_TYPE\":\"x11\",\"NLSPATH\":\"/usr/dt/lib/nls/msg/%L/%N.cat\",\"TERMINATOR_UUID\":\"urn:uuid:7e1ff3e9-f2ca-4c64-b5db-922901ce32dc\",\"XDG_MENU_PREFIX\":\"gnome-\",\"LC_ADDRESS\":\"it_IT.UTF-8\",\"ghn-update-interval-in-secs\":\"60\",\"XDG_CONFIG_DIRS\":\"/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg\",\"XDG_CURRENT_DESKTOP\":\"Unity\",\"QT_LINUX_ACCESSIBILITY_ALWAYS_ON\":\"1\",\"GHN_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/SmartGears\",\"XAUTHORITY\":\"/home/lucafrosini/.Xauthority\",\"GDM_LANG\":\"en_US\",\"XDG_SEAT\":\"seat0\",\"SmartGears\":\"2.2.0-SNAPSHOT\",\"CATALINA_PID\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/tomcat.pid\",\"XDG_SESSION_ID\":\"c2\",\"XDG_SEAT_PATH\":\"/org/freedesktop/DisplayManager/Seat0\",\"XDG_VTNR\":\"7\",\"LC_TIME\":\"it_IT.UTF-8\",\"GNOME_KEYRING_CONTROL\":\"\",\"GTK_MODULES\":\"gail:atk-bridge:unity-gtk-module\",\"LC_TELEPHONE\":\"it_IT.UTF-8\",\"SHLVL\":\"2\",\"XFILESEARCHPATH\":\"/usr/dt/app-defaults/%L/Dt\",\"GTK2_MODULES\":\"overlay-scrollbar\",\"COMPIZ_BIN_PATH\":\"/usr/bin/\",\"COLORTERM\":\"gnome-terminal\",\"JOB\":\"unity-settings-daemon\",\"UPSTART_JOB\":\"unity7\",\"LC_NAME\":\"it_IT.UTF-8\",\"IBUS_DISABLE_SNOOPER\":\"1\",\"XDG_DATA_DIRS\":\"/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop\",\"QT_QPA_PLATFORMTHEME\":\"appmenu-qt5\",\"QT_IM_MODULE\":\"ibus\",\"GIO_LAUNCHED_DESKTOP_FILE\":\"/usr/share/applications/terminator.desktop\",\"UPSTART_INSTANCE\":\"\",\"LOGNAME\":\"lucafrosini\",\"WINDOWID\":\"81788932\",\"LC_PAPER\":\"it_IT.UTF-8\",\"SmartGearsDistribution\":\"2.0.0-SNAPSHOT\",\"SESSION\":\"ubuntu\",\"GPG_AGENT_INFO\":\"/home/lucafrosini/.gnupg/S.gpg-agent:0:1\",\"LC_IDENTIFICATION\":\"it_IT.UTF-8\",\"DERBY_HOME\":\"/usr/lib/jvm/java-7-oracle/db\",\"XMODIFIERS\":\"@im=ibus\",\"LD_LIBRARY_PATH\":\"/home/lucafrosini/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64\",\"UPSTART_EVENTS\":\"xsession started\",\"OLDPWD\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"DBUS_SESSION_BUS_ADDRESS\":\"unix:abstract=/tmp/dbus-mf1KaSOYwP\",\"SHELL\":\"/bin/bash\",\"GNOME_KEYRING_PID\":\"\",\"LANGUAGE\":\"en_US\",\"QT_ACCESSIBILITY\":\"1\",\"DESKTOP_SESSION\":\"ubuntu\",\"INSTANCE\":\"\",\"DISPLAY\":\":0\",\"CLUTTER_IM_MODULE\":\"xim\",\"LC_MONETARY\":\"it_IT.UTF-8\",\"USER\":\"lucafrosini\",\"CATALINA_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/tomcat\",\"HOME\":\"/home/lucafrosini\",\"LESSOPEN\":\"| /usr/bin/lesspipe %s\",\"QT4_IM_MODULE\":\"xim\",\"CATALINA_OPTS\":\"-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Xmx2000m -Xms2000m\",\"DEFAULTS_PATH\":\"/usr/share/gconf/ubuntu.default.path\",\"ORBIT_SOCKETDIR\":\"/tmp/orbit-lucafrosini\",\"XDG_SESSION_DESKTOP\":\"ubuntu\",\"LC_MEASUREMENT\":\"it_IT.UTF-8\",\"BUNDLE_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"XDG_RUNTIME_DIR\":\"/run/user/1000\",\"LANG\":\"en_US.UTF-8\"}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"StateFacet\",\"header\":null,\"value\":\"started\"}},{\"@class\":\"HasVolatileMemory\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"MemoryFacet\",\"header\":null,\"size\":15736,\"used\":9042,\"unit\":\"MB\"},\"memoryType\":\"RAM\"},{\"@class\":\"HasVolatileMemory\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"MemoryFacet\",\"header\":null,\"size\":1917,\"used\":374,\"unit\":\"MB\",\"jvmMaxMemory\":1917},\"memoryType\":\"JVM\"},{\"@class\":\"HasPersistentMemory\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"MemoryFacet\",\"header\":null,\"size\":273894,\"used\":101270,\"unit\":\"MB\"}}],\"isRelatedTo\":[]}"; - public static final String ESERVICE = "{\"@class\":\"EService\",\"header\":{\"@class\":\"Header\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"creator\":null, \"creationTime\":null, \"lastUpdateTime\":null},\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"SoftwareFacet\",\"header\":null,\"name\":\"WhnManager\",\"group\":\"VREManagement\",\"version\":\"2.0.0-SNAPSHOT\",\"description\":\"Web Hosting Node Service\",\"qualifier\":null,\"optional\":false}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"AccessPointFacet\",\"header\":null,\"entryName\":\"whnmanager\",\"endpoint\":\"https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager\",\"protocol\":null,\"description\":null,\"authorization\": {\"@class\":\"ValueSchema\",\"value\":\"gcube-token\",\"schema\":null},\"properties\":null}},{\"@class\":\"ConsistsOf\",\"header\":null,\"relationProperty\":null,\"target\":{\"@class\":\"AccessPointFacet\",\"header\":null,\"entryName\":\"WhnManager-remote-management\",\"endpoint\":\"https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource\",\"protocol\":null,\"description\":null,\"authorization\":{\"@class\":\"ValueSchema\",\"value\":\"gcube-token\",\"schema\":null},\"properties\":null}}],\"isRelatedTo\":[]}"; + public static final String HOSTING_NODE = "{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"],\"consistsOf\":[{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.415 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"7cdfb550-7f72-4b92-8f50-213a9fe33520\",\"lastUpdateTime\":\"2021-02-23 11:47:26.415 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"HasPersistentMemory\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"unit\":\"MB\",\"size\":\"273894\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.413 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"aea53561-c635-49ae-ae98-9932ed853478\",\"lastUpdateTime\":\"2021-02-23 11:47:26.413 +0100\"},\"used\":\"101270\",\"@class\":\"MemoryFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.352 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"08b008d7-88b9-4ed8-a4d6-de98090e12aa\",\"lastUpdateTime\":\"2021-02-23 11:47:26.352 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"IsIdentifiedBy\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"hostName\":\"pc-frosini.isti.cnr.it\",\"domainName\":\"isti.cnr.it\",\"Port\":\"8080\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.300 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"641b2d6f-739a-4473-8f78-891940994a90\",\"lastUpdateTime\":\"2021-02-23 11:47:26.300 +0100\"},\"IPAddress\":\"127.0.1.1\",\"@class\":\"NetworkingFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.361 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"312c689d-a930-4e3b-ac6b-cb2877d19a73\",\"lastUpdateTime\":\"2021-02-23 11:47:26.361 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"siblings\":\"4\",\"apicid\":\"0\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"physical_id\":\"0\",\"clflush_size\":\"64\",\"stepping\":\"9\",\"bogomips\":\"6199.91\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"cpu_family\":\"6\",\"core_id\":\"0\",\"clockSpeed\":\"2872.828\",\"vendor\":\"GenuineIntel\",\"wp\":\"yes\",\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"initial_apicid\":\"0\",\"cache_size\":\"6144 KB\",\"cpuid_level\":\"13\",\"fpu\":\"yes\",\"cpu_cores\":\"4\",\"microcode\":\"0x17\",\"processor\":\"0\",\"cache_alignment\":\"64\",\"fpu_exception\":\"yes\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.355 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"9b4e0ad9-43f4-4e26-8264-c68c199cd234\",\"lastUpdateTime\":\"2021-02-23 11:47:26.355 +0100\"},\"modelNumber\":\"58\",\"@class\":\"CPUFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.366 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"971250f5-0f4d-4f10-8800-b847b6445af0\",\"lastUpdateTime\":\"2021-02-23 11:47:26.366 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"siblings\":\"4\",\"apicid\":\"2\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"physical_id\":\"0\",\"clflush_size\":\"64\",\"stepping\":\"9\",\"bogomips\":\"6199.91\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"cpu_family\":\"6\",\"core_id\":\"1\",\"clockSpeed\":\"2617.199\",\"vendor\":\"GenuineIntel\",\"wp\":\"yes\",\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"initial_apicid\":\"2\",\"cache_size\":\"6144 KB\",\"cpuid_level\":\"13\",\"fpu\":\"yes\",\"cpu_cores\":\"4\",\"microcode\":\"0x17\",\"processor\":\"1\",\"cache_alignment\":\"64\",\"fpu_exception\":\"yes\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.363 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"fb588690-26a7-4205-ac16-a6994a57dfdc\",\"lastUpdateTime\":\"2021-02-23 11:47:26.363 +0100\"},\"modelNumber\":\"58\",\"@class\":\"CPUFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.370 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"9c6f9c5c-c5ac-45f2-90df-e6c5dd12bf7d\",\"lastUpdateTime\":\"2021-02-23 11:47:26.370 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"siblings\":\"4\",\"apicid\":\"4\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"physical_id\":\"0\",\"clflush_size\":\"64\",\"stepping\":\"9\",\"bogomips\":\"6199.91\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"cpu_family\":\"6\",\"core_id\":\"2\",\"clockSpeed\":\"2610.660\",\"vendor\":\"GenuineIntel\",\"wp\":\"yes\",\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"initial_apicid\":\"4\",\"cache_size\":\"6144 KB\",\"cpuid_level\":\"13\",\"fpu\":\"yes\",\"cpu_cores\":\"4\",\"microcode\":\"0x17\",\"processor\":\"2\",\"cache_alignment\":\"64\",\"fpu_exception\":\"yes\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.368 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"16384570-1dd8-40df-8e46-c935efc36b0c\",\"lastUpdateTime\":\"2021-02-23 11:47:26.368 +0100\"},\"modelNumber\":\"58\",\"@class\":\"CPUFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.374 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"d51abf55-7048-4394-9e11-23323d2e1c6d\",\"lastUpdateTime\":\"2021-02-23 11:47:26.374 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"siblings\":\"4\",\"apicid\":\"6\",\"flags\":\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts\",\"physical_id\":\"0\",\"clflush_size\":\"64\",\"stepping\":\"9\",\"bogomips\":\"6199.91\",\"address_sizes\":\"36 bits physical, 48 bits virtual\",\"cpu_family\":\"6\",\"core_id\":\"3\",\"clockSpeed\":\"2712.257\",\"vendor\":\"GenuineIntel\",\"wp\":\"yes\",\"model\":\"Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz\",\"initial_apicid\":\"6\",\"cache_size\":\"6144 KB\",\"cpuid_level\":\"13\",\"fpu\":\"yes\",\"cpu_cores\":\"4\",\"microcode\":\"0x17\",\"processor\":\"3\",\"cache_alignment\":\"64\",\"fpu_exception\":\"yes\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.372 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"233a7ddd-46ad-430e-b445-d62d83fc58f9\",\"lastUpdateTime\":\"2021-02-23 11:47:26.372 +0100\"},\"modelNumber\":\"58\",\"@class\":\"CPUFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.382 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"c731c9a1-bead-4bdd-b19a-b8ead87b3ceb\",\"lastUpdateTime\":\"2021-02-23 11:47:26.382 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"name\":\"amd64\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.376 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"6d11a49a-b5d8-4f8f-9f34-967ec3d20c4e\",\"lastUpdateTime\":\"2021-02-23 11:47:26.376 +0100\"},\"optional\":\"false\",\"version\":\"4.4.0-47-generic\",\"group\":\"Linux\",\"@class\":\"SoftwareFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.392 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"2d5714f3-bc2d-41b4-b3d4-4293e8ad13f9\",\"lastUpdateTime\":\"2021-02-23 11:47:26.392 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"XMODIFIERS\":\"@im=ibus\",\"GDMSESSION\":\"ubuntu\",\"BUNDLE_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"DBUS_SESSION_BUS_ADDRESS\":\"unix:abstract=/tmp/dbus-mf1KaSOYwP\",\"DEFAULTS_PATH\":\"/usr/share/gconf/ubuntu.default.path\",\"COLORTERM\":\"gnome-terminal\",\"LD_LIBRARY_PATH\":\"/home/lucafrosini/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64\",\"UPSTART_SESSION\":\"unix:abstract=/com/ubuntu/upstart-session/1000/1613\",\"SESSION_MANAGER\":\"local/pc-frosini.isti.cnr.it:@/tmp/.ICE-unix/1849,unix/pc-frosini.isti.cnr.it:/tmp/.ICE-unix/1849\",\"LC_PAPER\":\"it_IT.UTF-8\",\"PWD\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"ORBIT_SOCKETDIR\":\"/tmp/orbit-lucafrosini\",\"DERBY_HOME\":\"/usr/lib/jvm/java-7-oracle/db\",\"LANGUAGE\":\"en_US\",\"WINDOWID\":\"81788932\",\"LESSOPEN\":\"| /usr/bin/lesspipe %s\",\"INSTANCE\":\"\",\"CATALINA_OPTS\":\"-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Xmx2000m -Xms2000m\",\"GNOME_DESKTOP_SESSION_ID\":\"this-is-deprecated\",\"UPSTART_INSTANCE\":\"\",\"GTK_MODULES\":\"gail:atk-bridge:unity-gtk-module\",\"CLUTTER_IM_MODULE\":\"xim\",\"COMPIZ_BIN_PATH\":\"/usr/bin/\",\"SHLVL\":\"2\",\"JAVA_HOME\":\"/usr/lib/jvm/java-7-oracle\",\"TERM\":\"xterm\",\"XDG_CONFIG_DIRS\":\"/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg\",\"XDG_SEAT_PATH\":\"/org/freedesktop/DisplayManager/Seat0\",\"SmartGears\":\"2.2.0-SNAPSHOT\",\"XDG_SESSION_ID\":\"c2\",\"LC_NAME\":\"it_IT.UTF-8\",\"Java\":\"1.7.0_80\",\"XDG_GREETER_DATA_DIR\":\"/var/lib/lightdm-data/lucafrosini\",\"UPSTART_EVENTS\":\"xsession started\",\"SESSION\":\"ubuntu\",\"DESKTOP_SESSION\":\"ubuntu\",\"XDG_MENU_PREFIX\":\"gnome-\",\"QT_ACCESSIBILITY\":\"1\",\"NLSPATH\":\"/usr/dt/lib/nls/msg/%L/%N.cat\",\"SmartGearsDistribution\":\"2.0.0-SNAPSHOT\",\"XAUTHORITY\":\"/home/lucafrosini/.Xauthority\",\"LC_MEASUREMENT\":\"it_IT.UTF-8\",\"LC_TELEPHONE\":\"it_IT.UTF-8\",\"MANDATORY_PATH\":\"/usr/share/gconf/ubuntu.mandatory.path\",\"CATALINA_PID\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/tomcat.pid\",\"XDG_DATA_DIRS\":\"/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop\",\"LC_TIME\":\"it_IT.UTF-8\",\"GTK_IM_MODULE\":\"ibus\",\"XDG_CURRENT_DESKTOP\":\"Unity\",\"QT4_IM_MODULE\":\"xim\",\"QT_LINUX_ACCESSIBILITY_ALWAYS_ON\":\"1\",\"LOGNAME\":\"lucafrosini\",\"JOB\":\"unity-settings-daemon\",\"IM_CONFIG_PHASE\":\"1\",\"SmartGearsDistributionBundle\":\"2.0.1-SNAPSHOT\",\"SHELL\":\"/bin/bash\",\"LC_ADDRESS\":\"it_IT.UTF-8\",\"GIO_LAUNCHED_DESKTOP_FILE\":\"/usr/share/applications/terminator.desktop\",\"J2SDKDIR\":\"/usr/lib/jvm/java-7-oracle\",\"GTK2_MODULES\":\"overlay-scrollbar\",\"OLDPWD\":\"/home/lucafrosini/Desktop/SmartGears-Bundle\",\"J2REDIR\":\"/usr/lib/jvm/java-7-oracle/jre\",\"IBUS_DISABLE_SNOOPER\":\"1\",\"XDG_SESSION_PATH\":\"/org/freedesktop/DisplayManager/Session0\",\"name\":\"ENVIRONMENT_VARIABLES\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.385 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"6b84f4cd-aff6-41e8-8dbd-fa928b9118cf\",\"lastUpdateTime\":\"2021-02-23 11:47:26.385 +0100\"},\"SESSIONTYPE\":\"gnome-session\",\"XDG_SESSION_DESKTOP\":\"ubuntu\",\"LC_IDENTIFICATION\":\"it_IT.UTF-8\",\"LESSCLOSE\":\"/usr/bin/lesspipe %s %s\",\"LC_MONETARY\":\"it_IT.UTF-8\",\"COMPIZ_CONFIG_PROFILE\":\"ubuntu\",\"UPSTART_JOB\":\"unity7\",\"QT_IM_MODULE\":\"ibus\",\"XFILESEARCHPATH\":\"/usr/dt/app-defaults/%L/Dt\",\"GNOME_KEYRING_CONTROL\":\"\",\"LANG\":\"en_US.UTF-8\",\"XDG_SESSION_TYPE\":\"x11\",\"DISPLAY\":\":0\",\"value\":\"\",\"GDM_LANG\":\"en_US\",\"CATALINA_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/tomcat\",\"GPG_AGENT_INFO\":\"/home/lucafrosini/.gnupg/S.gpg-agent:0:1\",\"USER\":\"lucafrosini\",\"GIO_LAUNCHED_DESKTOP_FILE_PID\":\"7474\",\"LC_NUMERIC\":\"it_IT.UTF-8\",\"TERMINATOR_UUID\":\"urn:uuid:7e1ff3e9-f2ca-4c64-b5db-922901ce32dc\",\"XDG_SEAT\":\"seat0\",\"QT_QPA_PLATFORMTHEME\":\"appmenu-qt5\",\"GHN_HOME\":\"/home/lucafrosini/Desktop/SmartGears-Bundle/SmartGears\",\"XDG_VTNR\":\"7\",\"XDG_RUNTIME_DIR\":\"/run/user/1000\",\"HOME\":\"/home/lucafrosini\",\"ghn-update-interval-in-secs\":\"60\",\"GNOME_KEYRING_PID\":\"\",\"@class\":\"SimplePropertyFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.399 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"58f08672-e9ca-4a85-8e83-0882efebeec7\",\"lastUpdateTime\":\"2021-02-23 11:47:26.399 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.394 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"7e69521d-d0ae-4368-a3b3-59865c7c62f7\",\"lastUpdateTime\":\"2021-02-23 11:47:26.394 +0100\"},\"value\":\"started\",\"@class\":\"StateFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.424 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"c67c8ffe-7750-4311-9bd5-24eb17b30e66\",\"lastUpdateTime\":\"2021-02-23 11:47:26.424 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"date\":\"2021-02-23 11:47:25.789 +0100\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.418 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"6d1909bb-3e5b-444f-bb40-79520f5431e8\",\"lastUpdateTime\":\"2021-02-23 11:47:26.418 +0100\"},\"event\":{\"@class\":\"ValueSchema\",\"schema\":\"Schema\",\"value\":\"Created\"},\"@class\":\"EventFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"memoryType\":\"RAM\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.407 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"24e530ec-bd4a-4c12-87f6-dec2a10633d8\",\"lastUpdateTime\":\"2021-02-23 11:47:26.407 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"HasVolatileMemory\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"unit\":\"MB\",\"size\":\"15736\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.401 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"a23a3369-8f0c-4164-82a5-77b39c727d6e\",\"lastUpdateTime\":\"2021-02-23 11:47:26.401 +0100\"},\"used\":\"9042\",\"@class\":\"MemoryFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}},{\"memoryType\":\"JVM\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.411 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"0a90d99d-7e9c-4cc7-980b-8b3c9f2892bb\",\"lastUpdateTime\":\"2021-02-23 11:47:26.411 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"HasVolatileMemory\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.425 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f0460614-9ffb-4ecd-bf52-d91e8d81d604\",\"lastUpdateTime\":\"2021-02-23 11:47:26.425 +0100\"},\"@class\":\"HostingNode\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"unit\":\"MB\",\"size\":\"1917\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:47:26.409 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"6a7c62af-52ed-4f38-97a4-851aa7680a29\",\"lastUpdateTime\":\"2021-02-23 11:47:26.409 +0100\"},\"used\":\"374\",\"jvmMaxMemory\":\"1917\",\"@class\":\"MemoryFacet\",\"@superClasses\":[\"HasMemory\",\"ConsistsOf\"]}}]}"; + public static final String ESERVICE = "{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"],\"consistsOf\":[{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.329 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"7f464caa-4217-4a6b-bd00-1129870dc5ca\",\"lastUpdateTime\":\"2021-02-23 11:44:58.329 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"IsIdentifiedBy\",\"@superClasses\":[],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"name\":\"WhnManager\",\"description\":\"Web Hosting Node Service\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.327 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"995ff151-0eba-45f8-8a80-1a10236bffea\",\"lastUpdateTime\":\"2021-02-23 11:44:58.327 +0100\"},\"optional\":\"false\",\"version\":\"2.0.0-SNAPSHOT\",\"group\":\"VREManagement\",\"@class\":\"SoftwareFacet\",\"@superClasses\":[]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.335 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3c4bdf63-8c67-480f-9b5c-30679bbb559a\",\"lastUpdateTime\":\"2021-02-23 11:44:58.335 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"authorization\":{\"@class\":\"ValueSchema\",\"schema\":null,\"value\":\"gcube-token\"},\"endpoint\":\"https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager\",\"entryName\":\"whnmanager\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.331 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"99c8070f-3e24-43ee-a7de-7a9da293b045\",\"lastUpdateTime\":\"2021-02-23 11:44:58.331 +0100\"},\"@class\":\"AccessPointFacet\",\"@superClasses\":[]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.340 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"a3aabf4c-0e80-40cf-b5e3-2418b78ae0bd\",\"lastUpdateTime\":\"2021-02-23 11:44:58.340 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"authorization\":{\"@class\":\"ValueSchema\",\"schema\":null,\"value\":\"gcube-token\"},\"endpoint\":\"https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource\",\"entryName\":\"WhnManager-remote-management\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.337 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"cb3b40a4-61ce-4318-86e2-01000b62f424\",\"lastUpdateTime\":\"2021-02-23 11:44:58.337 +0100\"},\"@class\":\"AccessPointFacet\",\"@superClasses\":[]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.343 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"67353a89-c6da-4f2f-b1d4-883281b55aca\",\"lastUpdateTime\":\"2021-02-23 11:44:58.343 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.341 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"297c0203-8834-4d6e-8642-40e2c0a4782f\",\"lastUpdateTime\":\"2021-02-23 11:44:58.341 +0100\"},\"value\":\"ready\",\"@class\":\"StateFacet\",\"@superClasses\":[]}},{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.347 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"f4e61f26-1ef8-45f8-a14d-736451c82f91\",\"lastUpdateTime\":\"2021-02-23 11:44:58.347 +0100\"},\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascadeWhenOrphan\"},\"@class\":\"ConsistsOf\",\"@superClasses\":[],\"source\":{\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.348 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4\",\"lastUpdateTime\":\"2021-02-23 11:44:58.348 +0100\"},\"@class\":\"EService\",\"@superClasses\":[\"Service\",\"GCubeResource\",\"Resource\"]},\"target\":{\"date\":\"2021-02-23 11:44:58.321 +0100\",\"header\":{\"@class\":\"Header\",\"creator\":\"luca.frosini\",\"creationTime\":\"2021-02-23 11:44:58.345 +0100\",\"modifiedBy\":\"luca.frosini\",\"uuid\":\"417e4e00-b4c6-470b-a723-2847711f2823\",\"lastUpdateTime\":\"2021-02-23 11:44:58.345 +0100\"},\"event\":{\"@class\":\"ValueSchema\",\"schema\":null,\"value\":\"Created\"},\"@class\":\"EventFacet\",\"@superClasses\":[]}}]}"; + @Test public void testHostingNode() throws JsonParseException, @@ -96,14 +97,6 @@ public class SmartgearResourcesTest extends ContextTest { HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, HOSTING_NODE); logger.debug("{}", hostingNode); - - EventFacet hnEventFacet = new EventFacetImpl(); - hnEventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema hnEvent = new ValueSchemaImpl(); - hnEvent.setSchema(new URI("Schema")); - hnEvent.setValue("Created"); - hnEventFacet.setEvent(hnEvent); - hostingNode.addFacet(hnEventFacet); ResourceManagement resourceManagement = new ResourceManagement(); resourceManagement.setElementType(HostingNode.NAME); @@ -144,27 +137,13 @@ public class SmartgearResourcesTest extends ContextTest { @Test public void testEService() throws JsonParseException, JsonMappingException, IOException, ResourceRegistryException, URISyntaxException { - EService eService = ElementMapper.unmarshal(EService.class, ESERVICE); - logger.debug("{}", eService); - - StateFacet stateFacet = new StateFacetImpl(); - stateFacet.setValue("ready"); - eService.addFacet(stateFacet); - - EventFacet eventFacet = new EventFacetImpl(); - eventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema event = new ValueSchemaImpl(); - event.setSchema(new URI("Schema")); - event.setValue("Created"); - eventFacet.setEvent(event); - eService.addFacet(eventFacet); ResourceManagement resourceManagement = new ResourceManagement(); resourceManagement.setElementType(EService.NAME); - resourceManagement.setJson(ElementMapper.marshal(eService)); + resourceManagement.setJson(ESERVICE); String json = resourceManagement.create(); - eService = ElementMapper.unmarshal(EService.class, json); + EService eService = ElementMapper.unmarshal(EService.class, json); logger.debug("Created {} {}", EService.NAME, eService); UUID eServiceUUID = eService.getHeader().getUUID(); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/BasicTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/BasicTest.java index 59de28d..c764e2f 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/BasicTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/BasicTest.java @@ -431,29 +431,14 @@ public class BasicTest extends MultiContextTest { @Test public void testAddAndRemoveFromContext() throws Exception { - /* Creating HostingNode */ - - HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, SmartgearResourcesTest.HOSTING_NODE); - - EventFacet hnEventFacet = new EventFacetImpl(); - hnEventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema hnEvent = new ValueSchemaImpl(); - hnEvent.setSchema(new URI("Schema")); - hnEvent.setValue("Created"); - hnEventFacet.setEvent(hnEvent); - hostingNode.addFacet(hnEventFacet); - - String json = ElementMapper.marshal(hostingNode); - logger.trace("Going to create {}", json); - ResourceManagement resourceManagement = new ResourceManagement(); resourceManagement.setElementType(HostingNode.NAME); - resourceManagement.setJson(json); + resourceManagement.setJson(SmartgearResourcesTest.HOSTING_NODE); String hnJson = resourceManagement.create(); logger.debug("Created : {}", hnJson); - hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); + HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); logger.debug("Unmarshalled {} {}", HostingNode.NAME, hostingNode); UUID hnUUID = hostingNode.getHeader().getUUID(); @@ -461,25 +446,13 @@ public class BasicTest extends MultiContextTest { /* Creating EService */ - EService eService = ElementMapper.unmarshal(EService.class, SmartgearResourcesTest.ESERVICE); - StateFacet stateFacet = new StateFacetImpl(); - stateFacet.setValue("ready"); - eService.addFacet(stateFacet); - - EventFacet eventFacet = new EventFacetImpl(); - eventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema event = new ValueSchemaImpl(); - event.setValue("Created"); - eventFacet.setEvent(event); - eService.addFacet(eventFacet); - resourceManagement = new ResourceManagement(); resourceManagement.setElementType(EService.NAME); - resourceManagement.setJson(ElementMapper.marshal(eService)); + resourceManagement.setJson(SmartgearResourcesTest.ESERVICE); String eservicejson = resourceManagement.create(); logger.debug("Created : {}", eservicejson); - eService = ElementMapper.unmarshal(EService.class, eservicejson); + EService eService = ElementMapper.unmarshal(EService.class, eservicejson); logger.debug("Unmarshalled {} {}", EService.NAME, eService); UUID eServiceUUID = eService.getHeader().getUUID(); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/ComplexTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/ComplexTest.java index 7f7a7ae..bab0e17 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/ComplexTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/ComplexTest.java @@ -1,7 +1,5 @@ package org.gcube.informationsystem.resourceregistry.instances.multicontext; -import java.net.URI; -import java.util.Calendar; import java.util.Set; import java.util.UUID; @@ -19,15 +17,9 @@ import org.gcube.informationsystem.resourceregistry.instances.model.entities.Fac import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement; import org.gcube.informationsystem.resourceregistry.instances.model.relations.IsRelatedToManagement; import org.gcube.informationsystem.utils.ElementMapper; -import org.gcube.resourcemanagement.model.impl.entities.facets.EventFacetImpl; -import org.gcube.resourcemanagement.model.impl.entities.facets.StateFacetImpl; -import org.gcube.resourcemanagement.model.impl.properties.ValueSchemaImpl; import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl; -import org.gcube.resourcemanagement.model.reference.entities.facets.EventFacet; -import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet; import org.gcube.resourcemanagement.model.reference.entities.resources.EService; import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode; -import org.gcube.resourcemanagement.model.reference.properties.ValueSchema; import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates; import org.junit.Assert; import org.junit.Test; @@ -41,50 +33,28 @@ public class ComplexTest extends MultiContextTest { @Test public void testGetInstancesContexts() throws ResourceRegistryException, Exception { ContextTest.setContextByName(DEFAULT_TEST_SCOPE); - /* Creating HostingNode */ + ContextCache contextCache = ContextCache.getInstance(); contextCache.setContextCacheRenewal(contextCacheRenewal); - HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, SmartgearResourcesTest.HOSTING_NODE); - - EventFacet hnEventFacet = new EventFacetImpl(); - hnEventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema hnEvent = new ValueSchemaImpl(); - hnEvent.setSchema(new URI("Schema")); - hnEvent.setValue("Created"); - hnEventFacet.setEvent(hnEvent); - hostingNode.addFacet(hnEventFacet); - + /* Creating HostingNode */ ResourceManagement hostingNodeManagement = new ResourceManagement(); hostingNodeManagement.setElementType(HostingNode.NAME); - hostingNodeManagement.setJson(ElementMapper.marshal(hostingNode)); + hostingNodeManagement.setJson(SmartgearResourcesTest.HOSTING_NODE); String hnJson = hostingNodeManagement.create(); logger.debug("Created : {}", hnJson); - hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); + HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); logger.debug("Unmarshalled {} {}", HostingNode.NAME, hostingNode); /* Creating EService */ - - EService eService = ElementMapper.unmarshal(EService.class, SmartgearResourcesTest.ESERVICE); - StateFacet stateFacet = new StateFacetImpl(); - stateFacet.setValue("ready"); - eService.addFacet(stateFacet); - - EventFacet eventFacet = new EventFacetImpl(); - eventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema event = new ValueSchemaImpl(); - event.setValue("Created"); - eventFacet.setEvent(event); - eService.addFacet(eventFacet); - ResourceManagement eServiceManagement = new ResourceManagement(); eServiceManagement.setElementType(EService.NAME); - eServiceManagement.setJson(ElementMapper.marshal(eService)); + eServiceManagement.setJson(SmartgearResourcesTest.ESERVICE); String eservicejson = eServiceManagement.create(); logger.debug("Created : {}", eservicejson); - eService = ElementMapper.unmarshal(EService.class, eservicejson); + EService eService = ElementMapper.unmarshal(EService.class, eservicejson); logger.debug("Unmarshalled {} {}", EService.NAME, eService); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/EnhancedTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/EnhancedTest.java index d917a20..56999ed 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/EnhancedTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/EnhancedTest.java @@ -148,51 +148,28 @@ public class EnhancedTest extends MultiContextTest { @Test public void testGetContextsInInstances() throws ResourceRegistryException, Exception { ContextTest.setContextByName(DEFAULT_TEST_SCOPE); - /* Creating HostingNode */ + ContextCache contextCache = ContextCache.getInstance(); contextCache.setContextCacheRenewal(contextCacheRenewal); - HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, SmartgearResourcesTest.HOSTING_NODE); - - EventFacet hnEventFacet = new EventFacetImpl(); - hnEventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema hnEvent = new ValueSchemaImpl(); - hnEvent.setSchema(new URI("Schema")); - hnEvent.setValue("Created"); - hnEventFacet.setEvent(hnEvent); - hostingNode.addFacet(hnEventFacet); - - + /* Creating HostingNode */ ResourceManagement hostingNodeManagement = new ResourceManagement(); hostingNodeManagement.setElementType(HostingNode.NAME); - hostingNodeManagement.setJson(ElementMapper.marshal(hostingNode)); + hostingNodeManagement.setJson(SmartgearResourcesTest.HOSTING_NODE); String hnJson = hostingNodeManagement.create(); logger.debug("Created : {}", hnJson); - hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); + HostingNode hostingNode = ElementMapper.unmarshal(HostingNode.class, hnJson); logger.debug("Unmarshalled {} {}", HostingNode.NAME, hostingNode); /* Creating EService */ - - EService eService = ElementMapper.unmarshal(EService.class, SmartgearResourcesTest.ESERVICE); - StateFacet stateFacet = new StateFacetImpl(); - stateFacet.setValue("ready"); - eService.addFacet(stateFacet); - - EventFacet eventFacet = new EventFacetImpl(); - eventFacet.setDate(Calendar.getInstance().getTime()); - ValueSchema event = new ValueSchemaImpl(); - event.setValue("Created"); - eventFacet.setEvent(event); - eService.addFacet(eventFacet); - ResourceManagement eServiceManagement = new ResourceManagement(); eServiceManagement.setElementType(EService.NAME); - eServiceManagement.setJson(ElementMapper.marshal(eService)); + eServiceManagement.setJson(SmartgearResourcesTest.ESERVICE); String eservicejson = eServiceManagement.create(); logger.debug("Created : {}", eservicejson); - eService = ElementMapper.unmarshal(EService.class, eservicejson); + EService eService = ElementMapper.unmarshal(EService.class, eservicejson); logger.debug("Unmarshalled {} {}", EService.NAME, eService);