Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweaks to WSDL, first cut at DescribeSensors in CC, in the middle of …

…writing copy_sensor_*_from_adb() helpers
  • Loading branch information...
commit 423c39d4eb4cc03c7d033f7472e78ff7f10bb41e 1 parent 64bd0d9
@dmitrii dmitrii authored
View
26 node/Makefile
@@ -146,10 +146,13 @@ server: $(SERVICE_SO)
../util/euca_auth.o: ../util/euca_auth.c ../util/data.h ../util/eucalyptus.h
make -C ../util
+../util/sensor.o: ../util/sensor.o
+ make -C ../util
+
../util/windows-bundle.o: ../util/windows-bundle.c ../util/windows-bundle.h
make -C ../util
-$(SERVICE_SO): generated/stubs $(STORAGE_OBJS) ../net/vnetwork.o ../util/log.o ../util/misc.o ../util/hash.o ../util/data.o server-marshal.o handlers.o $(NC_HANDLERS) ../util/eucalyptus.h ../util/euca_auth.o ../storage/http.o ../util/windows-bundle.o
+$(SERVICE_SO): generated/stubs $(STORAGE_OBJS) ../net/vnetwork.o ../util/log.o ../util/misc.o ../util/sensor.o ../util/hash.o ../util/data.o server-marshal.o handlers.o $(NC_HANDLERS) ../util/eucalyptus.h ../util/euca_auth.o ../storage/http.o ../util/windows-bundle.o
$(CC) -o $(SERVICE_SO) -shared generated/adb_*.o generated/axis2*_skel_*.o server-marshal.o handlers.o $(NC_HANDLERS) $(STORAGE_OBJS) ../net/*.o ../util/*.o ../storage/http.o ../storage/storage-windows.o $(NC_LIBS) $(EFENCE)
clientlib: generated/stubs ../util/data.o client-marshal-adb.o
@@ -158,26 +161,25 @@ client: $(CLIENT) $(CLIENT)_local
fake: $(CLIENT)_fake
-$(CLIENT): generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o $(CLIENT).c ../storage/vbr.o
+$(CLIENT): generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/sensor.o ../util/data.o client-marshal-adb.o client-marshal-local.o $(CLIENT).c ../storage/vbr.o
$(CC) -o $(CLIENT) $(CFLAGS) $(INCLUDES) generated/adb_*.o generated/axis2_stub_*.o $(AXIOM_LIBS) client-marshal-adb.o ../util/*.o $(AXIOM_LIBS) $(OPENSSL_LIBS) ../storage/diskutil.o ../net/*.o -lm $(CLIENT).c ../storage/http.o -lcurl ../storage/storage-windows.o $(NC_LIBS)
-$(CLIENT)_fake: generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o client-marshal-fake.o $(CLIENT).c ../storage/vbr.o
-
-$(CLIENT)_local: generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o handlers.o $(NC_HANDLERS) $(CLIENT).c ../util/euca_auth.o ../storage/vbr.o ../util/config.o
+$(CLIENT)_fake: generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/sensor.o ../util/data.o client-marshal-adb.o client-marshal-local.o client-marshal-fake.o $(CLIENT).c ../storage/vbr.o
+$(CLIENT)_local: generated/stubs $(STORAGE_OBJS) ../util/log.o ../util/misc.o ../util/sensor.o ../util/data.o client-marshal-adb.o client-marshal-local.o handlers.o $(NC_HANDLERS) $(CLIENT).c ../util/euca_auth.o ../storage/vbr.o
$(CC) -o $(CLIENT)_local $(INCLUDES) $(CFLAGS) client-marshal-local.o ../util/*.o $(STORAGE_OBJS) ../net/*.o handlers.o $(NC_HANDLERS) $(CLIENT).c $(NC_LIBS) ../storage/http.o ../storage/storage-windows.o
-test: test.c ../util/log.o ../util/misc.o ../util/data.o
- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test test.c ../util/log.o ../util/misc.o ../storage/diskutil.o ../util/data.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+test: test.c ../util/log.o ../util/misc.o ../util/sensor.o ../util/data.o
+ $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test test.c ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o ../util/data.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
-test_nc: test_nc.c ../util/log.o ../util/misc.o ../storage/diskutil.o
- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_nc -lvirt test_nc.c -lvirt ../util/log.o ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+test_nc: test_nc.c ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o
+ $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_nc -lvirt test_nc.c -lvirt ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
-test_hooks: hooks.c ../util/log.o ../util/misc.o ../storage/diskutil.o
- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_hooks -D__STANDALONE hooks.c ../util/log.o ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+test_hooks: hooks.c ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o
+ $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_hooks -D__STANDALONE hooks.c ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
test_xml: xml.c
- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) `xslt-config --cflags` -o test_xml -D__STANDALONE xml.c ../util/log.o ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+ $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) `xslt-config --cflags` -o test_xml -D__STANDALONE xml.c ../util/log.o ../util/misc.o ../util/sensor.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
deploy:
$(INSTALL) -d $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
View
118 node/client-marshal-adb.c
@@ -73,6 +73,7 @@
#include "client-marshal.h"
#include "misc.h"
#include "adb-helpers.h"
+#include "sensor.h"
#define NULL_ERROR_MSG "() could not be invoked (check NC host, port, and credentials)\n"
@@ -228,6 +229,54 @@ static ncInstance * copy_instance_from_adb (adb_instanceType_t * instance, axuti
return outInst;
}
+static sensorMetric * copy_sensor_metric_from_adb (adb_metricsResourceType_t * metric, axutil_env_t * env)
+{
+ sensorMetric * m = malloc (sizeof (sensorMetric));
+ if (m==NULL)
+ return NULL;
+
+ safe_strncpy (m->metricName, (char *)adb_metricsResourceType_get_metricName(metric, env), sizeof (m->metricName));
+ m->countersLen = adb_metricsResourceType_sizeof_counters(metric, env);
+ if (m->countersLen>0) {
+ m->counters = malloc (sizeof (sensorCounter *) * m->countersLen);
+ if (m->counters == NULL) {
+ logprintfl (EUCAERROR, "out of memory in copy_sensor_metric_from_adb\n");
+ return NULL;
+ }
+ }
+}
+
+// #define ARRAY_COPY_TEMPLATE(CONTAINERTYPE,ARRAYNAME,ARRAYTYPE
+
+static sensorResource * copy_sensor_resource_from_adb (adb_sensorsResourceType_t * resource, axutil_env_t * env)
+{
+ sensorResource * so = malloc (sizeof (sensorResource));
+ if (so==NULL)
+ return NULL;
+ so->metricsLen = adb_sensorsResourceType_sizeof_metrics(resource, env);
+ if (so->metricsLen>0) {
+ so->metrics = malloc (sizeof (sensorMetric *) * so->metricsLen);
+ if (so->metrics == NULL) {
+ logprintfl (EUCAERROR, "out of memory in copy_sensor_resource_from_adb\n");
+ return NULL;
+ }
+ for (int i=0; i<so->metricsLen; i++) {
+ adb_metricsResourceType_t * metric = NULL;
+ so->metrics [i] = copy_sensor_metric_from_adb (metric, env);
+ if (so->metrics [i] == NULL) { // allocation failure - free up everything
+ for (int j=0; j<i; j++) {
+ sensor_free_metric (so->metrics [i]);
+ }
+ }
+ }
+ }
+
+ safe_strncpy (so->resourceName, (char *)adb_sensorsResourceType_get_resourceName(resource, env), sizeof (so->resourceName));
+ safe_strncpy (so->resourceType, (char *)adb_sensorsResourceType_get_resourceType(resource, env), sizeof (so->resourceType));
+
+ return so;
+}
+
int ncRunInstanceStub (ncStub *st, ncMetadata *meta, char *uuid, char *instanceId, char *reservationId, virtualMachine *params, char *imageId, char *imageURL, char *kernelId, char *kernelURL, char *ramdiskId, char *ramdiskURL, char *ownerId, char *accountId, char *keyName, netConfig *netparams, char *userData, char *launchIndex, char *platform, int expiryTime, char **groupNames, int groupNamesSize, ncInstance **outInstPtr)
{
int i;
@@ -923,20 +972,78 @@ int ncCreateImageStub (ncStub *st, ncMetadata *meta, char *instanceId, char *vol
return status;
}
+int ncDescribeSensorsStub (ncStub *st, ncMetadata *meta, char **instIds, int instIdsLen, char **sensorIds, int sensorIdsLen, sensorResource ***outResources, int *outResourcesLen)
+{
+ axutil_env_t * env = st->env;
+ axis2_stub_t * stub = st->stub;
+ adb_ncDescribeSensors_t * input = adb_ncDescribeSensors_create (env);
+ adb_ncDescribeSensorsType_t * request = adb_ncDescribeSensorsType_create (env);
+
+ // set standard input fields
+ adb_ncDescribeSensorsType_set_nodeName(request, env, st->node_name);
+ if (meta) {
+ if (meta->correlationId) { meta->correlationId = NULL; }
+ EUCA_MESSAGE_MARSHAL(ncDescribeSensorsType, request, meta);
+ }
+
+ for (int i=0; i<instIdsLen; i++) {
+ adb_ncDescribeSensorsType_add_instanceIds(request, env, instIds[i]);
+ }
+ for (int i=0; i<sensorIdsLen; i++) {
+ adb_ncDescribeSensorsType_add_sensorIds(request, env, sensorIds[i]);
+ }
+ adb_ncDescribeSensors_set_ncDescribeSensors(input, env, request);
+
+ int status = 0;
+ { // do it
+ adb_ncDescribeSensorsResponse_t * output = axis2_stub_op_EucalyptusNC_ncDescribeSensors (stub, env, input);
+
+ if (!output) {
+ logprintfl (EUCAERROR, "ERROR: DescribeSensors" NULL_ERROR_MSG);
+ status = -1;
+
+ } else {
+ adb_ncDescribeSensorsResponseType_t * response = adb_ncDescribeSensorsResponse_get_ncDescribeSensorsResponse (output, env);
+ if ( adb_ncDescribeSensorsResponseType_get_return(response, env) == AXIS2_FALSE ) {
+ logprintfl (EUCAERROR, "ERROR: DescribeSensors returned an error\n");
+ status = 1;
+ }
+
+ * outResourcesLen = adb_ncDescribeSensorsResponseType_sizeof_sensorsResources(response, env);
+ if (* outResourcesLen) {
+ * outResources = malloc (sizeof(sensorResource *) * *outResourcesLen);
+ if ( * outResources == NULL ) {
+ logprintfl (EUCAERROR, "ERROR: out of memory in ncDescribeSensorsStub()\n");
+ * outResourcesLen = 0;
+ status = 2;
+ } else {
+ for (int i=0; i<*outResourcesLen; i++) {
+ adb_sensorsResourceType_t * resource = adb_ncDescribeSensorsResponseType_get_sensorsResources_at(response, env, i);
+ (* outResources)[i] = copy_sensor_resource_from_adb (resource, env);
+ }
+ }
+ }
+ }
+ }
+
+ return status;
+}
+
/*************************
a template for future ops
*************************
-
- axutil_env_t * env = stub->env;
- axis2_stub_t * stub = stub->stub;
+int ncOPERATIONStub (ncStub *st, ncMetadata *meta, ...)
+{
+ axutil_env_t * env = st->env;
+ axis2_stub_t * stub = st->stub;
adb_ncOPERATION_t * input = adb_ncOPERATION_create (env);
adb_ncOPERATIONType_t * request = adb_ncOPERATIONType_create (env);
// set standard input fields
adb_ncOPERATIONType_set_nodeName(request, env, st->node_name);
if (meta) {
- adb_ncOPERATIONType_set_correlationId (request, env, CORRELATION_ID);
- adb_ncOPERATIONType_set_userId (request, env, meta->userId);
+ if (meta->correlationId) { meta->correlationId = NULL; }
+ EUCA_MESSAGE_MARSHAL(ncOPERATIONType, request, meta);
}
// TODO: set op-specific input fields
@@ -963,4 +1070,5 @@ int ncCreateImageStub (ncStub *st, ncMetadata *meta, char *instanceId, char *vol
}
return status;
+}
*/
View
32 tools/template.c
@@ -0,0 +1,32 @@
+// -*- mode: C; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+// vim: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+
+/*************************************************************************
+ * Copyright 2009-2012 Eucalyptus Systems, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
+ * CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
+ * additional information or have any questions.
+ ************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#define _GNU_SOURCE
+#include <string.h> // strlen, strcpy
+#include <ctype.h> // isspace
+#include <assert.h>
+#include <stdarg.h>
+
+#include "misc.h"
View
27 tools/template.h
@@ -0,0 +1,27 @@
+// -*- mode: C; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+// vim: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+
+/*************************************************************************
+ * Copyright 2009-2012 Eucalyptus Systems, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
+ * CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
+ * additional information or have any questions.
+ ************************************************************************/
+
+#ifndef INCLUDE_TEMPLATE_H
+#define INCLUDE_TEMPLATE_H
+
+#endif
View
3  util/Makefile
@@ -64,8 +64,7 @@ include ../Makedefs
#DEBUGS = -DDEBUG # -DDEBUG1
CC += -g
-
-all: utf8.o log.o config.o fault.o misc.o wc.o hash.o data.o euca_auth.o euca_axis.o ipc.o windows-bundle.o euca_rootwrap euca_mountwrap
+all: utf8.o log.o config.o fault.o misc.o wc.o hash.o data.o sensor.o euca_auth.o euca_axis.o ipc.o windows-bundle.o euca_rootwrap euca_mountwrap
build: all
View
38 util/sensor.c
@@ -0,0 +1,38 @@
+// -*- mode: C; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+// vim: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+
+/*************************************************************************
+ * Copyright 2009-2012 Eucalyptus Systems, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
+ * CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
+ * additional information or have any questions.
+ ************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#define _GNU_SOURCE
+#include <string.h> // strlen, strcpy
+#include <ctype.h> // isspace
+#include <assert.h>
+#include <stdarg.h>
+
+#include "misc.h"
+#include "sensor.h"
+
+void sensor_free_metric (sensorMetric * m)
+{
+ // TODO
+}
View
63 util/sensor.h
@@ -0,0 +1,63 @@
+// -*- mode: C; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+// vim: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+
+/*************************************************************************
+ * Copyright 2009-2012 Eucalyptus Systems, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
+ * CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
+ * additional information or have any questions.
+ ************************************************************************/
+
+#ifndef INCLUDE_SENSOR_H
+#define INCLUDE_SENSOR_H
+#define MAX_SENSOR_NAME 64
+
+typedef struct {
+ long long timestampMs; // in milliseconds
+ double value; // measurement
+ char available; // if '1' then value is valid, otherwise it is not
+} sensorValue;
+
+typedef struct {
+ char dimensionName [MAX_SENSOR_NAME]; // e.g. "default", "root", "vol-123ABC"
+ sensorValue ** values; // array of pointers
+ int valuesLen; // size of the array
+} sensorDimension;
+
+typedef struct {
+ enum { SENSOR_SUMMATION, SENSOR_AVERAGE } type;
+ long long collectionIntervalMs; // the spacing of values, based on sensor's configuration
+ long long sequenceNum; // starts with 0 when sensor is reset and monotonically increases
+ sensorDimension ** dimensions; // array of pointers
+ int dimensionsLen; // size of the array
+} sensorCounter;
+
+typedef struct {
+ char metricName [MAX_SENSOR_NAME]; // e.g. "CPUUtilization"
+ sensorCounter ** counters; // array of pointers
+ int countersLen; // size of the array
+} sensorMetric;
+
+typedef struct {
+ char resourceName [MAX_SENSOR_NAME]; // e.g. "i-1234567"
+ char resourceType [MAX_SENSOR_NAME]; // e.g. "instance"
+ sensorMetric ** metrics; // array of pointers
+ int metricsLen; // size of the array
+} sensorResource;
+
+void sensor_free_metric (sensorMetric * m);
+
+#endif
View
18 wsdl/eucalyptus_cc.wsdl
@@ -170,18 +170,6 @@
</xs:sequence>
</xs:complexType>
- <xs:complexType abstract="true" name="sensorsIdType">
- <xs:sequence>
- <xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="sensorIds" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType abstract="true" name="instancesIdType">
- <xs:sequence>
- <xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="instancesIds" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
<xs:complexType abstract="true" name="sensorsResourceType">
<xs:sequence>
<xs:element name="resourceName" type="xs:string"
@@ -728,8 +716,8 @@
<xs:complexContent>
<xs:extension base="tns:eucalyptusMessage">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorsIds" type="tns:sensorsIdType" />
- <xs:element maxOccurs="unbounded" minOccurs="0" name="instancesIds" type="tns:instancesIdType" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceIds" type="xs:string" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorIds" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -739,7 +727,7 @@
<xs:complexContent>
<xs:extension base="tns:eucalyptusMessage">
<xs:sequence>
- <xs:element maxOccurs="1" minOccurs="1" name="sensorsResources" type="tns:sensorsResourceType" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorsResources" type="tns:sensorsResourceType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
View
60 wsdl/eucalyptus_nc.wsdl
@@ -97,64 +97,48 @@
</xs:sequence>
</xs:complexType>
- <xs:complexType abstract="true" name="sensorsIdType">
- <xs:sequence>
- <xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="sensorIds" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType abstract="true" name="instancesIdType">
- <xs:sequence>
- <xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="instancesIds" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
+ <!-- sensor-related data types -->
<xs:complexType abstract="true" name="sensorsResourceType">
<xs:sequence>
- <xs:element name="resourceName" type="xs:string"
- maxOccurs="1" minOccurs="1">
- </xs:element>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1"
- name="resouceType" type="xs:string" />
- <xs:element name="metrics" type="tns:metricsResourceType" maxOccurs="unbounded" minOccurs="1"></xs:element>
+ <xs:element name="resourceName" type="xs:string" maxOccurs="1" minOccurs="1"/>
+ <xs:element name="resourceType" type="xs:string" minOccurs="1" maxOccurs="1" />
+ <xs:element name="metrics" type="tns:metricsResourceType" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType abstract="true" name="metricsResourceType">
<xs:sequence>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1" name="metricName" type="xs:string"/>
- <xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="counters" type="tns:metricCounterType"/>
+ <xs:element name="metricName" type="xs:string" nillable="true" minOccurs="1" maxOccurs="1" />
+ <xs:element name="counters" type="tns:metricCounterType" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType abstract="true" name="metricCounterType">
<xs:sequence>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1" name="type" type="xs:string" />
- <xs:element name="collectionInterval" type="xs:string" maxOccurs="1" minOccurs="1"></xs:element>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1"
- name="sequenceNum" type="xs:int" />
- <xs:element name="dimensions" type="tns:metricDimensionsType"
- maxOccurs="unbounded" minOccurs="1">
- </xs:element>
+ <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1" />
+ <xs:element name="collectionIntervalMs" type="xs:int" maxOccurs="1" minOccurs="1"/>>
+ <xs:element name="sequenceNum" type="xs:int" minOccurs="1" maxOccurs="1" />
+ <xs:element name="dimensions" type="tns:metricDimensionsType" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType abstract="true" name="metricDimensionsType">
<xs:sequence>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1"
- name="name" type="xs:string" />
- <xs:element name="values" type="tns:metricDimensionsValuesType" maxOccurs="unbounded" minOccurs="0"></xs:element>
+ <xs:element name="dimensionName" type="xs:string" minOccurs="1" maxOccurs="1" />
+ <xs:element name="values" type="tns:metricDimensionsValuesType" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType abstract="true" name="metricDimensionsValuesType">
- <xs:sequence>
- <xs:element nillable="true" minOccurs="1" maxOccurs="1"
- name="timestamp" type="xs:dateTime" />
- <xs:element nillable="true" minOccurs="0" maxOccurs="1"
- name="value" type="xs:float" />
- </xs:sequence>
+ <xs:sequence>
+ <xs:element name="timestamp" type="xs:dateTime" nillable="true" minOccurs="1" maxOccurs="1" />
+ <xs:element name="value" type="xs:float" nillable="true" minOccurs="0" maxOccurs="1" />
+ </xs:sequence>
</xs:complexType>
+
+ <!-- end of sensor-related types -->
+
<xs:complexType name="serviceStatusType">
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="1" name="serviceId" type="tns:serviceInfoType" />
@@ -574,8 +558,8 @@
<xs:complexContent>
<xs:extension base="tns:eucalyptusMessage">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorsIds" type="tns:sensorsIdType" />
- <xs:element maxOccurs="unbounded" minOccurs="0" name="instancesIds" type="tns:instancesIdType" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceIds" type="xs:string" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorIds" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -585,7 +569,7 @@
<xs:complexContent>
<xs:extension base="tns:eucalyptusMessage">
<xs:sequence>
- <xs:element maxOccurs="1" minOccurs="1" name="sensorsResources" type="tns:sensorsResourceType" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="sensorsResources" type="tns:sensorsResourceType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
Please sign in to comment.
Something went wrong with that request. Please try again.