diff --git a/sample/waml.csx b/sample/waml.csx index 3199a57..cc75154 100644 --- a/sample/waml.csx +++ b/sample/waml.csx @@ -13,12 +13,13 @@ using (var storageClient = storageManagement.CreateClient()) { var createResult = storageClient.StorageAccounts.Create(new StorageAccountCreateParameters { - ServiceName = storageAccountName, - Location = LocationNames.SoutheastAsia + Name = storageAccountName, + Location = GeoRegionNames.SoutheastAsia, + AccountType = StorageAccountTypes.StandardLRS }); Console.WriteLine("{0}: {1}", createResult.RequestId, createResult.StatusCode); var listResponse = storageClient.StorageAccounts.List(); - Console.WriteLine(String.Join("\n", listResponse.StorageServices.Select(x => x.ServiceName))); + Console.WriteLine(String.Join("\n", listResponse.StorageAccounts.Select(x => x.Name))); } } diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe index 2c93698..8dd7e45 100644 Binary files a/src/.nuget/NuGet.exe and b/src/.nuget/NuGet.exe differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets index 83fe906..3f8c37b 100644 --- a/src/.nuget/NuGet.targets +++ b/src/.nuget/NuGet.targets @@ -2,7 +2,7 @@ $(MSBuildProjectDirectory)\..\ - + false @@ -11,11 +11,11 @@ true - + false - + @@ -28,28 +28,36 @@ $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - + $(SolutionDir).nuget - packages.config + + + + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config + + + + $(MSBuildProjectDirectory)\packages.config + $(PackagesProjectConfig) $(NuGetToolsPath)\NuGet.exe @(PackageSource) - + "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) + mono --runtime=v4.0.30319 "$(NuGetExePath)" $(TargetDir.Trim('\\')) - + -RequireConsent -NonInteractive - + "$(SolutionDir) " "$(SolutionDir)" @@ -85,24 +93,24 @@ - + - + - - + - + @@ -133,4 +141,4 @@ - \ No newline at end of file + diff --git a/src/ScriptCs.AzureManagement.Automation/AutomationManagement.cs b/src/ScriptCs.AzureManagement.Automation/AutomationManagement.cs new file mode 100644 index 0000000..6e0ec6d --- /dev/null +++ b/src/ScriptCs.AzureManagement.Automation/AutomationManagement.cs @@ -0,0 +1,25 @@ +namespace ScriptCs.AzureManagement.Automation +{ + using global::Common.Logging; + using Microsoft.WindowsAzure.Management.Automation; + using ScriptCs.AzureManagement.Common; + using ScriptCs.AzureManagement.Common.Credentials; + + public class AutomationManagement + { + private readonly ILog _logger; + private readonly ICredentialManager _credentialManager; + + public AutomationManagement(ManagementContext managementContext) + { + _logger = managementContext.Logger; + _credentialManager = managementContext.CredentialManager; + } + + public AutomationManagementClient CreateClient() + { + var credentials = _credentialManager.GetManagementCredentials(); + return new AutomationManagementClient(credentials); + } + } +} diff --git a/src/ScriptCs.AzureManagement.Automation/Properties/AssemblyInfo.cs b/src/ScriptCs.AzureManagement.Automation/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..05616f9 --- /dev/null +++ b/src/ScriptCs.AzureManagement.Automation/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ScriptCs.AzureManagement.Automation")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ScriptCs.AzureManagement.Automation")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("87261567-be6a-4a27-8bfb-8f32321d48ad")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ScriptCs.AzureManagement.Automation/ScriptCs.AzureManagement.Automation.csproj b/src/ScriptCs.AzureManagement.Automation/ScriptCs.AzureManagement.Automation.csproj new file mode 100644 index 0000000..88f9274 --- /dev/null +++ b/src/ScriptCs.AzureManagement.Automation/ScriptCs.AzureManagement.Automation.csproj @@ -0,0 +1,115 @@ + + + + + Debug + AnyCPU + {311904C9-E7BE-4831-9460-F5B02923D165} + Library + Properties + ScriptCs.AzureManagement.Automation + ScriptCs.AzureManagement.Automation + v4.5 + 512 + ..\ + true + e44a33b2 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll + + + ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll + + + ..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll + + + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.dll + + + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.NetFramework.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\packages\Microsoft.WindowsAzure.Management.Automation.1.0.1\lib\net40\Microsoft.WindowsAzure.Management.Automation.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1-beta1\lib\net45\Newtonsoft.Json.dll + + + + + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + {f78e3473-3dd0-4be8-88d4-e10d4a78d674} + ScriptCs.AzureManagement.Common + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.Automation/app.config b/src/ScriptCs.AzureManagement.Automation/app.config new file mode 100644 index 0000000..195db1f --- /dev/null +++ b/src/ScriptCs.AzureManagement.Automation/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.Automation/packages.config b/src/ScriptCs.AzureManagement.Automation/packages.config new file mode 100644 index 0000000..6ed1940 --- /dev/null +++ b/src/ScriptCs.AzureManagement.Automation/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.Common/Credentials/CredentialManager.cs b/src/ScriptCs.AzureManagement.Common/Credentials/CredentialManager.cs index a085072..8542795 100644 --- a/src/ScriptCs.AzureManagement.Common/Credentials/CredentialManager.cs +++ b/src/ScriptCs.AzureManagement.Common/Credentials/CredentialManager.cs @@ -1,9 +1,9 @@ -using System; +using Common.Logging; +using Microsoft.Azure; +using ScriptCs.AzureManagement.Common.Configuration; +using System; using System.Collections.Generic; using System.Linq; -using Common.Logging; -using Microsoft.WindowsAzure; -using ScriptCs.AzureManagement.Common.Configuration; namespace ScriptCs.AzureManagement.Common.Credentials { diff --git a/src/ScriptCs.AzureManagement.Common/Credentials/ICredentialManager.cs b/src/ScriptCs.AzureManagement.Common/Credentials/ICredentialManager.cs index bb05485..db5a540 100644 --- a/src/ScriptCs.AzureManagement.Common/Credentials/ICredentialManager.cs +++ b/src/ScriptCs.AzureManagement.Common/Credentials/ICredentialManager.cs @@ -1,4 +1,4 @@ -using Microsoft.WindowsAzure; +using Microsoft.Azure; using ScriptCs.AzureManagement.Common.Configuration; namespace ScriptCs.AzureManagement.Common.Credentials diff --git a/src/ScriptCs.AzureManagement.Common/ScriptCs.AzureManagement.Common.csproj b/src/ScriptCs.AzureManagement.Common/ScriptCs.AzureManagement.Common.csproj index f626ba2..9751f33 100644 --- a/src/ScriptCs.AzureManagement.Common/ScriptCs.AzureManagement.Common.csproj +++ b/src/ScriptCs.AzureManagement.Common/ScriptCs.AzureManagement.Common.csproj @@ -13,6 +13,7 @@ 512 ..\..\ true + 66886061 true @@ -32,39 +33,52 @@ 4 - - ..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll + + False + ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll + + + ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll + + + False + ..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll + + + False + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.dll + + + False + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.NetFramework.dll False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.dll + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.Extensions.dll + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - + False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.dll + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - + False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll - - - ..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.7.0.1-beta1\lib\net45\Newtonsoft.Json.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Extensions.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Primitives.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll @@ -89,17 +103,22 @@ - + + + Designer + - - - - + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.ExpressRoute/app.config b/src/ScriptCs.AzureManagement.ExpressRoute/app.config new file mode 100644 index 0000000..195db1f --- /dev/null +++ b/src/ScriptCs.AzureManagement.ExpressRoute/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.ExpressRoute/packages.config b/src/ScriptCs.AzureManagement.ExpressRoute/packages.config new file mode 100644 index 0000000..8b28ee3 --- /dev/null +++ b/src/ScriptCs.AzureManagement.ExpressRoute/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.Infrastructure/InfrastructureManagement.cs b/src/ScriptCs.AzureManagement.Infrastructure/InfrastructureManagement.cs index 3798845..1a40519 100644 --- a/src/ScriptCs.AzureManagement.Infrastructure/InfrastructureManagement.cs +++ b/src/ScriptCs.AzureManagement.Infrastructure/InfrastructureManagement.cs @@ -20,7 +20,7 @@ public InfrastructureManagement(ManagementContext managementContext) public ManagementClient CreateClient() { var credentials = _credentialManager.GetManagementCredentials(); - return CloudContext.Clients.CreateManagementClient(credentials); + return new ManagementClient(credentials); } } } diff --git a/src/ScriptCs.AzureManagement.Infrastructure/ScriptCs.AzureManagement.Infrastructure.csproj b/src/ScriptCs.AzureManagement.Infrastructure/ScriptCs.AzureManagement.Infrastructure.csproj index 842d097..818ec0c 100644 --- a/src/ScriptCs.AzureManagement.Infrastructure/ScriptCs.AzureManagement.Infrastructure.csproj +++ b/src/ScriptCs.AzureManagement.Infrastructure/ScriptCs.AzureManagement.Infrastructure.csproj @@ -13,6 +13,7 @@ 512 ..\..\ true + 22fa1ba5 true @@ -33,42 +34,50 @@ - ..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll + ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll - - False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.dll + + ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll - + False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.Extensions.dll + ..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll - + False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.dll + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.dll - + False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.NetFramework.dll - - False - ..\packages\Microsoft.WindowsAzure.Management.0.9.4-preview\lib\net40\Microsoft.WindowsAzure.Management.dll + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - - ..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\packages\Microsoft.WindowsAzure.Management.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1-beta1\lib\net45\Newtonsoft.Json.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Extensions.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Primitives.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll @@ -82,6 +91,7 @@ + @@ -92,10 +102,12 @@ - - - - + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.TrafficManager/TrafficManagerManagement.cs b/src/ScriptCs.AzureManagement.TrafficManager/TrafficManagerManagement.cs new file mode 100644 index 0000000..b7b9a6f --- /dev/null +++ b/src/ScriptCs.AzureManagement.TrafficManager/TrafficManagerManagement.cs @@ -0,0 +1,25 @@ +namespace ScriptCs.AzureManagement.TrafficManager +{ + using global::Common.Logging; + using Microsoft.WindowsAzure.Management.TrafficManager; + using ScriptCs.AzureManagement.Common; + using ScriptCs.AzureManagement.Common.Credentials; + + public class TrafficManagerManagement + { + private readonly ILog _logger; + private readonly ICredentialManager _credentialManager; + + public TrafficManagerManagement(ManagementContext managementContext) + { + _logger = managementContext.Logger; + _credentialManager = managementContext.CredentialManager; + } + + public TrafficManagerManagementClient CreateClient() + { + var credentials = _credentialManager.GetManagementCredentials(); + return new TrafficManagerManagementClient(credentials); + } + } +} \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.TrafficManager/app.config b/src/ScriptCs.AzureManagement.TrafficManager/app.config new file mode 100644 index 0000000..195db1f --- /dev/null +++ b/src/ScriptCs.AzureManagement.TrafficManager/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.TrafficManager/packages.config b/src/ScriptCs.AzureManagement.TrafficManager/packages.config new file mode 100644 index 0000000..d13af0c --- /dev/null +++ b/src/ScriptCs.AzureManagement.TrafficManager/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ScriptCs.AzureManagement.VirtualNetwork/ScriptCs.AzureManagement.VirtualNetwork.csproj b/src/ScriptCs.AzureManagement.VirtualNetwork/ScriptCs.AzureManagement.VirtualNetwork.csproj index 882284e..7ab6499 100644 --- a/src/ScriptCs.AzureManagement.VirtualNetwork/ScriptCs.AzureManagement.VirtualNetwork.csproj +++ b/src/ScriptCs.AzureManagement.VirtualNetwork/ScriptCs.AzureManagement.VirtualNetwork.csproj @@ -13,6 +13,7 @@ 512 ..\..\ true + 9fcdb051 true @@ -32,43 +33,51 @@ 4 - - ..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll - - + False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.dll + ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll - - False - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\net45\Microsoft.Threading.Tasks.Extensions.dll + + ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll - - False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.dll + + ..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll - + False - ..\packages\Microsoft.WindowsAzure.Common.0.9.5-preview\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.dll - + False - ..\packages\Microsoft.WindowsAzure.Management.VirtualNetworks.0.9.2-preview\lib\net40\Microsoft.WindowsAzure.Management.VirtualNetworks.dll + ..\packages\Microsoft.Azure.Common.2.0.4\lib\net45\Microsoft.Azure.Common.NetFramework.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll - - ..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\packages\Microsoft.WindowsAzure.Management.Network.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1-beta1\lib\net45\Newtonsoft.Json.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Extensions.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - + False - ..\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Primitives.dll + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll @@ -82,6 +91,7 @@ + @@ -92,10 +102,12 @@ - - - - + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + +