Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bcbccbf
initial checkin azure v2
morsh Dec 12, 2016
d62014b
adding login to get server
morsh Dec 13, 2016
906472d
DestroyServer addition
jeniawhite Dec 13, 2016
725ef47
Merge branch 'master' of https://github.com/CatalystCode/pkgcloud
morsh Dec 13, 2016
043e151
Fixing removal of options in logintoazure after merge
jeniawhite Dec 13, 2016
49745cc
Fixing get server status response on errors
jeniawhite Dec 13, 2016
6244f34
adding storage for azure-v2
morsh Dec 30, 2016
d49cfcd
azure-v2 compute mgmt + moving to templates
morsh Jan 2, 2017
69ee436
not including .private. files
morsh Jan 2, 2017
61b7b3e
adjustments to code with self
morsh Jan 2, 2017
6e51331
minor fixes
morsh Jan 2, 2017
1f0301b
updating code according to travis-ci comments
morsh Jan 3, 2017
288c81e
travis-ci review #2
morsh Jan 3, 2017
1eb444f
adding first tests
morsh Jan 4, 2017
186f0d0
update test name
morsh Jan 4, 2017
c586d42
fix bind
morsh Jan 4, 2017
6ae7635
update test for multple calls
morsh Jan 4, 2017
ee05c2d
destroying dependencies when destroying a linux VM
morsh Jan 8, 2017
424d6b8
adding tests to containers for azure-v2
morsh Jan 8, 2017
2398625
travis review
morsh Jan 8, 2017
32f957e
removing launch.json
morsh Jan 8, 2017
b37ed6c
updating examples
morsh Jan 8, 2017
07cdf66
changing destroy server to enable different dependencies
morsh Jan 11, 2017
5fa39a7
adding remote extension for windows vms
morsh Feb 9, 2017
d965ec3
Merge remote-tracking branch 'pkgcloud/master'
jackyalbo Feb 13, 2017
5607270
adding remove file functionality
morsh Feb 14, 2017
227467c
updating relative pkgcloud path
morsh Feb 14, 2017
8de41e9
adding dynamic data disk creation
morsh Feb 15, 2017
a2ce4f0
reverting package to right name/version
morsh Feb 15, 2017
63f27a5
fixing jshint #1
morsh Feb 15, 2017
e030cd3
jshint fixes #2
morsh Feb 15, 2017
3113e82
jshint fix #3
morsh Feb 15, 2017
bd3867e
Merge pull request #1 from pkgcloud/master
Feb 15, 2017
1e44b67
removing all arrow functions
morsh Feb 15, 2017
6a38525
reverting package.json
morsh Feb 15, 2017
7058437
removing es6 singlequotes
morsh Feb 15, 2017
326a5f5
jshint #4
morsh Feb 15, 2017
cd551f1
removing extractors
morsh Feb 15, 2017
ac50dc8
adjusting some tests
morsh Feb 16, 2017
0e8b229
canceling filter of azure-v2
morsh Feb 16, 2017
13575ee
Merge remote-tracking branch 'origin/master'
jackyalbo Mar 12, 2017
b8f41ac
adding ssh support for both linux and windows
jackyalbo Mar 15, 2017
4dec2ec
Merge pull request #3 from CatalystCode/ssh_fix2
Mar 16, 2017
b02a55c
small urgent fix
jackyalbo Apr 25, 2017
98aa959
Merge pull request #4 from CatalystCode/ssh_fix2
jackyalbo Apr 25, 2017
718987c
miniature fix for running ssh on windows
jackyalbo Apr 26, 2017
a8fb5b4
Merge pull request #5 from CatalystCode/ssh_fix2
jackyalbo Apr 26, 2017
2caa019
bug fix
jackyalbo Apr 27, 2017
c1c749d
Merge pull request #6 from CatalystCode/ssh_fix2
jackyalbo Apr 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@
{
"type": "node",
"request": "launch",
"name": "Launch Azure V2",
"program": "${workspaceRoot}\\examples\\compute\\azure-v2.js",
"name": "Launch Azure V2 Destroy",
"program": "${workspaceRoot}//examples//compute//azure-v2-destroy.js",
"cwd": "${workspaceRoot}",
"stopOnEntry": true
},
{
"type": "node",
"request": "launch",
"name": "Launch Azure V2 Create",
"program": "${workspaceRoot}//examples//compute//azure-v2.js",
"cwd": "${workspaceRoot}",
"stopOnEntry": true
},
Expand Down
38 changes: 38 additions & 0 deletions examples/compute/azure-v2-destroy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var pkgcloud = require('../../lib/pkgcloud'),
fs = require('fs'),
client,
options;

//
// Create a pkgcloud compute instance
//
options = {
resourceGroup: '{resourceGroup}',
provider: 'azure-v2',
storageAccount: '{storeName}',
storageAccessKey: '{storeKey}',
subscriptionId: '{subscriptionId}',
spClientId: '{spClientId}',
spSecret: '{spSecret}',
spDomain: '{spDomain}',
spSubscriptionId: '{spSubscriptionId}'
};
client = pkgcloud.compute.createClient(options);

//
// Create a server.
// This may take several minutes.
//
options = {
name: 'ms-pkgc-vm-test', // name of the server
};

console.log('deleting server...');

client.destroyServer(options, function (err, server) {
if (err) {
console.log(err);
} else {
console.log('Started DELETE of VM');
}
});
17 changes: 7 additions & 10 deletions examples/compute/azure-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ options = {
storageAccount: '{storeName}',
storageAccessKey: '{storeKey}',
subscriptionId: '{subscriptionId}',
spClientId: "{spClientId}",
spSecret: "{spSecret}",
spDomain: "{spDomain}",
spSubscriptionId: "{spSubscriptionId}"
spClientId: '{spClientId}',
spSecret: '{spSecret}',
spDomain: '{spDomain}',
spSubscriptionId: '{spSubscriptionId}'
};
client = pkgcloud.compute.createClient(options);

Expand All @@ -25,12 +25,12 @@ client = pkgcloud.compute.createClient(options);
//
options = {
// pkgcloud compute properties
name: 'ms-pkgc-test2', // name of the server
name: 'ms-pkgc-vm-test', // name of the server
flavor: 'Standard_D1', // azure vm size
//image: '5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS63DEC20121220', // OS Image to use
image: {
uri: 'https://{storename}.blob.core.windows.net/osdiks/ms-pkgc-test-os2.vhd',
OS: 'linux'
uri: 'https://{storename}.blob.core.windows.net/osdiks/ms-pkgc-test-os2.vhd',
OS: 'linux'
},
nic: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/networkInterfaces/{nicName}',

Expand Down Expand Up @@ -58,6 +58,3 @@ client.createServer(options, function (err, server) {
});
}
});



6 changes: 3 additions & 3 deletions lib/pkgcloud/azure-v2/compute/client/servers.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ exports.createServer = function createServer(options, callback) {
// Destroy a server in Azure.
//
exports.destroyServer = function destroyServer(server, callback) {
var serverId = server instanceof base.Server ? server.id : server;
var serverName = server.name;

azureApi.destroyServer(this, serverId, function (err) {
azureApi.destroyServer(this, serverName, function (err) {
if (callback) {
return !err
? callback && callback(null, { ok: serverId })
? callback && callback(null, { ok: serverName })
: callback && callback(err);
}
});
Expand Down
Loading