Skip to content

Commit

Permalink
Merge pull request #4527 from Microsoft/users/biprasad/MoveAzureArm
Browse files Browse the repository at this point in the history
Move azure-arm-rest to Common directory
  • Loading branch information
bishal-pdMSFT authored Jun 14, 2017
2 parents 9bdabc0 + 67affff commit e3d6f95
Show file tree
Hide file tree
Showing 28 changed files with 4,129 additions and 13 deletions.
10 changes: 10 additions & 0 deletions Tasks/AzureResourceGroupDeployment/make.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"common": [
{
"module": "../Common/azure-arm-rest",
"type": "node",
"dest": "./",
"compile" : true
}
]
}
2 changes: 1 addition & 1 deletion Tasks/AzureResourceGroupDeployment/models/DeployAzureRG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// <reference path="../../../definitions/vsts-task-lib.d.ts" />

import tl = require("vsts-task-lib/task");
import msRestAzure = require("./../operations/azure-rest/azure-arm-common");
import msRestAzure = require('azure-arm-rest/azure-arm-common');

class TokenCredentials {
private hostUrl: string;
Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzureResourceGroupDeployment/operations/AzureUtil.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import networkManagementClient = require("./azure-rest/azure-arm-network");
import computeManagementClient = require("./azure-rest/azure-arm-compute");
import networkManagementClient = require("azure-arm-rest/azure-arm-network");
import computeManagementClient = require("azure-arm-rest/azure-arm-compute");
import deployAzureRG = require("../models/DeployAzureRG");
import tl = require("vsts-task-lib/task")
import az = require("./azure-rest/azureModels");
import az = require("azure-arm-rest/azureModels");
import utils = require("./Utils");

export class NetworkInterface {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import computeManagementClient = require("./azure-rest/azure-arm-compute");
import computeManagementClient = require("azure-arm-rest/azure-arm-compute");
import util = require("util");
import tl = require("vsts-task-lib/task");
import azure_utils = require("./AzureUtil");
import deployAzureRG = require("../models/DeployAzureRG");
import az = require("./azure-rest/azureModels");
import az = require("azure-arm-rest/azureModels");
import utils = require("./Utils");

export class DeploymentGroupExtensionHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import util = require("util");

import env = require("./Environment");
import deployAzureRG = require("../models/DeployAzureRG");
import armResource = require("./azure-rest/azure-arm-resource");
import armResource = require("azure-arm-rest/azure-arm-resource");
import winRM = require("./WinRMExtensionHelper");
import dgExtensionHelper = require("./DeploymentGroupExtensionHelper");
var parameterParser = require("./ParameterParser").parse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import path = require("path");
import tl = require("vsts-task-lib/task");
import armCompute = require('./azure-rest/azure-arm-compute');
import armCompute = require('azure-arm-rest/azure-arm-compute');
import deployAzureRG = require("../models/DeployAzureRG");
import utils = require("./Utils")
import dgExtensionHelper = require("./DeploymentGroupExtensionHelper");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import networkManagementClient = require("./azure-rest/azure-arm-network");
import computeManagementClient = require("./azure-rest/azure-arm-compute");
import networkManagementClient = require("azure-arm-rest/azure-arm-network");
import computeManagementClient = require("azure-arm-rest/azure-arm-compute");
import util = require("util");
import tl = require("vsts-task-lib/task");
import azure_utils = require("./AzureUtil");
import deployAzureRG = require("../models/DeployAzureRG");
import az = require("./azure-rest/azureModels");
import az = require("azure-arm-rest/azureModels");
import utils = require("./Utils");

export class WinRMExtensionHelper {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureResourceGroupDeployment/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 1,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureResourceGroupDeployment/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 1,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"loc.messages.ClientIdCannotBeEmpty": "clientId must be a non empty string.",
"loc.messages.DomainCannotBeEmpty": "domain must be a non empty string.",
"loc.messages.SecretCannotBeEmpty": "secret must be a non empty string.",
"loc.messages.armUrlCannotBeEmpty": "arm Url must be a non empty string.",
"loc.messages.authorityUrlCannotBeEmpty": "authority must be a non empty string.",
"loc.messages.CouldNotFetchAccessTokenforAzureStatusCode": "Could not fetch access token for azure. Status code: %s, status message: %s",
"loc.messages.CallbackCannotBeNull": "callback cannot be null.",
"loc.messages.VMNameCannotBeNull": "vmName cannot be null or undefined and it must be of type string.",
"loc.messages.InvalidValue": "%s is not a valid value. The valid values are: %s",
"loc.messages.VmExtensionNameCannotBeNull": "vmExtensionName cannot be null or undefined and it must be of type string.",
"loc.messages.ExpandShouldBeOfTypeString": "expand must be of type string.",
"loc.messages.ExtensionParametersCannotBeNull": "extensionParameters cannot be null or undefined.",
"loc.messages.LoadBalancerNameCannotBeNull": "'loadBalancerName cannot be null or undefined and it must be of type string.'",
"loc.messages.ParametersCannotBeNull": "parameters cannot be null or undefined.",
"loc.messages.NetworkInterfaceNameCannotBeNull": "networkInterfaceName cannot be null or undefined and it must be of type string.",
"loc.messages.NetworkSecurityGroupNameCannotBeNull": "networkSecurityGroupName cannot be null or undefined and it must be of type string.",
"loc.messages.SecurityRuleNameCannotBeNull": "securityRuleName cannot be null or undefined and it must be of type string.",
"loc.messages.SecurityRuleParametersCannotBeNull": "securityRuleParameters cannot be null or undefined.",
"loc.messages.DeploymentNameCannotBeNull": "deploymentName cannot be null or undefined and it must be of type string.",
"loc.messages.CredentialsCannotBeNull": "'credentials' cannot be null.",
"loc.messages.SubscriptionIdCannotBeNull": "'subscriptionId' cannot be null.",
"loc.messages.InvalidResponseLongRunningOperation": "Invalid response received for fetching status of a long running operation.",
"loc.messages.TimeoutWhileWaiting": "Timed out while waiting",
"loc.messages.ResourceGroupCannotBeNull": "resourceGroupName cannot be null or undefined and it must be of type string.",
"loc.messages.ResourceGroupExceededLength": "\"resourceGroupName\" should satisfy the constraint - \"MaxLength\": 90",
"loc.messages.ResourceGroupDeceededLength": "\"resourceGroupName\" should satisfy the constraint - \"MinLength\": 1",
"loc.messages.ResourceGroupDoesntMatchPattern": "\"resourceGroupName\" should satisfy the constraint - \"Pattern\": /^[-\\w\\._\\(\\)]+$/"
}
File renamed without changes.
31 changes: 31 additions & 0 deletions Tasks/Common/azure-arm-rest/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"messages": {
"ClientIdCannotBeEmpty": "clientId must be a non empty string.",
"DomainCannotBeEmpty": "domain must be a non empty string.",
"SecretCannotBeEmpty": "secret must be a non empty string.",
"armUrlCannotBeEmpty": "arm Url must be a non empty string.",
"authorityUrlCannotBeEmpty": "authority must be a non empty string.",
"CouldNotFetchAccessTokenforAzureStatusCode": "Could not fetch access token for azure. Status code: %s, status message: %s",
"CallbackCannotBeNull": "callback cannot be null.",
"VMNameCannotBeNull": "vmName cannot be null or undefined and it must be of type string.",
"InvalidValue": "%s is not a valid value. The valid values are: %s",
"VmExtensionNameCannotBeNull": "vmExtensionName cannot be null or undefined and it must be of type string.",
"ExpandShouldBeOfTypeString": "expand must be of type string.",
"ExtensionParametersCannotBeNull": "extensionParameters cannot be null or undefined.",
"LoadBalancerNameCannotBeNull": "'loadBalancerName cannot be null or undefined and it must be of type string.'",
"ParametersCannotBeNull": "parameters cannot be null or undefined.",
"NetworkInterfaceNameCannotBeNull": "networkInterfaceName cannot be null or undefined and it must be of type string.",
"NetworkSecurityGroupNameCannotBeNull": "networkSecurityGroupName cannot be null or undefined and it must be of type string.",
"SecurityRuleNameCannotBeNull": "securityRuleName cannot be null or undefined and it must be of type string.",
"SecurityRuleParametersCannotBeNull": "securityRuleParameters cannot be null or undefined.",
"DeploymentNameCannotBeNull": "deploymentName cannot be null or undefined and it must be of type string.",
"CredentialsCannotBeNull": "'credentials' cannot be null.",
"SubscriptionIdCannotBeNull": "'subscriptionId' cannot be null.",
"InvalidResponseLongRunningOperation": "Invalid response received for fetching status of a long running operation.",
"TimeoutWhileWaiting": "Timed out while waiting",
"ResourceGroupCannotBeNull": "resourceGroupName cannot be null or undefined and it must be of type string.",
"ResourceGroupExceededLength": "\"resourceGroupName\" should satisfy the constraint - \"MaxLength\": 90",
"ResourceGroupDeceededLength": "\"resourceGroupName\" should satisfy the constraint - \"MinLength\": 1",
"ResourceGroupDoesntMatchPattern": "\"resourceGroupName\" should satisfy the constraint - \"Pattern\": /^[-\\w\\._\\(\\)]+$/"
}
}
76 changes: 76 additions & 0 deletions Tasks/Common/azure-arm-rest/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Tasks/Common/azure-arm-rest/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "azure-arm-rest",
"version": "1.0.0",
"description": "Common Lib for Azure ARM REST apis",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/Microsoft/vsts-tasks.git"
},
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Microsoft/vsts-tasks/issues"
},
"homepage": "https://github.com/Microsoft/vsts-tasks#readme",
"dependencies": {
"q": "1.4.1",
"vso-node-api": "6.0.1-preview",
"vsts-task-lib": "^0.9.20"
}
}
7 changes: 7 additions & 0 deletions Tasks/Common/azure-arm-rest/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"declaration": true
}
}
7 changes: 7 additions & 0 deletions Tasks/Common/azure-arm-rest/typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"globalDependencies": {
"mocha": "registry:dt/mocha#2.2.5+20160720003353",
"node": "registry:dt/node#6.0.0+20160920093002",
"q": "registry:dt/q#0.0.0+20160613154756"
}
}
Loading

0 comments on commit e3d6f95

Please sign in to comment.