From: Laurence Maultsby Date: Tue, 18 Oct 2016 13:59:29 +0000 (-0400) Subject: RIFT-14876: Updated parts of logging to use v2 X-Git-Tag: v1.0.1~10^2~9 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F543%2F1;p=osm%2FUI.git RIFT-14876: Updated parts of logging to use v2 Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/logging/api/logging.js b/skyquake/plugins/logging/api/logging.js index 086d86476..00cd1d63c 100644 --- a/skyquake/plugins/logging/api/logging.js +++ b/skyquake/plugins/logging/api/logging.js @@ -1,6 +1,6 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,12 +16,13 @@ * limitations under the License. * */ +'use strict'; var Promise = require('bluebird'); var utils = require('../../../framework/core/api_utils/utils.js'); var request = utils.request; var constants = require('../../../framework/core/api_utils/constants.js'); var _ = require('lodash'); -var APIVersion = '/v1'; +var APIVersion = '/v2'; var transforms = require('./transforms.js'); var foreverOn = true; @@ -251,11 +252,13 @@ Aggregate.set = function(req) { // Do nothing to test delay in response var encoder = new transforms.LoggingConfigEncoder(); var data = encoder.encode(req.body); - //console.log("Aggregate.set. encoded data="); - //console.log(data); + // console.log("Aggregate.set. encoded data="); + // console.log(data); // dumpLoggingConfig(data); - - return handlePutRequest(req, APIVersion + '/api/config/logging', data); + let setData = { + 'rwlog-mgmt:logging' : data + } + return handlePutRequest(req, APIVersion + '/api/config/logging', setData); // if (this.mockResponse['set']) { // return handleMockResponse(req, true, 201, data, delay=100); // } @@ -398,6 +401,7 @@ Config.setSyslogViewer = function(req) { // Operational calls Operational.get = function(req) { + var APIVersion = '/v1' return handleGetRequest(req, APIVersion + '/api/operational/logging?deep', transformLoggingRootResponseCallback );