summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgokuls <goksing@gmail.com>2017-05-24 10:43:36 -0700
committergokuls <goksing@gmail.com>2017-05-24 10:54:22 -0700
commitd5ae9ca07cffe21551559764a602b0ea049d3423 (patch)
tree4d481d39d1aeda428659f4d4847aca883f3ff402
parentf27c570b3351a4d08e6455336ee2fefa0863a967 (diff)
Minor fix between collector and testcoll scripts
Change-Id: I666d1d41a0ded5890c53b9d502e98b8e6687568a Signed-off-by: Gokul Singaraju <goksing@gmail.com>
-rw-r--r--vnfs/VES5.0/collector/code/collector/collector.py16
-rw-r--r--vnfs/VES5.0/collector/docs/att_interface_definition/event_format_updated.json19
2 files changed, 24 insertions, 11 deletions
diff --git a/vnfs/VES5.0/collector/code/collector/collector.py b/vnfs/VES5.0/collector/code/collector/collector.py
index cfe18476..32c48cbb 100644
--- a/vnfs/VES5.0/collector/code/collector/collector.py
+++ b/vnfs/VES5.0/collector/code/collector/collector.py
@@ -50,7 +50,6 @@ from base64 import b64decode
import string
import json
import jsonschema
-from jsonschema import Draft4Validator
from functools import partial
_hello_resp = '''\
@@ -86,8 +85,8 @@ PROFILE = False
#------------------------------------------------------------------------------
# Credentials we expect clients to authenticate themselves with.
#------------------------------------------------------------------------------
-vel_username = 'will'
-vel_password = 'pill'
+vel_username = ''
+vel_password = ''
#------------------------------------------------------------------------------
# The JSON schema which we will use to validate events.
@@ -146,8 +145,8 @@ def listener(environ, start_response, schema):
else:
credentials = None
- # logger.debug('Credentials: {0}'.format(credentials))
- logger.debug('Credentials: ****')
+ logger.debug('Credentials: {0}'.format(credentials))
+ #logger.debug('Credentials: ****')
#--------------------------------------------------------------------------
# If we have a schema file then check that the event matches that expected.
@@ -226,8 +225,8 @@ def listener(environ, start_response, schema):
start_response('202 Accepted', [])
yield ''
else:
- logger.warn('Failed to authenticate OK')
- print('Failed to authenticate OK')
+ logger.warn('Failed to authenticate OK'+vel_username + ':' + vel_password)
+ print('Failed to authenticate OK'+vel_username + ':' + vel_password)
#----------------------------------------------------------------------
# Respond to the caller.
@@ -392,7 +391,7 @@ USAGE
help='Display version information')
parser.add_argument('-a', '--api-version',
dest='api_version',
- default='3',
+ default='5',
help='set API version')
parser.add_argument('-c', '--config',
dest='config',
@@ -526,7 +525,6 @@ USAGE
global throttle_schema
global test_control_schema
vel_schema = json.load(open(vel_schema_file, 'r'))
- Draft4Validator.check_schema(vel_schema)
logger.debug('Loaded the JSON schema file')
#------------------------------------------------------------------
diff --git a/vnfs/VES5.0/collector/docs/att_interface_definition/event_format_updated.json b/vnfs/VES5.0/collector/docs/att_interface_definition/event_format_updated.json
index 0dfa3d5e..986ed8f5 100644
--- a/vnfs/VES5.0/collector/docs/att_interface_definition/event_format_updated.json
+++ b/vnfs/VES5.0/collector/docs/att_interface_definition/event_format_updated.json
@@ -985,7 +985,7 @@
"description": "an instance conforming to the jsonObject schema",
"type": "object"
},
- "objectInstanceEpochMicrosec": {
+ "objectInstanceEpochMicrosec": {
"description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
"type": "number"
},
@@ -1028,6 +1028,21 @@
},
"required": [ "countsInTheBucket" ]
},
+ "measurementGroup": {
+ "description": "measurement group",
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "measurements": {
+ "description": "array of name value pair measurements",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/field"
+ }
+ }
+ },
+ "required": [ "name", "measurements" ]
+ },
"measurementsForVfScalingFields": {
"description": "measurementsForVfScaling fields",
"type": "object",
@@ -1337,7 +1352,7 @@
}
}
},
- "required": [ "name", "arrayOfFields" ]
+ "required": [ "name", "measurements" ]
},
"otherFields": {
"description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration",