You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/04/08 17:23:47 UTC

[4/7] airavata git commit: Add new gfac email monitor module to gfac monitor module and Intorduced gfac-hpc-monitor module to keep all hoc-monitor code

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
new file mode 100644
index 0000000..b75b02a
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
@@ -0,0 +1,147 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "URL": {
+      "type": "string",
+      "description": "Network location of the endpoint"
+    },
+    "Capability": {
+      "type": "array",
+      "description": "Capability_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Technology": {
+      "type": "string",
+      "description": "EndpointTechnology_t"
+    },
+    "InterfaceName": {
+      "type": "string",
+      "description": "InterfaceName_t"
+    },
+    "InterfaceVersion": {
+      "type": "string",
+      "description": "The version of the primary interface protocol (free format)"
+    },
+    "InterfaceExtension": {
+      "type": "array",
+      "description": "URIs identifying supported extensions to the interface protocol",
+      "items": {
+        "type": "string"
+      }
+    },
+    "WSDL": {
+      "type": "array",
+      "description": "URLs of WSDL document(s) describing the interface",
+      "items": {
+        "type": "string"
+      }
+    },
+    "SupportedProfile": {
+      "type": "array",
+      "description": "URI(s) identifying supported profiles for the Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Semantics": {
+      "type": "array",
+      "description": "URL(s) of documents providing human-readable descriptions of the semantics of the Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Implementor": {
+      "type": "string",
+      "description": "The name of the main organization implementing the Endpoint"
+    },
+    "ImplementationName": {
+      "type": "string",
+      "description": "The name of the implementation of the Endpoint"
+    },
+    "ImplementationVersion": {
+      "type": "string",
+      "description": "The version of the implementation of the Endpoint"
+    },
+    "QualityLevel": {
+      "type": "string",
+      "description": "QualityLevel_t",
+      "enum": ["development","pre-production","production","testing"]
+    },
+    "HealthState": {
+      "type": "string",
+      "description": "The operational status of the Endpoint",
+      "enum": ["critical","ok","other","unknown","warning"]
+    },
+    "HealthStateInfo": {
+      "type": "string",
+      "description": "A human-readable explanation of the HealthState of this Endpoint"
+    },
+    "ServingState": {
+      "type": "string",
+      "description": "If the endpoint is accepting and serving requests",
+      "enum": ["closed","draining","production","queueing"]
+    },
+    "StartTime": {
+      "type": "string",
+      "description": "The start time of the Service associated with this Endpoint (DateTime_t)"
+    },
+    "IssuerCA": {
+      "type": "string",
+      "description": "The DN of the CA issuing the certificate presented by this Endpoint"
+    },
+    "TrustedCA": {
+      "type": "array",
+      "description": "DN(s) of CAs trusted by this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "DowntimeAnnounce": {
+      "type": "string",
+      "description": "When the next scheduled downtime was announced (DateTime_t)"
+    },
+    "DowntimeStart": {
+      "type": "string",
+      "description": "When the next scheduled downtime will start (DateTime_t)"
+    },
+    "DowntimeEnd": {
+      "type": "string",
+      "description": "When the next scheduled downtime will end (DateTime_t)"
+    },
+    "DowntimeInfo": {
+      "type": "string",
+      "description": "Human-readable of the next scheduled downtime"
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service associated with this Endpoint"
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The IDs of the Shares accessible from this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "AccessPolicyID": {
+      "type": "array",
+      "description": "IDs of AccessPolicies associated with this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "IDs of Activities being managed through this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["InterfaceName","QualityLevel","HealthState","ServingState","ServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
new file mode 100644
index 0000000..5d1ae46
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
@@ -0,0 +1,35 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json",
+  "type": "object",
+  "properties": {
+    "CreationTime": {
+      "type": "string",
+      "description": "The creation time of this entity in the format: CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]"
+    },
+    "Validity": {
+      "type": "integer",
+      "description": "The number of seconds after CreationTime that this entity should be considered relevant"
+    },
+    "ID": {
+      "type": "string",
+      "description": "A globally unique identifier for this entity"
+    },
+    "Name": {
+      "type": "string",
+      "description": "A human-readable name"
+    },
+    "OtherInfo": {
+      "type": "array",
+      "description": "Placeholder for information that does not fit in any other attribute",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Extension": {
+      "type": "object",
+      "description": "Key/value pairs enabling the association of extra information not captured by the model"
+    }
+  },
+  "required": ["ID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
new file mode 100644
index 0000000..77bf876
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
@@ -0,0 +1,115 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}],
+  "properties": {
+    "Platform": {
+      "type": "string",
+      "description": "The platform architecture - Platform_t (open enumeration)"
+    },
+    "VirtualMachine": {
+      "type": "boolean",
+      "description": "True if the ExecutionEnvironment is a virtual machine"
+    },
+    "TotalInstances": {
+      "type": "integer",
+      "description": "The total number of ExecutionEnvironment instances"
+    },
+    "UsedInstances": {
+      "type": "integer",
+      "description": "The number of ExecutionEnvironment instances in use"
+    },
+    "UnavailableInstances": {
+      "type": "integer",
+      "description": "The number of ExecutionEnvironment instances that are unavailable"
+    },
+    "PhysicalCPUs": {
+      "type": "integer",
+      "description": "The number of physical CPUs in one ExecutionEnvironment instance"
+    },
+    "LogicalCPUs": {
+      "type": "integer",
+      "description": "The number of logical CPUs in one ExecutionEnvironment instance"
+    },
+    "CPUMultiplicity": {
+      "type": "string",
+      "description": "Information about the CPUs and cores in an execution environment",
+      "enum": ["multicpu-multicore","multicpu-singlecore","singlecpu-multicore","singlecpu-singlecore"]
+    },
+    "CPUVendor": {
+      "type": "string",
+      "description": "The name of the manufacturer of the CPU"
+    },
+    "CPUModel": {
+      "type": "string",
+      "description": "The model of the CPU, as defined by the vendor"
+    },
+    "CPUVersion": {
+      "type": "string",
+      "description": "The specific version name of the CPU, as defined by the vendor"
+    },
+    "CPUClockSpeed": {
+      "type": "integer",
+      "description": "The clock speed of the CPU (MHz)"
+    },
+    "CPUTimeScalingFactor": {
+      "type": "float",
+      "description": "The factor used by the ComputingManager to scale the CPU time limit"
+    },
+    "WallTimeScalingFactor": {
+      "type": "float",
+      "description": "The factor used by the ComputingManager to scale the wallclock time limit"
+    },
+    "MainMemorySize": {
+      "type": "integer",
+      "description": "The total amount of physical RAM in one ExecutionEnvironment instance (MB)"
+    },
+    "VirtualMemorySize": {
+      "type": "integer",
+      "description": "The total amount of virtual memory (RAM+swap) in one ExecutionEnvironment instance (MB)"
+    },
+    "OSFamily": {
+      "type": "string",
+      "description": "The general family of the operating system - OSFamily_t (open enumeration)"
+    },
+    "OSName": {
+      "type": "string",
+      "description": "The specific name of the operating system - OSName_t (open enumeration)"
+    },
+    "OSVersion": {
+      "type": "string",
+      "description": "The version of the operating system, as defined by the vendor"
+    },
+    "ConnectivityIn": {
+      "type": "boolean",
+      "description": "True if direct inbound network connectiity is available to a running job"
+    },
+    "ConnectivityOut": {
+      "type": "boolean",
+      "description": "True if direct outbound network connectiity is available to a running job"
+    },
+    "NetworkInfo": {
+      "type": "array",
+      "description": "The types of internal network connections between ExecutionEnvironments - NetworkInfo_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ApplicationEnvironmentID": {
+      "type": "array",
+      "description": "ID(s) of ApplicationEnvironments available in this ExecutionEnvironment",
+      "items": {
+        "type": "string"
+      }
+    },
+    "BenchmarkID": {
+      "type": "array",
+      "description": "ID(s) of Benchmarks associated with this ExecutionEnvironment",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Platform","MainMemorySize","OSFamily","ConnectivityIn","ConnectivityOut"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
new file mode 100644
index 0000000..bb80505
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
@@ -0,0 +1,246 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Glue2.json",
+  "description": "A GLUE 2 document",
+  "type": "object",
+  "properties": {
+    "Entity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}]
+      }
+    },
+    "Location": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json"}]
+      }
+    },
+    "Contact": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Contact.json"}]
+      }
+    },
+    "Domain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}]
+      }
+    },
+    "AdminDomain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AdminDomain.json"}]
+      }
+    },
+    "UserDomain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json"}]
+      }
+    },
+    "Service": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}]
+      }
+    },
+    "Endpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}]
+      }
+    },
+    "Share": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}]
+      }
+    },
+    "Manager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json"}]
+      }
+    },
+    "Resource": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}]
+      }
+    },
+    "Activity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json"}]
+      }
+    },
+    "Policy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}]
+      }
+    },
+    "AccessPolicy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AccessPolicy.json"}]
+      }
+    },
+    "MappingPolicy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json"}]
+      }
+    },
+    "ComputingService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingService.json"}]
+      }
+    },
+    "ComputingEndpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingEndpoint.json"}]
+      }
+    },
+    "ComputingShare": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingShare.json"}]
+      }
+    },
+    "ComputingManager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingManager.json"}]
+      }
+    },
+    "Benchmark": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Benchmark.json"}]
+      }
+    },
+    "ExecutionEnvironment": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json"}]
+      }
+    },
+    "ApplicationEnvironment": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationEnvironment.json"}]
+      }
+    },
+    "ApplicationHandle": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationHandle.json"}]
+      }
+    },
+    "ComputingActivity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingActivity.json"}]
+      }
+    },
+    "ToStorageService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json"}]
+      }
+    },
+    "StorageService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json"}]
+      }
+    },
+    "StorageServiceCapacity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json"}]
+      }
+    },
+    "StorageAccessProtocol": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json"}]
+      }
+    },
+    "StorageEndpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json"}]
+      }
+    },
+    "StorageShare": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json"}]
+      }
+    },
+    "StorageShareCapacity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json"}]
+      }
+    },
+    "StorageManager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json"}]
+      }
+    },
+    "DataStore": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/DataStore.json"}]
+      }
+    },
+    "ToComputingService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json"}]
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
new file mode 100644
index 0000000..8491cc0
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
@@ -0,0 +1,47 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json",
+  "description": "A GLUE 2 Location",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Address": {
+      "type": "string",
+      "description": "A free format street address"
+    },
+    "Place": {
+      "type": "string",
+      "description": "Name of town/city"
+    },
+    "Country": {
+      "type": "string",
+      "description": "Name of country"
+    },
+    "PostalCode": {
+      "type": "string",
+      "description": "Postal code"
+    },
+    "Latitude": {
+      "type": "number",
+      "description": "Position north (positive) or south (negative) of the equator in degrees"
+    },
+    "Longitude": {
+      "type": "number",
+      "description": "Position east (positive) or west (negative) of the primary meridian in degrees"
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "The IDs of Services at this location",
+      "items": {
+        "type": "string"
+      }
+    },
+    "DomainID": {
+      "type": "array",
+      "description": "The IDs of Domains at this location",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
new file mode 100644
index 0000000..d1df50a
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
@@ -0,0 +1,28 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "ProductName": {
+      "type": "string",
+      "description": "The name of the software product which implements the Manager"
+    },
+    "ProductVersion": {
+      "type": "string",
+      "description": "The version of the software product which implements the Manager"
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service this Share participates in"
+    },
+    "ResourceID": {
+      "type": "array",
+      "description": "ID(s) of Resources associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ProductName","ServiceID","ResourceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
new file mode 100644
index 0000000..268844d
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
@@ -0,0 +1,13 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
+  "properties": {
+    "ShareID": {
+      "type": "string",
+      "description": "The ID of the Share this MappingPolicy is for"
+    }
+  },
+  "required": ["ShareID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
new file mode 100644
index 0000000..f936699
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
@@ -0,0 +1,27 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Scheme": {
+      "type": "string",
+      "description": "PolicyScheme_t (open enumeration)"
+    },
+    "Rule": {
+      "type": "array",
+      "description": "Policy rules",
+      "items": {
+        "type": "string"
+      }
+    },
+    "UserDomainID": {
+      "type": "array",
+      "description": "The ID(s) of the UserDomains this Policy applies to",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Scheme","Rule","UserDomainID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
new file mode 100644
index 0000000..88d08ad
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
@@ -0,0 +1,27 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "ManagerID": {
+      "type": "string",
+      "description": "The ID of the Manager for this Resource"
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The ID(s) of the Shares this Resource is part of",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "The ID(s) of Activities consuming from this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ManagerID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
new file mode 100644
index 0000000..4662407
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
@@ -0,0 +1,75 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Capability": {
+      "type": "array",
+      "description": "Capability_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Type": {
+      "type": "string",
+      "description": "ServiceType_t (open enumeration)"
+    },
+    "QualityLevel": {
+      "type": "string",
+      "description": "QualityLevel_t",
+      "enum": ["development","pre-production","production","testing"]
+    },
+    "StatusInfo": {
+      "type": "array",
+      "description": "URLs of web pages providing additional information",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Complexity": {
+      "type": "string",
+      "description": "A human-readable description of the number of endpoint types, shares, and resources"
+    },
+    "EndpointID": {
+      "type": "array",
+      "description": "The IDs of Endpoints for this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The IDs of the Shares offered by this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ManagerID": {
+      "type": "array",
+      "description": "The IDs of the Managers of this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ContactID": {
+      "type": "array",
+      "description": "The IDs of Contacts for this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "LocationID": {
+      "type": "string",
+      "description": "The ID of the primary Location of this Service"
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "The IDs of Services related to this Service",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Type","QualityLevel"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
new file mode 100644
index 0000000..258fc1b
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
@@ -0,0 +1,45 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Description": {
+      "type": "string",
+      "description": "A human-readable description of the Share"
+    },
+    "EndpointID": {
+      "type": "array",
+      "description": "The ID(s) of the Endpoints that can be used to access this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ResourceID": {
+      "type": "array",
+      "description": "The ID(s) of the Resources associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service this Share participates in"
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "The ID(s) of Activities consuming from this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "MappingPolicyID": {
+      "type": "array",
+      "description": "ID(s) of MappingPolicies associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
new file mode 100644
index 0000000..05a830b
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of the protocol - StorageAccessProtocol_t"
+    },
+    "Version": {
+      "type": "string",
+      "description": "The version of the protocol supported"
+    },
+    "MaxStreams": {
+      "type": "integer",
+      "description": "The maximum number of parallel network streams which can be usef for a single transfer"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService this protocol is available for"
+    },
+    "ToComputingServiceID": {
+      "type": "array",
+      "description": "The ID(s) ToComputingService objects that describe connectivity to ComputingServices",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Type","Version","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
new file mode 100644
index 0000000..38b27c4
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
@@ -0,0 +1,8 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
+  "properties": {
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
new file mode 100644
index 0000000..f3984f6
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
@@ -0,0 +1,8 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
new file mode 100644
index 0000000..a03d111
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
@@ -0,0 +1,22 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
+  "properties": {
+    "StorageAccessProtocolID": {
+      "type": "array",
+      "description": "The ID(s) of the StorageAccessProtocols supported by this service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "StorageServiceCapacityID": {
+      "type": "array",
+      "description": "The ID(s) of the StorageServiceCapacities for this Service",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
new file mode 100644
index 0000000..a25c204
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
@@ -0,0 +1,33 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of storage capacity - StorageCapacity_t"
+    },
+    "TotalSize": {
+      "type": "integer",
+      "description": "The total amount of storage of this type (GB)"
+    },
+    "FreeSize": {
+      "type": "integer",
+      "description": "The amount of currently available storage of this type (GB)"
+    },
+    "UsedSize": {
+      "type": "integer",
+      "description": "The amount storage of this type in use (GB)"
+    },
+    "ReservedSize": {
+      "type": "integer",
+      "description": "The amount storage of this type which is not in use, but has been reserved for use in use (GB)"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService this capacity describes"
+    }
+  },
+  "required": ["Type","StorageServiceID"]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
new file mode 100644
index 0000000..9703118
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
@@ -0,0 +1,65 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+    "ServingState": {
+      "type": "string",
+      "description": "How the Share is currently serving jobs",
+      "enum": ["closed","draining","production","queueing"]
+    },
+    "Path": {
+      "type": "string",
+      "description": "A default namespace where files are logically placed when they are stored in this Share"
+    },
+    "AccessMode": {
+      "type": "array",
+      "description": "The type of access allowed for this share - AccessMode_t (undefined)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "SharingID": {
+      "type": "string",
+      "description": "A local identifier common to the set of StorageShares which use the same underling extents"
+    },
+    "AccessLatency": {
+      "type": "string",
+      "description": "The maximum latency category under normal operating conditions",
+      "enum": ["nearline","offline","online"]
+    },
+    "RetentionPolicy": {
+      "type": "string",
+      "description": "The quality of data retention - RetentionPolicy_t"
+    },
+    "ExpirationMode": {
+      "type": "array",
+      "description": "Supported file lifetime modes",
+      "items": {
+        "type": "string",
+        "enum": ["neverexpire","releasewhenexpired","warnwhenexpired"]
+      }
+    },
+    "DefaultLifeTime": {
+      "type": "integer",
+      "description": "The default lifetime assigned to a new file"
+    },
+    "MaximumLifeTime": {
+      "type": "integer",
+      "description": "The maximum lifetime that can be requested for a file"
+    },
+    "Tag": {
+      "type": "string",
+      "description": "An identifier defined by a UserDomain"
+    },
+    "StorageShareCapacityID": {
+      "type": "array",
+      "description": "ID of the StorageShareCapacities associated with this share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ServingState","SharingID","AccessLatency"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
new file mode 100644
index 0000000..f392c94
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
@@ -0,0 +1,33 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of storage capacity - StorageCapacity_t"
+    },
+    "TotalSize": {
+      "type": "integer",
+      "description": "The total amount of storage (GB)"
+    },
+    "FreeSize": {
+      "type": "integer",
+      "description": "The amount of available storage (GB)"
+    },
+    "UsedSize": {
+      "type": "integer",
+      "description": "The amount of used storage (GB)"
+    },
+    "ReservedSize": {
+      "type": "integer",
+      "description": "The amount storage which is not occupied, but has been reserved for use (GB)"
+    },
+    "StorageShareID": {
+      "type": "string",
+      "description": "The ID of the StorageShare related to this capacity"
+    }
+  },
+  "required": ["Type","StorageShareID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
new file mode 100644
index 0000000..6d81b80
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "NetworkInfo": {
+      "type": "string",
+      "description": "Type of network connections between the Storage and Computing services (NetworkInfo_t)"
+    },
+    "Bandwidth": {
+      "type": "integer",
+      "description": "The normal bandwidth available between the Storage and Computing services (Mb/s)"
+    },
+    "StorageAccessProtocolID": {
+      "type": "array",
+      "description": "IDs of the protocols that can be used to access the StorageService",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ComputingServiceID": {
+      "type": "string",
+      "description": "The ID of the ComputingService"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService"
+    }
+  },
+  "required": ["ComputingServiceID","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
new file mode 100644
index 0000000..644f3d1
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
@@ -0,0 +1,25 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "LocalPath": {
+      "type": "string",
+      "description": "The path within the ComputingService that is used to access the StorageService"
+    },
+    "RemotePath": {
+      "type": "string",
+      "description": "The path in the StorageService which is associated with the LocalPath"
+    },
+    "ComputingServiceID": {
+      "type": "string",
+      "description": "The ID of the ComputingService"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService"
+    }
+  },
+  "required": ["LocalPath","RemotePath","ComputingServiceID","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
new file mode 100644
index 0000000..7acda31
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
@@ -0,0 +1,58 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
+  "properties": {
+    "Level": {
+      "type": "integer",
+      "description": "the number of hops to reach the root of the hierarchy of UserDomains"
+    },
+    "UserManagerID": {
+      "type": "array",
+      "description": "ID for the Endpoint of a Service managing users in this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Member": {
+      "type": "array",
+      "description": "Identifiers for users in this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "PolicyID": {
+      "type": "array",
+      "description": "IDs for Policies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ChildDomainID": {
+      "type": "array",
+      "description": "IDs of UserDomains aggregated by this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ParentDomainID": {
+      "type": "string",
+      "description": "The ID of the UserDomain that this UserDomain participates in"
+    },
+    "AccessPolicyID": {
+      "type": "array",
+      "description": "IDs of AccessPolicies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "MappingPolicyID": {
+      "type": "array",
+      "description": "IDs of MappingPolicies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
new file mode 100644
index 0000000..391bfea
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
@@ -0,0 +1,58 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+
+#
+# Class which implemented Scheduler interface. It will be used to determine a Provider
+#
+scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
+
+#
+# Data Service Plugins classes
+#
+datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
+
+#
+# Pre execution Plugins classes. For example, GridFTP Input Staging
+#
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
+
+#
+# Post execution Plugins classes. For example, GridFTP Output Staging
+#
+postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
+postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
+
+#
+# SSH private key location. It will be used by SSHProvider
+#
+# ssh.key=/home/user/.ssh/id_rsa
+# ssh.keypass=
+# ssh.username=usernameAtHost
+
+#
+# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
+#
+# myproxy.server=myproxy.teragrid.org
+# myproxy.user=username
+# myproxy.pass=password
+# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
new file mode 100644
index 0000000..daa2e91
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
@@ -0,0 +1,207 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.job;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
+import org.apache.airavata.gsi.ssh.api.Cluster;
+import org.apache.airavata.gsi.ssh.api.SSHApiException;
+import org.apache.airavata.gsi.ssh.api.ServerInfo;
+import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+public class AMQPMonitorTest {
+
+    private String myProxyUserName;
+    private String myProxyPassword;
+    private String certificateLocation;
+    private String pbsFilePath;
+    private String workingDirectory;
+    private MonitorPublisher monitorPublisher;
+    private BlockingQueue<MonitorID> finishQueue;
+    private BlockingQueue<MonitorID> pushQueue;
+    private Thread pushThread;
+    private String proxyFilePath;
+    private ComputeResourceDescription computeResourceDescription;
+    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitorTest.class);
+
+    @Before
+    public void setUp() throws Exception {
+        System.setProperty("myproxy.username", "ogce");
+        System.setProperty("myproxy.password", "");
+        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+        System.setProperty("gsi.working.directory", "/home1/01437/ogce");
+        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+        System.setProperty("proxy.file.path", "/Users/lahirugunathilake/Downloads/x509up_u503876");
+        myProxyUserName = System.getProperty("myproxy.username");
+        myProxyPassword = System.getProperty("myproxy.password");
+        workingDirectory = System.getProperty("gsi.working.directory");
+        certificateLocation = System.getProperty("trusted.cert.location");
+        proxyFilePath = System.getProperty("proxy.file.path");
+        System.setProperty("connection.name", "xsede");
+        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
+            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+            throw new Exception("Need my proxy user name password to run tests.");
+        }
+
+        monitorPublisher =  new MonitorPublisher(new EventBus());
+        pushQueue = new LinkedBlockingQueue<MonitorID>();
+        finishQueue = new LinkedBlockingQueue<MonitorID>();
+
+
+        final AMQPMonitor amqpMonitor = new
+                AMQPMonitor(monitorPublisher,
+                pushQueue, finishQueue,proxyFilePath,"xsede",
+                Arrays.asList("info1.dyn.teragrid.org,info2.dyn.teragrid.org".split(",")));
+        try {
+            (new Thread(){
+                public void run(){
+                    amqpMonitor.run();
+                }
+            }).start();
+        } catch (Exception e) {
+           logger.error(e.getMessage(), e);
+        }
+        computeResourceDescription = new ComputeResourceDescription("TestComputerResoruceId", "TestHostName");
+        computeResourceDescription.setHostName("stampede-host");
+        computeResourceDescription.addToIpAddresses("login1.stampede.tacc.utexas.edu");
+        ResourceJobManager resourceJobManager = new ResourceJobManager("1234", ResourceJobManagerType.SLURM);
+        Map<JobManagerCommand, String> commandMap = new HashMap<JobManagerCommand, String>();
+        commandMap.put(JobManagerCommand.SUBMISSION, "test");
+        resourceJobManager.setJobManagerCommands(commandMap);
+        resourceJobManager.setJobManagerBinPath("/usr/bin/");
+        resourceJobManager.setPushMonitoringEndpoint("push"); // TODO - add monitor mode
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission("TestSSHJobSubmissionInterfaceId", SecurityProtocol.GSI,
+                resourceJobManager);
+
+        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+        String jobSubmissionID = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
+
+        JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface(jobSubmissionID, JobSubmissionProtocol.SSH, 1);
+
+        computeResourceDescription.addToJobSubmissionInterfaces(jobSubmissionInterface);
+        computeResourceDescription.addToDataMovementInterfaces(new DataMovementInterface("4532", DataMovementProtocol.SCP, 1));
+
+    }
+
+    @Test
+    public void testAMQPMonitor() throws SSHApiException {
+        /* now have to submit a job to some machine and add that job to the queue */
+        //Create authentication
+        GSIAuthenticationInfo authenticationInfo
+                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+                7512, 17280000, certificateLocation);
+
+        // Server info
+        ServerInfo serverInfo = new ServerInfo("ogce", "login1.stampede.tacc.utexas.edu",2222);
+
+
+        Cluster pbsCluster = new
+                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gsi.ssh.util.CommonUtils.getPBSJobManager("/usr/bin/"));
+
+
+        // Execute command
+        System.out.println("Target PBS file path: " + workingDirectory);
+        // constructing the job object
+        String jobName = "GSI_SSH_SLEEP_JOB";
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName(jobName);
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("normal");
+        jobDescriptor.setMaxWallTime("60");
+        jobDescriptor.setAcountString("TG-STA110014S");
+        List<String> inputs = new ArrayList<String>();
+        jobDescriptor.setOwner("ogce");
+        inputs.add("Hello World");
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+        System.out.println(jobID);
+        try {
+            pushQueue.add(new MonitorID(computeResourceDescription, jobID,null,null,null, "ogce", jobName));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        try {
+            pushThread.join();
+        } catch (InterruptedException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        class InnerClassAMQP{
+            @Subscribe
+            private void getStatus(JobStatusChangeEvent status){
+                Assert.assertNotNull(status);
+                pushThread.interrupt();
+            }
+        }
+        monitorPublisher.registerListener(new InnerClassAMQP());
+//        try {
+//            pushThread.join(5000);
+//            Iterator<MonitorID> iterator = pushQueue.iterator();
+//            MonitorID next = iterator.next();
+//            org.junit.Assert.assertNotNull(next.getStatus());
+//        } catch (Exception e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
new file mode 100644
index 0000000..610934e
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
@@ -0,0 +1,172 @@
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.job;
+//
+//import java.io.File;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.concurrent.BlockingQueue;
+//import java.util.concurrent.LinkedBlockingQueue;
+//
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.gfac.core.monitor.MonitorID;
+//import org.apache.airavata.gfac.monitor.HPCMonitorID;
+//import org.apache.airavata.gfac.monitor.UserMonitorData;
+//import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
+//import org.apache.airavata.gsi.ssh.api.Cluster;
+//import org.apache.airavata.gsi.ssh.api.SSHApiException;
+//import org.apache.airavata.gsi.ssh.api.ServerInfo;
+//import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+//import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.util.CommonUtils;
+//import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
+//import org.junit.Assert;
+//import org.testng.annotations.Test;
+//
+//import com.google.common.eventbus.EventBus;
+//import com.google.common.eventbus.Subscribe;
+//
+//public class QstatMonitorTestWithMyProxyAuth {
+//    private String myProxyUserName;
+//    private String myProxyPassword;
+//    private String certificateLocation;
+//    private String pbsFilePath;
+//    private String workingDirectory;
+//    private HostDescription hostDescription;
+//    private MonitorPublisher monitorPublisher;
+//    private BlockingQueue<UserMonitorData> pullQueue;
+//    private Thread monitorThread;
+//
+//    @org.testng.annotations.BeforeClass
+//    public void setUp() throws Exception {
+////        System.setProperty("myproxy.username", "ogce");
+////        System.setProperty("myproxy.password", "");
+////        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+////        System.setProperty("gsi.working.directory", "/home/ogce");
+////        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+//        myProxyUserName = System.getProperty("myproxy.username");
+//        myProxyPassword = System.getProperty("myproxy.password");
+//        workingDirectory = System.getProperty("gsi.working.directory");
+//        certificateLocation = System.getProperty("trusted.cert.location");
+//        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
+//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+//            throw new Exception("Need my proxy user name password to run tests.");
+//        }
+//
+//        monitorPublisher =  new MonitorPublisher(new EventBus());
+//        class InnerClassQstat {
+//
+//            @Subscribe
+//            private void getStatus(JobStatusChangeEvent status) {
+//                Assert.assertNotNull(status);
+//                System.out.println(status.getState().toString());
+//                monitorThread.interrupt();
+//            }
+//        }
+//        monitorPublisher.registerListener(this);
+//        pullQueue = new LinkedBlockingQueue<UserMonitorData>();
+//        final HPCPullMonitor qstatMonitor = new
+//                HPCPullMonitor(pullQueue, monitorPublisher);
+//        try {
+//            (new Thread(){
+//                public void run(){
+//                    qstatMonitor.run();
+//                }
+//            }).start();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//        hostDescription = new HostDescription(GsisshHostType.type);
+//        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
+//        hostDescription.getType().setHostName("gsissh-gordon");
+//        ((GsisshHostType) hostDescription.getType()).setPort(22);
+//        ((GsisshHostType)hostDescription.getType()).setInstalledPath("/opt/torque/bin/");
+//    }
+//
+//    @Test
+//    public void testQstatMonitor() throws SSHApiException {
+//        /* now have to submit a job to some machine and add that job to the queue */
+//        //Create authentication
+//        GSIAuthenticationInfo authenticationInfo
+//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+//                7512, 17280000, certificateLocation);
+//
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
+//
+//
+//        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
+//
+//
+//        // Execute command
+//        System.out.println("Target PBS file path: " + workingDirectory);
+//        // constructing the job object
+//        JobDescriptor jobDescriptor = new JobDescriptor();
+//        jobDescriptor.setWorkingDirectory(workingDirectory);
+//        jobDescriptor.setShellName("/bin/bash");
+//        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+//        jobDescriptor.setExecutablePath("/bin/echo");
+//        jobDescriptor.setAllEnvExport(true);
+//        jobDescriptor.setMailOptions("n");
+//        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+//        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+//        jobDescriptor.setNodes(1);
+//        jobDescriptor.setProcessesPerNode(1);
+//        jobDescriptor.setQueueName("normal");
+//        jobDescriptor.setMaxWallTime("60");
+//        jobDescriptor.setAcountString("sds128");
+//        List<String> inputs = new ArrayList<String>();
+//        jobDescriptor.setOwner("ogce");
+//        inputs.add("Hello World");
+//        jobDescriptor.setInputValues(inputs);
+//        //finished construction of job object
+//        System.out.println(jobDescriptor.toXML());
+//        for (int i = 0; i < 1; i++) {
+//            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+//            System.out.println("Job submitted successfully, Job ID: " +  jobID);
+//            MonitorID monitorID = new HPCMonitorID(hostDescription, jobID,null,null,null, "ogce","");
+//            ((HPCMonitorID)monitorID).setAuthenticationInfo(authenticationInfo);
+//            try {
+//                org.apache.airavata.gfac.monitor.util.CommonUtils.addMonitortoQueue(pullQueue, monitorID, jobExecutionContext);
+//            } catch (Exception e) {
+//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//            }
+//        }
+//        try {
+//
+//            monitorThread.join();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    @Subscribe
+//    public void testCaseShutDown(JobStatusChangeEvent status) {
+//        Assert.assertNotNull(status.getState());
+//        monitorThread.stop();
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
new file mode 100644
index 0000000..e749e9c
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
@@ -0,0 +1,73 @@
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+	the Apache License, Version 2.0 (theƏ "License"); you may not use this file except in compliance with the License. You may
+	obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+	in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+	ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+	the License. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+<xsl:output method="text" />
+<xsl:template match="/ns:JobDescriptor">
+#! /bin/sh
+# PBS batch job script built by Globus job manager
+#   <xsl:choose>
+    <xsl:when test="ns:shellName">
+##PBS -S <xsl:value-of select="ns:shellName"/>
+    </xsl:when></xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:queueName">
+#PBS -q <xsl:value-of select="ns:queueName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:mailOptions">
+#PBS -m <xsl:value-of select="ns:mailOptions"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+<xsl:when test="ns:acountString">
+#PBS -A <xsl:value-of select="ns:acountString"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:maxWallTime">
+#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -o <xsl:value-of select="ns:standardOutFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
+#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
+<xsl:text>&#xa;</xsl:text>
+    </xsl:when>
+    </xsl:choose>
+<xsl:for-each select="ns:exports/ns:name">
+<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
+export<xsl:text>   </xsl:text><xsl:value-of select="."/>
+<xsl:text>&#xa;</xsl:text>
+</xsl:for-each>
+<xsl:for-each select="ns:preJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
+<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+<xsl:for-each select="ns:inputs/ns:input">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+<xsl:for-each select="ns:postJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+</xsl:for-each>
+
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
new file mode 100644
index 0000000..c6b849b
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
@@ -0,0 +1,22 @@
+::
+::
+:: Licensed to the Apache Software Foundation (ASF) under one
+:: or more contributor license agreements.  See the NOTICE file
+:: distributed with this work for additional information
+:: regarding copyright ownership.  The ASF licenses this file
+:: to you under the Apache License, Version 2.0 (the
+:: "License"); you may not use this file except in compliance
+:: with the License.  You may obtain a copy of the License at
+::
+::   http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing,
+:: software distributed under the License is distributed on an
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+:: KIND, either express or implied.  See the License for the
+:: specific language governing permissions and limitations
+:: under the License.
+::
+::
+@echo off
+echo %1^=%2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
new file mode 100644
index 0000000..0584d38
--- /dev/null
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+#default/fallback log4j configuration
+#
+
+# Set root logger level to WARN and its only appender to A1.
+log4j.rootLogger=INFO, A1, A2
+
+# A1 is set to be a rolling file appender with default params
+log4j.appender.A1=org.apache.log4j.RollingFileAppender
+log4j.appender.A1.File=target/seclogs.txt
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
+
+# A2 is a console appender
+log4j.appender.A2=org.apache.log4j.ConsoleAppender
+
+# A2 uses PatternLayout.
+log4j.appender.A2.layout=org.apache.log4j.PatternLayout
+log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
+
+log4j.logger.unicore.security=INFO
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/pom.xml b/modules/gfac/gfac-monitor/pom.xml
index c4a6e2f..66c5875 100644
--- a/modules/gfac/gfac-monitor/pom.xml
+++ b/modules/gfac/gfac-monitor/pom.xml
@@ -17,157 +17,13 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-hpc-monitor</artifactId>
-    <name>Airavata GFac Grid Job Monitor</name>
-    <description>The Grid related monitoring implementation</description>
+    <artifactId>airavata-gfac-monitor</artifactId>
+    <packaging>pom</packaging>
+    <name>Airavata GFac Monitor</name>
     <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <!-- Logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- GFAC schemas -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-ssh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-execution-context</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-cpi</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Workflow Tracking -->
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-workflow-tracking</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
-        <!-- Credential Store -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	    <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- Guava -->
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-            <version>12.0</version>
-        </dependency>
-        <!-- gsi-ssh api dependencies -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.jcraft</groupId>
-            <artifactId>jsch</artifactId>
-            <version>0.1.50</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <!-- this is the dependency for amqp implementation -->
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>2.0.0</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skip>false</skip>
-                    <forkMode>always</forkMode>
-                    <failIfNoTests>false</failIfNoTests>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.jsonschema2pojo</groupId>
-                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
-                <version>0.4.0</version>
-                <configuration>
-                    <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
-                    <targetPackage>org.apache.airavata</targetPackage>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
+    <modules>
+        <module>gfac-hpc-monitor</module>
+        <module>gfac-email-monitor</module>
+    </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6ffc3ee7/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
deleted file mode 100644
index ae463a7..0000000
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.airavata.gfac.monitor;/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Timestamp;
-import java.util.Date;
-
-public class HPCMonitorID extends MonitorID {
-    private final static Logger logger = LoggerFactory.getLogger(HPCMonitorID.class);
-
-
-    private AuthenticationInfo authenticationInfo = null;
-
-    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID,
-                        String experimentID, String userName,String jobName) {
-        super(computeResourceDescription, jobID, taskID, workflowNodeID, experimentID, userName,jobName);
-        setComputeResourceDescription(computeResourceDescription);
-        setJobStartedTime(new Timestamp((new Date()).getTime()));
-        setUserName(userName);
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
-        setWorkflowNodeID(workflowNodeID);
-    }
-
-    public HPCMonitorID(AuthenticationInfo authenticationInfo, JobExecutionContext jobExecutionContext) {
-        super(jobExecutionContext);
-        this.authenticationInfo = authenticationInfo;
-        if (this.authenticationInfo != null) {
-            try {
-                String hostAddress = jobExecutionContext.getHostName();
-                SecurityContext securityContext = jobExecutionContext.getSecurityContext(hostAddress);
-                ServerInfo serverInfo = null;
-                if (securityContext != null) {
-                    if (securityContext instanceof  GSISecurityContext){
-                        serverInfo = (((GSISecurityContext) securityContext).getPbsCluster()).getServerInfo();
-                        if (serverInfo.getUserName() != null) {
-                            setUserName(serverInfo.getUserName());
-                        }
-                    }
-                    if (securityContext instanceof SSHSecurityContext){
-                        serverInfo = (((SSHSecurityContext) securityContext).getPbsCluster()).getServerInfo();
-                        if (serverInfo.getUserName() != null) {
-                            setUserName(serverInfo.getUserName());
-                        }
-                    }
-                }
-            } catch (GFacException e) {
-                logger.error("Error while getting security context", e);
-            }
-        }
-    }
-
-    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID, String experimentID, String userName, AuthenticationInfo authenticationInfo) {
-        setComputeResourceDescription(computeResourceDescription);
-        setJobStartedTime(new Timestamp((new Date()).getTime()));
-        this.authenticationInfo = authenticationInfo;
-        // if we give myproxyauthenticationInfo, so we try to use myproxy user as the user
-        if (this.authenticationInfo != null) {
-            if (this.authenticationInfo instanceof MyProxyAuthenticationInfo) {
-                setUserName(((MyProxyAuthenticationInfo) this.authenticationInfo).getUserName());
-            }
-        }
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
-        setWorkflowNodeID(workflowNodeID);
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-}