();
meta.put("project_id", udr.getGroupby().get("project_id"));
meta.put("resource_id", udr.getGroupby().get("resource_id"));
- meta.put("type", meter.getType());
return meta;
}
+ private Double getCumulativeUsage(OpenStackUsageData usageData){
+ HibernateClient hibernateClient = HibernateClient.getInstance();
+ CumulativeMeterUsage usage = (CumulativeMeterUsage) hibernateClient.getObject(CumulativeMeterUsage.class, 1l);
+
+ Double last;
+ if (usage == null) {
+ last = 0.0;
+ } else {
+ last = usageData.getAvg() - usage.getUsageCounter();
+ }
+
+ return last;
+ }
+
public String get_class() {
return _class;
}
@@ -136,4 +154,20 @@ public String getAccount() {
public void setAccount(String account) {
this.account = account;
}
+
+ public String getChartType() {
+ return chartType;
+ }
+
+ public void setChartType(String chartType) {
+ this.chartType = chartType;
+ }
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpu.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpu.java
new file mode 100644
index 0000000..099da47
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpu.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerCpu extends AbstractOpenStackCeilometerUsage{
+
+ public OpenStackCeilometerCpu(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerCpu(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuDelta.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuDelta.java
new file mode 100644
index 0000000..55ec183
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuDelta.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerCpuDelta extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerCpuDelta(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerCpuDelta(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuUtil.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuUtil.java
new file mode 100644
index 0000000..1920341
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerCpuUtil.java
@@ -0,0 +1,39 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerCpuUtil extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerCpuUtil(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerCpuUtil(udr, meter);
+ }
+
+
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskAllocation.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskAllocation.java
new file mode 100644
index 0000000..510841a
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskAllocation.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskAllocation extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskAllocation(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskAllocation(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskCapacity.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskCapacity.java
new file mode 100644
index 0000000..df3fdaa
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskCapacity.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskCapacity extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskCapacity(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskCapacity(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceAllocation.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceAllocation.java
new file mode 100644
index 0000000..ba5a6f4
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceAllocation.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceAllocation extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceAllocation(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceAllocation(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceCapacity.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceCapacity.java
new file mode 100644
index 0000000..fc01d7d
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceCapacity.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceCapacity extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceCapacity(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceCapacity(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytes.java
new file mode 100644
index 0000000..66c6b92
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceReadBytes extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceReadBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceReadBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytesRate.java
new file mode 100644
index 0000000..649cc69
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceReadBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceReadBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceReadBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequests.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequests.java
new file mode 100644
index 0000000..8067dac
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequests.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceReadRequests extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceReadRequests(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceReadRequests(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequestsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequestsRate.java
new file mode 100644
index 0000000..3fca4ef
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceReadRequestsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceReadRequestsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceReadRequestsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceReadRequestsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceUsage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceUsage.java
new file mode 100644
index 0000000..83c66fb
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceUsage.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceUsage extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceUsage(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceUsage(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytes.java
new file mode 100644
index 0000000..a725565
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceWriteBytes extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceWriteBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceWriteBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytesRate.java
new file mode 100644
index 0000000..63886eb
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceWriteBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceWriteBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceWriteBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequests.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequests.java
new file mode 100644
index 0000000..3dd14a2
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequests.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceWriteRequests extends AbstractOpenStackCeilometerUsage{
+
+ public OpenStackCeilometerDiskDeviceWriteRequests(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceWriteRequests(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequestsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequestsRate.java
new file mode 100644
index 0000000..c9ff561
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskDeviceWriteRequestsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskDeviceWriteRequestsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskDeviceWriteRequestsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskDeviceWriteRequestsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytes.java
new file mode 100644
index 0000000..382eb39
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskReadBytes extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskReadBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskReadBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytesRate.java
new file mode 100644
index 0000000..3bc17fe
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskReadBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskReadBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskReadBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequests.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequests.java
new file mode 100644
index 0000000..3401447
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequests.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskReadRequests extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskReadRequests(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskReadRequests(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequestsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequestsRate.java
new file mode 100644
index 0000000..9733ac1
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskReadRequestsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskReadRequestsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskReadRequestsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskReadRequestsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskUsage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskUsage.java
new file mode 100644
index 0000000..363b0a8
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskUsage.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskUsage extends AbstractOpenStackCeilometerUsage{
+
+ public OpenStackCeilometerDiskUsage(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskUsage(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytes.java
new file mode 100644
index 0000000..0de3816
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskWriteBytes extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskWriteBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskWriteBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytesRate.java
new file mode 100644
index 0000000..13a0774
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskWriteBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskWriteBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskWriteBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequests.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequests.java
new file mode 100644
index 0000000..ca5e608
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequests.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskWriteRequests extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskWriteRequests(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskWriteRequests(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequestsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequestsRate.java
new file mode 100644
index 0000000..621027d
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerDiskWriteRequestsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerDiskWriteRequestsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerDiskWriteRequestsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerDiskWriteRequestsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImage.java
new file mode 100644
index 0000000..a7773c4
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImage.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerImage extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerImage(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerImage(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageDownload.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageDownload.java
new file mode 100644
index 0000000..2a8e95d
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageDownload.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerImageDownload extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerImageDownload(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerImageDownload(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageServe.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageServe.java
new file mode 100644
index 0000000..2164ad4
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageServe.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerImageServe extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerImageServe(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerImageServe(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageSize.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageSize.java
new file mode 100644
index 0000000..048653a
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerImageSize.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerImageSize extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerImageSize(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerImageSize(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerInstance.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerInstance.java
new file mode 100644
index 0000000..f2dc524
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerInstance.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerInstance extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerInstance(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerInstance(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerIpFloating.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerIpFloating.java
new file mode 100644
index 0000000..40c194a
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerIpFloating.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerIpFloating extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerIpFloating(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerIpFloating(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryResident.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryResident.java
new file mode 100644
index 0000000..f323b83
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryResident.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerMemoryResident extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerMemoryResident(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerMemoryResident(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryUsage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryUsage.java
new file mode 100644
index 0000000..13f9e2d
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerMemoryUsage.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerMemoryUsage extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerMemoryUsage(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerMemoryUsage(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytes.java
new file mode 100644
index 0000000..f4bc0b2
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkIncomingBytes extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkIncomingBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkIncomingBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytesRate.java
new file mode 100644
index 0000000..f5090c7
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkIncomingBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkIncomingBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkIncomingBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPackets.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPackets.java
new file mode 100644
index 0000000..7261e34
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPackets.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkIncomingPackets extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkIncomingPackets(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkIncomingPackets(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPacketsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPacketsRate.java
new file mode 100644
index 0000000..2f39d42
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkIncomingPacketsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkIncomingPacketsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkIncomingPacketsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkIncomingPacketsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytes.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytes.java
new file mode 100644
index 0000000..21d96fd
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytes.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkOutgoingBytes extends AbstractOpenStackCeilometerUsage{
+
+ public OpenStackCeilometerNetworkOutgoingBytes(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkOutgoingBytes(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytesRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytesRate.java
new file mode 100644
index 0000000..ef51c70
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingBytesRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkOutgoingBytesRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkOutgoingBytesRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkOutgoingBytesRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPackets.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPackets.java
new file mode 100644
index 0000000..4c7fefc
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPackets.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkOutgoingPackets extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkOutgoingPackets(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.NUMBER_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkOutgoingPackets(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPacketsRate.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPacketsRate.java
new file mode 100644
index 0000000..63905d8
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerNetworkOutgoingPacketsRate.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerNetworkOutgoingPacketsRate extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerNetworkOutgoingPacketsRate(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerNetworkOutgoingPacketsRate(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjects.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjects.java
new file mode 100644
index 0000000..ac6e320
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjects.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerStorageObjects extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerStorageObjects(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerStorageObjects(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsContainers.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsContainers.java
new file mode 100644
index 0000000..74fdb22
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsContainers.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerStorageObjectsContainers extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerStorageObjectsContainers(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerStorageObjectsContainers(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsSize.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsSize.java
new file mode 100644
index 0000000..77c3ffd
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/model/ceilometerMeasurements/OpenStackCeilometerStorageObjectsSize.java
@@ -0,0 +1,37 @@
+package ch.icclab.cyclops.model.ceilometerMeasurements;
+
+import ch.icclab.cyclops.model.OpenStackMeter;
+import ch.icclab.cyclops.model.OpenStackUsageData;
+import ch.icclab.cyclops.util.Constant;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+public class OpenStackCeilometerStorageObjectsSize extends AbstractOpenStackCeilometerUsage {
+
+ public OpenStackCeilometerStorageObjectsSize(OpenStackUsageData udr, OpenStackMeter meter) {
+ super(udr, meter);
+ this.setChartType(Constant.GAUGE_GRAPH);
+ }
+
+ @Override
+ public AbstractOpenStackCeilometerUsage loadApplication(OpenStackUsageData udr, OpenStackMeter meter) {
+ return new OpenStackCeilometerStorageObjectsSize(udr, meter);
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/CumulativeMeterUsage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/CumulativeMeterUsage.java
new file mode 100644
index 0000000..6de23ee
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/CumulativeMeterUsage.java
@@ -0,0 +1,72 @@
+package ch.icclab.cyclops.persistence;
+
+import ch.icclab.cyclops.model.ceilometerMeasurements.AbstractOpenStackCeilometerUsage;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 30/05/16.
+ */
+
+@Entity
+public class CumulativeMeterUsage {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Long id;
+
+ private Double usageCounter;
+
+ private String usageKey;
+
+ public CumulativeMeterUsage() {
+ }
+
+ public CumulativeMeterUsage(AbstractOpenStackCeilometerUsage openStackUsage, String usageKey) {
+ this.usageCounter = openStackUsage.getUsage();
+ this.usageKey = usageKey;
+ }
+
+ public Double getUsageCounter() {
+ return usageCounter;
+ }
+
+ public void setUsageCounter(Double usageCounter) {
+ this.usageCounter = usageCounter;
+ }
+
+ public String getUsageKey() {
+ return usageKey;
+ }
+
+ public void setUsageKey(String usageKey) {
+ this.usageKey = usageKey;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/HibernateConfiguration.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/HibernateConfiguration.java
index ce0c8eb..59e536a 100644
--- a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/HibernateConfiguration.java
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/persistence/HibernateConfiguration.java
@@ -30,6 +30,7 @@ public static Configuration createConfiguration(HibernateCredentials credentials
// add mandatory hibernate classes
conf.addAnnotatedClass(LatestPullORM.class);
+ conf.addAnnotatedClass(CumulativeMeterUsage.class);
// now set properties
conf.setProperty("hibernate.connection.driver_class", credentials.getHibernateDriver())
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/CachedCumulativeUsage.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/CachedCumulativeUsage.java
new file mode 100644
index 0000000..8b180c3
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/CachedCumulativeUsage.java
@@ -0,0 +1,36 @@
+package ch.icclab.cyclops.util;
+
+import ch.icclab.cyclops.persistence.CumulativeMeterUsage;
+
+import java.util.HashMap;
+
+/**
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ * Created by Manu Perez on 07/09/16.
+ */
+
+public class CachedCumulativeUsage {
+ public static HashMap cachedCumulativeUsage = new HashMap<>();
+
+ public static HashMap getCachedCumulativeUsage() {
+ return cachedCumulativeUsage;
+ }
+
+ public static void setCachedCumulativeUsage(HashMap cachedCumulativeUsage) {
+ CachedCumulativeUsage.cachedCumulativeUsage = cachedCumulativeUsage;
+ }
+}
diff --git a/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/Constant.java b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/Constant.java
new file mode 100644
index 0000000..d35c3f4
--- /dev/null
+++ b/collectors/openstack-ceilometer/src/main/java/ch/icclab/cyclops/util/Constant.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2015. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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 ch.icclab.cyclops.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Constant {
+
+ // Ceilometer field name
+ public static final String CEILOMETER_METER_NAME = "name";
+
+ // Graph type constants
+ public static final String GAUGE_GRAPH = "gauge";
+ public static final String HISTOGRAM_GRAPH = "histogram";
+ public static final String NUMBER_GRAPH = "number";
+
+ // Ceilometer Meter names mapping map
+ public static final Map METER_NAMES = initializeMeternameMap();
+ public static final String modelPath = "ch.icclab.cyclops.model.ceilometerMeasurements.";
+ public static final String CEILOMETER_CUMULATIVE_METER = "cumulative";
+
+ // Initialization of the metername map
+ private static Map initializeMeternameMap() {
+ HashMap map = new HashMap<>();
+ map.put("cpu", modelPath + "Cpu");
+ map.put("cpu.delta", modelPath + "CpuDelta");
+ map.put("cpu_util", modelPath + "CpuUtil");
+ map.put("disk.allocation", modelPath + "DiskAllocation");
+ map.put("disk.capacity", modelPath + "DiskCapacity");
+ map.put("disk.device.allocation", modelPath + "DiskDeviceAllocation");
+ map.put("disk.device.capacity", modelPath + "DiskDeviceCapacity");
+ map.put("disk.device.read.bytes", modelPath + "DiskDeviceReadBytes");
+ map.put("disk.device.read.bytes.rate", modelPath + "DiskDeviceReadBytesRate");
+ map.put("disk.device.read.requests", modelPath + "DiskDeviceReadRequest");
+ map.put("disk.device.read.requests.rate", modelPath + "DiskDeviceReadRequestRate");
+ map.put("disk.device.usage", modelPath + "DiskDeviceUsage");
+ map.put("disk.device.write.bytes", modelPath + "DiskDeviceWriteBytes");
+ map.put("disk.device.write.bytes.rate", modelPath + "DiskDeviceWriteBytesRate");
+ map.put("disk.device.write.requests", modelPath + "DiskDeviceWriteRequests");
+ map.put("disk.device.write.requests.rate", modelPath + "DiskDeviceWriteRequestsRate");
+ map.put("disk.read.bytes", modelPath + "DiskReadBytes");
+ map.put("disk.read.bytes.rate", modelPath + "DiskReadBytesRate");
+ map.put("disk.read.requests", modelPath + "DiskReadRequests");
+ map.put("disk.read.requests.rate", modelPath + "DiskReadRequestsRate");
+ map.put("disk.usage", modelPath + "DiskUsage");
+ map.put("disk.write.bytes", modelPath + "DiskWriteBytes");
+ map.put("disk.write.bytes.rate", modelPath + "DiskWriteBytesRate");
+ map.put("disk.write.requests", modelPath + "DiskWriteRequests");
+ map.put("disk.write.requests.rate", modelPath + "DiskWriteRequestsRate");
+ map.put("image", modelPath + "Image");
+ map.put("image.download", modelPath + "ImageDownload");
+ map.put("image.serve", modelPath + "ImageServe");
+ map.put("image.size", modelPath + "ImageSize");
+ map.put("instance", modelPath + "Instance");
+ map.put("ip.floating", modelPath + "IpFloating");
+ map.put("memory.resident", modelPath + "MemoryResident");
+ map.put("memory.usage", modelPath + "MemoryUsage");
+ map.put("network.incoming.bytes", modelPath + "NetworkIncomingBytes");
+ map.put("network.incoming.bytes.rate", modelPath + "NetworkIncomingBytesRate");
+ map.put("network.incoming.packets", modelPath + "NetworkIncomingPackets");
+ map.put("network.incoming.packets.rate", modelPath + "NetworkIncomingPacketsRate");
+ map.put("network.outgoing.bytes", modelPath + "NetworkOutgoingBytes");
+ map.put("network.outgoing.bytes.rate", modelPath + "NetworkOutgoingBytesRate");
+ map.put("network.outgoing.packets", modelPath + "NetworkOutgoingPackets");
+ map.put("network.outgoing.packets.rate", modelPath + "NetworkOutgoingPacketsRate");
+ map.put("storage.objects", modelPath + "StorageObjects");
+ map.put("storage.objects.containers", modelPath + "StorageObjectsContainers");
+ map.put("storage.objects.size", modelPath + "StorageObjectsSize");
+ return map;
+ }
+
+}
diff --git a/collectors/openstack-events/bin/openstack_event.jar b/collectors/openstack-events/bin/openstack_event.jar
index c8e5425..c19a2f7 100644
Binary files a/collectors/openstack-events/bin/openstack_event.jar and b/collectors/openstack-events/bin/openstack_event.jar differ
diff --git a/collectors/openstack-events/config/openstack_event.conf b/collectors/openstack-events/config/openstack_event.conf
index f91ae4a..4fa0330 100644
--- a/collectors/openstack-events/config/openstack_event.conf
+++ b/collectors/openstack-events/config/openstack_event.conf
@@ -36,16 +36,14 @@ ConsumerVirtualHost=/
ConsumerDataQueue=cyclops.openstack.event.data
# Some OpenStack settings
-OpenstackCollectorEventStart=powering-on
-OpenstackCollectorEventSpawn=spawning
-OpenstackCollectorEventUnpause=unpausing
-OpenstackCollectorEventResume=resuming
-OpenstackCollectorEventStop=[powering-off]
-OpenstackCollectorEventPause=pausing
+OpenstackCollectorEventRun=running
+OpenstackCollectorEventStop=poweredOff
+OpenstackCollectorEventPause=paused
OpenstackCollectorEventDelete=deleted
OpenstackCollectorEventResize=resize_finish
-OpenstackCollectorEventSuspend=suspending
+OpenstackCollectorEventSuspend=suspended
-OpenstackCollectorEventTable=events
+OpenstackCollectorEventNovaTable=novaEvents
+OpenstackCollectorEventNeutronTable=neutronEvents
OpenstackCollectorScheduleTime=30000
diff --git a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/application/Main.java b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/application/Main.java
index f20bf94..58fb008 100644
--- a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/application/Main.java
+++ b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/application/Main.java
@@ -24,10 +24,11 @@
import ch.icclab.cyclops.persistence.HibernateClient;
import ch.icclab.cyclops.persistence.HibernateConfiguration;
import ch.icclab.cyclops.schedule.Scheduler;
-import ch.icclab.cyclops.schedule.runner.OpenStackClient;
import ch.icclab.cyclops.load.Settings;
import ch.icclab.cyclops.load.model.PublisherCredentials;
import ch.icclab.cyclops.publish.RabbitMQPublisher;
+import ch.icclab.cyclops.schedule.runner.openstack.NeutronUDRRunner;
+import ch.icclab.cyclops.schedule.runner.openstack.NovaUDRRunner;
import ch.icclab.cyclops.timeseries.InfluxDBClient;
import ch.icclab.cyclops.util.ShutDownListener;
import org.apache.logging.log4j.LogManager;
@@ -252,7 +253,8 @@ private static void checkAndStartServer(Component component) {
// also start collection immediately
Long time = new Long(Loader.getSettings().getOpenstackSettings().getOpenstackScheduleTime());
Scheduler scheduler = Scheduler.getInstance();
- scheduler.addRunner(new OpenStackClient(), 0, time, TimeUnit.MILLISECONDS);
+ scheduler.addRunner(new NovaUDRRunner(), 0, time, TimeUnit.MILLISECONDS);
+ scheduler.addRunner(new NeutronUDRRunner(), 0, time, TimeUnit.MILLISECONDS);
scheduler.start();
// and finally start the server
diff --git a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/DataConsumer.java b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/DataConsumer.java
index c961299..c9c1947 100644
--- a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/DataConsumer.java
+++ b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/DataConsumer.java
@@ -18,14 +18,18 @@
package ch.icclab.cyclops.consume.data;
import ch.icclab.cyclops.consume.AbstractConsumer;
-import ch.icclab.cyclops.consume.data.mapping.OpenstackEvent;
-import ch.icclab.cyclops.consume.data.mapping.OsloEvent;
-import ch.icclab.cyclops.consume.data.mapping.OsloEvent.OsloMessage.Args;
-import ch.icclab.cyclops.consume.data.mapping.OsloEvent.OsloMessage.Args.ObjInst.Nova_objectData;
+import ch.icclab.cyclops.consume.data.mapping.messages.NeutronEvent;
+import ch.icclab.cyclops.consume.data.mapping.messages.OsloEvent;
+import ch.icclab.cyclops.consume.data.mapping.messages.OsloEvent.OsloMessage.Args;
+import ch.icclab.cyclops.consume.data.mapping.messages.OsloEvent.OsloMessage.Args.ObjInst.Nova_objectData;
+import ch.icclab.cyclops.consume.data.mapping.openstack.OpenstackEvent;
+import ch.icclab.cyclops.consume.data.mapping.openstack.events.OpenstackNeutronEvent;
+import ch.icclab.cyclops.consume.data.mapping.openstack.events.OpenstackNovaEvent;
import ch.icclab.cyclops.load.Loader;
import ch.icclab.cyclops.load.model.OpenstackSettings;
import ch.icclab.cyclops.timeseries.InfluxDBClient;
import com.google.gson.Gson;
+
import java.util.Arrays;
import java.util.List;
@@ -42,30 +46,30 @@ public class DataConsumer extends AbstractConsumer {
@Override
protected void consume(String content) {
+ OpenstackEvent data =null;
try {
- OpenstackEvent data = manageMessage(content);
-
- if (data.isValid()){
- influxDBClient.persistSinglePoint(data.getPoint());
- }
+ data = manageNovaMessage(content);
} catch (Exception ignored) {
-
}
+ try{
+ data = manageNeuntronMessage(content);
+ }catch (Exception ignored) {
+ }
+
+ if (data != null) influxDBClient.persistSinglePoint(data.getPoint());
}
- private OpenstackEvent manageMessage(String content) {
+ private OpenstackNovaEvent manageNovaMessage(String content) {
Gson mapper = new Gson();
//list of nova methods related to nova InstanceUpTime
List listOfActions = Arrays.asList( settings.getOpenstackCollectorEventDelete(),
- settings.getOpenstackCollectorEventResize(), settings.getOpenstackCollectorEventSpawn(),
- settings.getOpenstackCollectorEventStart(), settings.getOpenstackCollectorEventStop(),
- settings.getOpenstackCollectorEventSuspend(), settings.getOpenstackCollectorEventResume(),
- settings.getOpenstackCollectorEventUnpause(), settings.getOpenstackCollectorEventPause());
+ settings.getOpenstackCollectorEventResize(), settings.getOpenstackCollectorEventStop(),
+ settings.getOpenstackCollectorEventSuspend(), settings.getOpenstackCollectorEventPause(),
+ settings.getOpenstackCollectorEventRun());
OsloEvent osloEvent = mapper.fromJson(content, OsloEvent.class);
Args args = osloEvent.getOsloMessage().getArgs();
String method = "";
try{
- //
method = args.getKwargs().getExpected_task_state().toString();
} catch (Exception ignored){
}
@@ -74,15 +78,59 @@ private OpenstackEvent manageMessage(String content) {
method = settings.getOpenstackCollectorEventDelete();
}
}
+ String type = getType(method);
String time = osloEvent.getOsloMessage().get_context_timestamp();
- if(listOfActions.contains(method)) {
+ if(listOfActions.contains(type)) {
Nova_objectData novaData = args.getObjinst().getNova_objectData();
String instanceId = novaData.getUuid();
- String userName = osloEvent.getOsloMessage().get_context_user_name();
+ String account = osloEvent.getOsloMessage().get_context_project_name();
Double memory = novaData.getMemory_mb();
Double vcpus = novaData.getVcpus();
- return new OpenstackEvent(userName,instanceId, method, memory, vcpus, time);
+ return new OpenstackNovaEvent(account,instanceId, type, memory, vcpus, time);
+ }
+ return null;
+ }
+
+ private OpenstackNeutronEvent manageNeuntronMessage(String content) {
+ Gson mapper = new Gson();
+ List listOfActions = Arrays.asList( settings.getOpenstackCollectorEventDelete(), settings.getOpenstackCollectorEventRun());
+ NeutronEvent neutronEvent = mapper.fromJson(content, NeutronEvent.class);
+ String id;
+ if (neutronEvent.getPayload().getFloatingip_id() != null) {
+ id = neutronEvent.getPayload().getFloatingip_id();
+ } else {
+ id = neutronEvent.getPayload().getFloatingip().getId();
+ }
+ String type = getType(neutronEvent.getEvent_type());
+ if (listOfActions.contains(type)){
+ return new OpenstackNeutronEvent(neutronEvent.get_context_tenant_name(), id, type, neutronEvent.get_context_timestamp());
}
+
return null;
}
+
+ private String getType(String method){
+ List listOfRunningActions = Arrays.asList("spawning", "powering-on", "unpausing", "resuming", "floatingip.create.end");
+ String paused = "pausing";
+ String poweredOff="[powering-off]";
+ String suspend = "suspending";
+ String deleted = "floatingip.delete.end";
+
+ if (listOfRunningActions.contains(method)){
+ return settings.getOpenstackCollectorEventRun();
+ }
+ if (method.equals(paused)){
+ return settings.getOpenstackCollectorEventPause();
+ }
+ if (method.equals(poweredOff)){
+ return settings.getOpenstackCollectorEventStop();
+ }
+ if (method.equals(suspend)){
+ return settings.getOpenstackCollectorEventSuspend();
+ }
+ if (method.equals(deleted)){
+ return settings.getOpenstackCollectorEventDelete();
+ }
+ return method;
+ }
}
diff --git a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/NeutronEvent.java b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/NeutronEvent.java
new file mode 100644
index 0000000..6556bb7
--- /dev/null
+++ b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/NeutronEvent.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2016. Zuercher Hochschule fuer Angewandte Wissenschaften
+ * All Rights Reserved.
+ *
+ * Licensed 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 ch.icclab.cyclops.consume.data.mapping.messages;
+
+/**
+ * Author: Oleksii Serhiienko
+ * Updated on: 26-Aug-16
+ * Description: This class holds the Neutron event data
+ */
+public class NeutronEvent {
+ public String getEvent_type() {
+ return event_type;
+ }
+
+ public void setEvent_type(String event_type) {
+ this.event_type = event_type;
+ }
+
+ public String get_context_timestamp() {
+ return _context_timestamp;
+ }
+
+ public void set_context_timestamp(String _context_timestamp) {
+ this._context_timestamp = _context_timestamp;
+ }
+
+ public String get_context_tenant_name() {
+ return _context_tenant_name;
+ }
+
+ public void set_context_tenant_name(String _context_tenant_name) {
+ this._context_tenant_name = _context_tenant_name;
+ }
+
+ public Payload getPayload() {
+ return payload;
+ }
+
+ public void setPayload(Payload payload) {
+ this.payload = payload;
+ }
+
+ public String event_type;
+ public String _context_timestamp;
+ public String _context_tenant_name;
+ public Payload payload;
+ public class Payload {
+ public String getFloatingip_id() {
+ return floatingip_id;
+ }
+
+ public void setFloatingip_id(String floatingip_id) {
+ this.floatingip_id = floatingip_id;
+ }
+
+ public String floatingip_id;
+
+ public FloatingIP getFloatingip() {
+ return floatingip;
+ }
+
+ public void setFloatingip(FloatingIP floatingip) {
+ this.floatingip = floatingip;
+ }
+
+ public FloatingIP floatingip;
+ public class FloatingIP {
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String id;
+ }
+ }
+}
diff --git a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OsloEvent.java b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/OsloEvent.java
similarity index 93%
rename from collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OsloEvent.java
rename to collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/OsloEvent.java
index 5df3e6e..5c4edc3 100644
--- a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OsloEvent.java
+++ b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/messages/OsloEvent.java
@@ -14,8 +14,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
-
-package ch.icclab.cyclops.consume.data.mapping;
+package ch.icclab.cyclops.consume.data.mapping.messages;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
@@ -37,11 +36,11 @@ public Args getArgs() {
}
Args args;
- String _context_user_name;
+ String _context_project_name;
String _context_timestamp;
- public String get_context_user_name() {
- return _context_user_name;
+ public String get_context_project_name() {
+ return _context_project_name;
}
public String get_context_timestamp() { return _context_timestamp; }
diff --git a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OpenstackEvent.java b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/openstack/OpenstackEvent.java
similarity index 51%
rename from collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OpenstackEvent.java
rename to collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/openstack/OpenstackEvent.java
index 6d555c6..f8d724b 100644
--- a/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/OpenstackEvent.java
+++ b/collectors/openstack-events/src/main/java/ch/icclab/cyclops/consume/data/mapping/openstack/OpenstackEvent.java
@@ -14,49 +14,33 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
-package ch.icclab.cyclops.consume.data.mapping;
+package ch.icclab.cyclops.consume.data.mapping.openstack;
-import ch.icclab.cyclops.load.Loader;
-import ch.icclab.cyclops.util.Time;
import org.influxdb.dto.Point;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import java.util.Collections;
-import java.util.HashMap;
import java.util.Map;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
/**
- * Author: Oleksii
- * Date: 01/04/2016
- * Description: This class holds the OpenstackEvent data
+ * Author: Oleksii Serhiienko
+ * Updated on: 26-Aug-16
+ * Description: This abstract class holds the OpenstackEvent data
*/
-public class OpenstackEvent {
+public abstract class OpenstackEvent {
- public OpenstackEvent(String userName,String instanceId, String action, Double memory, Double vcpus, String time){
- this.userName = userName;
- this.instanceId = instanceId;
- this.action = action;
- this.memory = memory;
- this.vcpus = vcpus;
- this.time = time;
- }
-
- private String userName;
-
- public String getUserName() {
- return userName;
+ public String getAccount() {
+ return account;
}
- public void setUserName(String userName) {
- this.userName = userName;
+ public void setAccount(String account) {
+ this.account = account;
}
- private String instanceId;
-
public String getInstanceId() {
return instanceId;
}
@@ -65,41 +49,38 @@ public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
- private String action;
-
- public String getAction() {
- return action;
+ public String getType() {
+ return type;
}
- public void setAction(String action) {
- this.action = action;
+ public void setType(String type) {
+ this.type = type;
}
- private String time;
-
- public String getTime() { return time; }
-
- public void setTime(String time) { this.time = time; }
-
- private Double memory;
-
- private Double vcpus;
-
- public void setMemory(Double memory) {this.memory = memory;}
+ public String getTime() {
+ return time;
+ }
- public void setVcpus(Double vcpus) {this.vcpus = vcpus;}
+ public void setTime(String time) {
+ this.time = time;
+ }
public boolean isValid() {
- return action != null;
+ return type != null;
}
+ public String account;
+ public String instanceId;
+ public String type;
+ public String time;
+
/**
* This public method will access data and create db Point
*
* @return db point
*/
public Point getPoint() {
- DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSS").withZoneUTC();
+ DateTimeFormatter formatter = DateTimeFormat.forPattern(getDateFormat()).withZoneUTC();
DateTime dt = formatter.parseDateTime(time);
Map fields = getFields();
removeNullValues(fields);
@@ -119,27 +100,10 @@ private void removeNullValues(Map