Implementation of site create and site delete
Hard-coding test-suffix for antares site temporarily
This commit is contained in:
Родитель
e91462a56f
Коммит
2b6df1a600
|
@ -58,10 +58,7 @@ exports.init = function (waz) {
|
|||
req.write('<Site xmlns="http://schemas.microsoft.com/windowsazure">');
|
||||
req.write('<HostNames>');
|
||||
req.write('<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">');
|
||||
req.write(name + '.antares.com');
|
||||
req.write('</string>');
|
||||
req.write('<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">');
|
||||
req.write('www.' + name + '.antares.com');
|
||||
req.write(name + '.antint0.antares-test.windows-int.net');
|
||||
req.write('</string>');
|
||||
req.write('</HostNames>');
|
||||
req.write('<Name>');
|
||||
|
@ -76,6 +73,27 @@ exports.init = function (waz) {
|
|||
});
|
||||
});
|
||||
|
||||
site.command('delete <name>')
|
||||
.description('Delete a web site.')
|
||||
.option('-i, --subscription <id>', 'use the subscription id')
|
||||
.option('-s, --space <name>', 'use the space name')
|
||||
.action(function (name, options) {
|
||||
|
||||
var subscription = options.subscription || waz.category('account').defaultSubscriptionId();
|
||||
|
||||
channel
|
||||
.header('x-ms-version', '2011-02-25')
|
||||
.path(subscription)
|
||||
.path('services/webspaces')
|
||||
.path(options.space || '.default')
|
||||
.path('sites/')
|
||||
.path(name)
|
||||
.header('Content-Type', 'application/xml')
|
||||
.DELETE(function (err, thing) {
|
||||
console.log(thing);
|
||||
});
|
||||
});
|
||||
|
||||
var space = waz.category('space')
|
||||
.description('Commands to manage your Azure web spaces.');
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче