Adding servicemanagementsettings
This commit is contained in:
Родитель
fc16eff0f7
Коммит
96cd610d13
|
@ -153,6 +153,7 @@ exports.ConnectionStringParser = require('./services/core/connectionstringparser
|
|||
exports.ServiceSettings = require('./services/core/servicesettings');
|
||||
exports.StorageServiceSettings = require('./services/core/storageservicesettings');
|
||||
exports.ServiceBusSettings = require('./services/core/servicebussettings');
|
||||
exports.ServiceManagementSettings = require('./services/core/servicemanagementsettings');
|
||||
exports.Validate = require('./util/validate');
|
||||
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft. 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.
|
||||
*/
|
||||
|
||||
var url = require('url');
|
||||
|
||||
var util = require('../../util/util');
|
||||
|
||||
var ConnectionStringParser = require('./connectionstringparser');
|
||||
var ServiceSettings = require('./servicesettings');
|
||||
var Constants = require('../../util/constants');
|
||||
var ConnectionStringKeys = Constants.ConnectionStringKeys;
|
||||
var Validate = require('../../util/validate');
|
||||
|
||||
exports = module.exports = ServiceBusSettings;
|
||||
|
||||
var _endpointSetting = ServiceSettings.settingWithFunc(
|
||||
ConnectionStringKeys.SERVICE_MANAGEMENT_ENDPOINT_NAME,
|
||||
Validate.getIsValidUri()
|
||||
);
|
||||
|
||||
var _certificatePathSetting = ServiceSettings.setting(
|
||||
ConnectionStringKeys.CERTIFICATE_PATH_NAME
|
||||
);
|
||||
|
||||
var _subscriptionIdSetting = ServiceSettings.setting(
|
||||
ConnectionStringKeys.SUBSCRIPTION_ID_NAME
|
||||
);
|
||||
|
||||
var validKeys = [
|
||||
ConnectionStringKeys.SUBSCRIPTION_ID_NAME,
|
||||
ConnectionStringKeys.CERTIFICATE_PATH_NAME,
|
||||
ConnectionStringKeys.SERVICE_MANAGEMENT_ENDPOINT_NAME
|
||||
];
|
||||
|
||||
/**
|
||||
* Creates new service management settings instance.
|
||||
*
|
||||
* @param {string} subscriptionId The user provided subscription id.
|
||||
* @param {string} endpointUri The service management endpoint uri.
|
||||
* @param {string} certificatePath The management certificate path.
|
||||
*/
|
||||
function ServiceBusSettings(subscriptionId, endpointUri, certificatePath) {
|
||||
this._subscriptionId = subscriptionId;
|
||||
this._endpointUri = endpointUri;
|
||||
this._certificatePath = certificatePath;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ var Constants = azure.Constants;
|
|||
var ConnectionStringKeys = Constants.ConnectionStringKeys;
|
||||
var ServiceBusSettings = azure.ServiceBusSettings;
|
||||
|
||||
suite('storageservicesettings-tests', function () {
|
||||
suite('servicebussettings-tests', function () {
|
||||
test('testCreateFromConnectionStringWithServiceBusAutomaticCase', function () {
|
||||
// Setup
|
||||
var expectedNamespace = 'mynamespace';
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft. 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.
|
||||
*/
|
||||
|
||||
var should = require('should');
|
||||
var url = require('url');
|
||||
|
||||
var testutil = require('../../util/util');
|
||||
var azure = testutil.libRequire('azure');
|
||||
var Constants = azure.Constants;
|
||||
var ConnectionStringKeys = Constants.ConnectionStringKeys;
|
||||
var ServiceManagementSettings = azure.ServiceManagementSettings;
|
||||
|
||||
suite('servicemanagementsettings-tests', function () {
|
||||
|
||||
});
|
Загрузка…
Ссылка в новой задаче