diff --git a/HP.Openstack.Client.Powershell/Cmdlets/HelloHPCmdlet.cs b/HP.Openstack.Client.Powershell/Cmdlets/HelloHPCmdlet.cs new file mode 100644 index 0000000..77a617b --- /dev/null +++ b/HP.Openstack.Client.Powershell/Cmdlets/HelloHPCmdlet.cs @@ -0,0 +1,38 @@ +//* ============================================================================ +//Copyright 2014 Hewlett Packard + +//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. +//============================================================================ */ +using System; +using System.Management.Automation; + + +namespace HP.Client.Powershell.Cmdlets +{ + [Cmdlet("Hello", "HP", SupportsShouldProcess = true)] + //[RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] + public class HelloHPCmdlet : PSCmdlet + { + +//========================================================================================= +/// +/// +/// +//========================================================================================= + protected override void ProcessRecord() + { + Console.WriteLine("Hello World, from HP"); + } + + } +} diff --git a/HP.Openstack.Client.Powershell/Deployment/HP.psd1 b/HP.Openstack.Client.Powershell/Deployment/HP.psd1 new file mode 100644 index 0000000..ae97024 --- /dev/null +++ b/HP.Openstack.Client.Powershell/Deployment/HP.psd1 @@ -0,0 +1,20 @@ +@{ +ModuleToProcess = 'HP.OpenStack.Client.Powershell.dll' +GUID="{847a28a4-6407-4aa6-8070-a4a51396db70}" +Author="Travis Plummer" +CompanyName="Hewlett-Packard Corporation" +Copyright="© Hewlett-Packard. All rights reserved." +ModuleVersion="1.0.0.0" +PowerShellVersion="2.0" +CLRVersion="4.0.30319" +FileList='' +RequiredAssemblies = 'OpenStack.dll', 'OpenStack.Common.dll' + +} + + + + + + + diff --git a/HP.Openstack.Client.Powershell/HP.Openstack.Client.Powershell.csproj b/HP.Openstack.Client.Powershell/HP.Openstack.Client.Powershell.csproj new file mode 100644 index 0000000..86c96dd --- /dev/null +++ b/HP.Openstack.Client.Powershell/HP.Openstack.Client.Powershell.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD} + Library + Properties + HP.Openstack.Client.Powershell + HP.Openstack.Client.Powershell + v4.5 + 512 + ..\ + true + + + true + full + false + ..\..\..\..\Documents\WindowsPowerShell\Modules\Openstack\HP\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + True + ..\packages\System.Management.Automation.6.1.7601.17515\lib\net45\System.Management.Automation.dll + + + + + + + + + + + + + + + Always + + + + + + {b2c92371-b62b-45a2-adeb-edebefa3a75c} + Openstack + + + {32bac168-2ec8-4074-9e6d-8c13460dcfad} + Openstack.Client.Powershell + + + + + + copy .\Deployment\HP.psd1 C:\Users\tplummer\Documents\WindowsPowerShell\Modules\Openstack\HP + + + \ No newline at end of file diff --git a/HP.Openstack.Client.Powershell/Properties/AssemblyInfo.cs b/HP.Openstack.Client.Powershell/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a52759c --- /dev/null +++ b/HP.Openstack.Client.Powershell/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("HP.OpenStack.Client.Powershell")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HP.OpenStack.Client.Powershell")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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("3989338b-6fb6-4dc9-9982-52771596edc6")] + +// 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/HP.Openstack.Client.Powershell/Utility/HPRegistrationManager.cs b/HP.Openstack.Client.Powershell/Utility/HPRegistrationManager.cs new file mode 100644 index 0000000..7006afc --- /dev/null +++ b/HP.Openstack.Client.Powershell/Utility/HPRegistrationManager.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using System.Text; +using System.Threading.Tasks; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Identity; + +namespace HP.OpenStack.Client.Powershell.Utility +{ + + public class HPRegistrationManager : RegistrationManager + { + public override RegistrationResponse Register(ServiceProvider serviceProvider) + { + this.ValidateCredentialElements(ref serviceProvider); + + string authenticationEndpoint = serviceProvider.CredentialElements.Where(ce => ce.Key == "AuthenticationServiceURI").Single().Value; + string userName = serviceProvider.CredentialElements.Where(ce => ce.Key == "Username").Single().Value; + string password = serviceProvider.CredentialElements.Where(ce => ce.Key == "Password").Single().Value; + string tenantId = serviceProvider.CredentialElements.Where(ce => ce.Key == "DefaultTenantId").Single().Value; + + IOpenStackCredential credential = new OpenStackCredential(new Uri (authenticationEndpoint), userName, password, tenantId); + return new RegistrationResponse(credential, serviceProvider); + } + + private SecureString GetSecureString(string password) + { + SecureString securePassword = new SecureString(); + password.ToCharArray().ToList().ForEach(securePassword.AppendChar); + return SecureStringHelper.ConvertToSecureString(password); + + } + } +} diff --git a/Openstack.Client.Powershell/bin/Release/Deployment/CLIManifest.psd1 b/HP.Openstack.Client.Powershell/bin/Debug/Deployment/HP.psd1 similarity index 72% rename from Openstack.Client.Powershell/bin/Release/Deployment/CLIManifest.psd1 rename to HP.Openstack.Client.Powershell/bin/Debug/Deployment/HP.psd1 index 4e9bf61..12e1fc2 100644 --- a/Openstack.Client.Powershell/bin/Release/Deployment/CLIManifest.psd1 +++ b/HP.Openstack.Client.Powershell/bin/Debug/Deployment/HP.psd1 @@ -1,5 +1,5 @@ @{ -ModuleToProcess = 'Openstack.Client.Powershell.dll' +ModuleToProcess = 'HP.Openstack.Client.Powershell.dll' GUID="{847a28a4-6407-4aa6-8070-a4a51396db70}" Author="Travis Plummer" CompanyName="Hewlett-Packard Corporation" @@ -7,8 +7,8 @@ Copyright="© Hewlett-Packard. All rights reserved." ModuleVersion="1.0.0.0" PowerShellVersion="2.0" CLRVersion="4.0.30319" -FormatsToProcess="OpenstackShell.format.ps1xml" -FileList='CLI.config' +FormatsToProcess="" +FileList='' RequiredAssemblies = 'Openstack.dll', 'Openstack.Common.dll' } diff --git a/License.txt b/License.txt new file mode 100644 index 0000000..c332405 --- /dev/null +++ b/License.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + diff --git a/OpenStack-CLI.sln b/OpenStack-CLI.sln new file mode 100644 index 0000000..644420a --- /dev/null +++ b/OpenStack-CLI.sln @@ -0,0 +1,98 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Client.Powershell", "Openstack.Client.Powershell\Openstack.Client.Powershell.csproj", "{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D4A8C690-E5E7-428B-A57C-884680BC3AF5}" + ProjectSection(SolutionItems) = preProject + .nuget\NuGet.Config = .nuget\NuGet.Config + .nuget\NuGet.exe = .nuget\NuGet.exe + .nuget\NuGet.targets = .nuget\NuGet.targets + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack", "..\openstack-sdk-dotnet\Openstack\Openstack\Openstack.csproj", "{B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HP.Openstack.Client.Powershell", "HP.Openstack.Client.Powershell\HP.Openstack.Client.Powershell.csproj", "{B6C5D486-BEDE-4E4F-8035-63B72513E4BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rackspace.Openstack.Client.Powershell", "Rackspace.Client.Powershell\Rackspace.Openstack.Client.Powershell.csproj", "{8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + TransformTool Build|Any CPU = TransformTool Build|Any CPU + TransformTool Build|Mixed Platforms = TransformTool Build|Mixed Platforms + TransformTool Build|x86 = TransformTool Build|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|x86.ActiveCfg = Debug|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Any CPU.Build.0 = Release|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|x86.ActiveCfg = Release|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Any CPU.ActiveCfg = TransformTool Build|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Any CPU.Build.0 = TransformTool Build|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Mixed Platforms.ActiveCfg = TransformTool Build|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Mixed Platforms.Build.0 = TransformTool Build|Any CPU + {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|x86.ActiveCfg = TransformTool Build|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Debug|x86.ActiveCfg = Debug|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Release|Any CPU.Build.0 = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.Release|x86.ActiveCfg = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU + {B2C92371-B62B-45A2-ADEB-EDEBEFA3A75C}.TransformTool Build|x86.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Debug|x86.ActiveCfg = Debug|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Release|Any CPU.Build.0 = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.Release|x86.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU + {B6C5D486-BEDE-4E4F-8035-63B72513E4BD}.TransformTool Build|x86.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Debug|x86.ActiveCfg = Debug|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Release|Any CPU.Build.0 = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.Release|x86.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF}.TransformTool Build|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln b/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln deleted file mode 100644 index 00ccad7..0000000 --- a/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Openstack.Client.Powershell.Deployment", "Openstack.Client.Powershell.Deployment.vdproj", "{15B40627-0EBD-4D70-A69C-F248EBD1BD36}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Client.Powershell", "..\Openstack.Client.Powershell\Openstack.Client.Powershell.csproj", "{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Common", "..\..\OpenStack-API\Openstack.Common\Openstack.Common.csproj", "{F6AF0191-F236-4C26-8C93-30D5F4D8000F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Objects", "..\..\OpenStack-API\Openstack.Objects\Openstack.Objects.csproj", "{BDCDCBF5-3467-461E-8307-E1E4E19F6532}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - TransformTool Build|Any CPU = TransformTool Build|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {15B40627-0EBD-4D70-A69C-F248EBD1BD36}.Debug|Any CPU.ActiveCfg = Debug - {15B40627-0EBD-4D70-A69C-F248EBD1BD36}.Release|Any CPU.ActiveCfg = Release - {15B40627-0EBD-4D70-A69C-F248EBD1BD36}.Release|Any CPU.Build.0 = Release - {15B40627-0EBD-4D70-A69C-F248EBD1BD36}.TransformTool Build|Any CPU.ActiveCfg = Release - {15B40627-0EBD-4D70-A69C-F248EBD1BD36}.TransformTool Build|Any CPU.Build.0 = Release - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.Release|Any CPU.Build.0 = Release|Any CPU - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Any CPU.ActiveCfg = TransformTool Build|Any CPU - {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}.TransformTool Build|Any CPU.Build.0 = TransformTool Build|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Release|Any CPU.Build.0 = Release|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU - {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Release|Any CPU.Build.0 = Release|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU - {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.vdproj b/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.vdproj deleted file mode 100644 index 7666a01..0000000 --- a/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.vdproj +++ /dev/null @@ -1,2113 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:Openstack.Client.Powershell.Deployment" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - "Entry" - { - "MsmKey" = "8:_0108F045584E4F02A9CCFCDE41A4E5FE" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_120E86A2F6B2FBF01D5CEFF23BBDADCB" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_120E86A2F6B2FBF01D5CEFF23BBDADCB" - "OwnerKey" = "8:_5D4A130C7710F31397E77392A962A7F0" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_1616F6BD5055B800012A605247B5AC50" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_1616F6BD5055B800012A605247B5AC50" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_24CC4C4F721736ECA4CACDE2E868F356" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_479B6CE5D32F47CA87619917C183495B" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_49A73026F0385BCD8B6C8BC1FCA3171E" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_49A73026F0385BCD8B6C8BC1FCA3171E" - "OwnerKey" = "8:_24CC4C4F721736ECA4CACDE2E868F356" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_BE0AA97B689F435A66973DA8C0B3FBAB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_5C67CA7D250FDE6BD6EB3DA026C9E609" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_F5C81E04F66151DF6C7146E2A19F58A3" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "OwnerKey" = "8:_80CCC200D3BB534007550DEE28117657" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5C67CA7D250FDE6BD6EB3DA026C9E609" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5D4A130C7710F31397E77392A962A7F0" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5D4A130C7710F31397E77392A962A7F0" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_6A1D92BBE10E490E97DB380F836A3C37" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_7786D558494C6E31096187EFF5280365" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_7AD1F39B117F45F79449D2071C2360FD" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_7FA0CE0FB8FE981205AE4444F9483D40" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_80CCC200D3BB534007550DEE28117657" - "OwnerKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_80CCC200D3BB534007550DEE28117657" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8D280F1E4F5E2F1754505609323472F5" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8D280F1E4F5E2F1754505609323472F5" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B033ABE13B0544B4BCCC0519C661931A" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BE0AA97B689F435A66973DA8C0B3FBAB" - "OwnerKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BE0AA97B689F435A66973DA8C0B3FBAB" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BE0AA97B689F435A66973DA8C0B3FBAB" - "OwnerKey" = "8:_5C67CA7D250FDE6BD6EB3DA026C9E609" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BFB9B3022A6C8D9EDBA57B89058FDFBD" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_CC23A57E743BD96D8C406B703A8E74D6" - "OwnerKey" = "8:_5D4A130C7710F31397E77392A962A7F0" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_CC23A57E743BD96D8C406B703A8E74D6" - "OwnerKey" = "8:_7FA0CE0FB8FE981205AE4444F9483D40" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_CC23A57E743BD96D8C406B703A8E74D6" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_CC23A57E743BD96D8C406B703A8E74D6" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_DB2FE965FC8553215481813D77FE917A" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_DB2FE965FC8553215481813D77FE917A" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "OwnerKey" = "8:_5C67CA7D250FDE6BD6EB3DA026C9E609" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_E4B6908BAA2642AAA608ECBDB527B9DF" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_ED9653262D774E91943C82410BCE16F4" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_EEDE127153874226B3B4F0346775DC9E" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F5101F37851EA659C1D69BDAB446D70A" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F5101F37851EA659C1D69BDAB446D70A" - "OwnerKey" = "8:_24CC4C4F721736ECA4CACDE2E868F356" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F5C81E04F66151DF6C7146E2A19F58A3" - "OwnerKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F5C81E04F66151DF6C7146E2A19F58A3" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F9DA14B8181D4D1C81A5633A05CC0CD8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_BFB9B3022A6C8D9EDBA57B89058FDFBD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_1616F6BD5055B800012A605247B5AC50" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7FA0CE0FB8FE981205AE4444F9483D40" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_24CC4C4F721736ECA4CACDE2E868F356" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7786D558494C6E31096187EFF5280365" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5D4A130C7710F31397E77392A962A7F0" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_CC23A57E743BD96D8C406B703A8E74D6" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DB2FE965FC8553215481813D77FE917A" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_49A73026F0385BCD8B6C8BC1FCA3171E" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5C67CA7D250FDE6BD6EB3DA026C9E609" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DFC25003A292366E800AA9D1F1B718AE" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F5C81E04F66151DF6C7146E2A19F58A3" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_80CCC200D3BB534007550DEE28117657" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_BE0AA97B689F435A66973DA8C0B3FBAB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_4B1457626EF021E89B30C19C1E508BE7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F5101F37851EA659C1D69BDAB446D70A" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_8D280F1E4F5E2F1754505609323472F5" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_120E86A2F6B2FBF01D5CEFF23BBDADCB" - "MsmSig" = "8:_UNDEFINED" - } - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:Release\\Openstack.Powershell.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0" - { - "Name" = "8:Microsoft .NET Framework 4 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.0" - } - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1" - { - "Name" = "8:Windows Installer 3.1" - "ProductCode" = "8:Microsoft.Windows.Installer.3.1" - } - } - } - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\Openstack.Powershell.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client" - { - "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client" - } - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1" - { - "Name" = "8:Windows Installer 3.1" - "ProductCode" = "8:Microsoft.Windows.Installer.3.1" - } - } - } - } - } - "Deployable" - { - "CustomAction" - { - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_55054CFFC25E4C08AE74A7A094EFAD6C" - { - "Name" = "8:.NET Framework" - "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:.NETFramework,Version=v4.0,Profile=Client" - "AllowLaterVersions" = "11:FALSE" - "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=131000" - } - } - } - "File" - { - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_0108F045584E4F02A9CCFCDE41A4E5FE" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\License.rtf" - "TargetName" = "8:License.rtf" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_120E86A2F6B2FBF01D5CEFF23BBDADCB" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_120E86A2F6B2FBF01D5CEFF23BBDADCB" - { - "Name" = "8:Newtonsoft.Json.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Newtonsoft.Json.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_1616F6BD5055B800012A605247B5AC50" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:TRUE" - "AssemblyAsmDisplayName" = "8:System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_1616F6BD5055B800012A605247B5AC50" - { - "Name" = "8:System.Management.Automation.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Management.Automation.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_24CC4C4F721736ECA4CACDE2E868F356" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Data.OData, Version=4.99.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_24CC4C4F721736ECA4CACDE2E868F356" - { - "Name" = "8:System.Data.OData.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Data.OData.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_479B6CE5D32F47CA87619917C183495B" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\Microsoft.PowerShell_profile.ps1" - "TargetName" = "8:Microsoft.PowerShell_profile.ps1" - "Tag" = "8:" - "Folder" = "8:_B2A2973E3B55492CB13E4038783D9DC1" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_49A73026F0385BCD8B6C8BC1FCA3171E" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.Data.Spatial, Version=4.99.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_49A73026F0385BCD8B6C8BC1FCA3171E" - { - "Name" = "8:Microsoft.Data.Spatial.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.Data.Spatial.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4B1457626EF021E89B30C19C1E508BE7" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.Server.Common, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_4B1457626EF021E89B30C19C1E508BE7" - { - "Name" = "8:Microsoft.Server.Common.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.Server.Common.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5C67CA7D250FDE6BD6EB3DA026C9E609" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.ApplicationServer.HttpEnhancements, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_5C67CA7D250FDE6BD6EB3DA026C9E609" - { - "Name" = "8:Microsoft.ApplicationServer.HttpEnhancements.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.ApplicationServer.HttpEnhancements.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5D4A130C7710F31397E77392A962A7F0" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_5D4A130C7710F31397E77392A962A7F0" - { - "Name" = "8:System.Net.Http.Formatting.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Net.Http.Formatting.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6A1D92BBE10E490E97DB380F836A3C37" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\CLI.config" - "TargetName" = "8:CLI.config" - "Tag" = "8:" - "Folder" = "8:_87CD8629B7FC462E931E315AFD4D0AED" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7786D558494C6E31096187EFF5280365" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Openstack.Objects, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_7786D558494C6E31096187EFF5280365" - { - "Name" = "8:Openstack.Objects.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Openstack.Objects.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7AD1F39B117F45F79449D2071C2360FD" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\OpenstackShell.format.ps1xml" - "TargetName" = "8:OpenstackShell.format.ps1xml" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7FA0CE0FB8FE981205AE4444F9483D40" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_7FA0CE0FB8FE981205AE4444F9483D40" - { - "Name" = "8:System.Net.Http.WebRequest.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Net.Http.WebRequest.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_80CCC200D3BB534007550DEE28117657" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.Runtime.Serialization.Internal, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_80CCC200D3BB534007550DEE28117657" - { - "Name" = "8:Microsoft.Runtime.Serialization.Internal.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.Runtime.Serialization.Internal.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8D280F1E4F5E2F1754505609323472F5" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BouncyCastle.Crypto, Version=1.7.4137.9688, Culture=neutral, PublicKeyToken=a4292a325f69b123, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_8D280F1E4F5E2F1754505609323472F5" - { - "Name" = "8:BouncyCastle.Crypto.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:BouncyCastle.Crypto.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B033ABE13B0544B4BCCC0519C661931A" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\CredentialList.xml" - "TargetName" = "8:CredentialList.xml" - "Tag" = "8:" - "Folder" = "8:_87CD8629B7FC462E931E315AFD4D0AED" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BE0AA97B689F435A66973DA8C0B3FBAB" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.Json, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_BE0AA97B689F435A66973DA8C0B3FBAB" - { - "Name" = "8:Microsoft.Json.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.Json.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BFB9B3022A6C8D9EDBA57B89058FDFBD" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:TRUE" - "AssemblyAsmDisplayName" = "8:AWSSDK, Version=1.5.12.1, Culture=neutral, PublicKeyToken=cd2d24cd2bace800, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_BFB9B3022A6C8D9EDBA57B89058FDFBD" - { - "Name" = "8:AWSSDK.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:AWSSDK.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CC23A57E743BD96D8C406B703A8E74D6" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_CC23A57E743BD96D8C406B703A8E74D6" - { - "Name" = "8:System.Net.Http.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Net.Http.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DB2FE965FC8553215481813D77FE917A" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Openstack.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_DB2FE965FC8553215481813D77FE917A" - { - "Name" = "8:Openstack.Common.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Openstack.Common.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DFC25003A292366E800AA9D1F1B718AE" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.ApplicationServer.Http, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_DFC25003A292366E800AA9D1F1B718AE" - { - "Name" = "8:Microsoft.ApplicationServer.Http.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.ApplicationServer.Http.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E4B6908BAA2642AAA608ECBDB527B9DF" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\CLIManifest.psd1" - "TargetName" = "8:CLIManifest.psd1" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_ED9653262D774E91943C82410BCE16F4" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\powershell.exe.config" - "TargetName" = "8:powershell.exe.config" - "Tag" = "8:" - "Folder" = "8:_F947D145E9E04E8DBF01747FA4838FDB" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_EEDE127153874226B3B4F0346775DC9E" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\Deployment\\Openstack.Client.Powershell.dll-Help.xml" - "TargetName" = "8:Openstack.Client.Powershell.dll-Help.xml" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F5101F37851EA659C1D69BDAB446D70A" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:EntityDataModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_F5101F37851EA659C1D69BDAB446D70A" - { - "Name" = "8:EntityDataModel.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:EntityDataModel.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F5C81E04F66151DF6C7146E2A19F58A3" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.ServiceModel.Internal, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_F5C81E04F66151DF6C7146E2A19F58A3" - { - "Name" = "8:Microsoft.ServiceModel.Internal.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Microsoft.ServiceModel.Internal.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - } - "FileType" - { - } - "Folder" - { - "{1525181F-901A-416C-8A58-119130FE478E}:_28CA19A0A44B47C5A21339D3570393EE" - { - "Name" = "8:#1914" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:SystemFolder" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_3DB17BBC7838478888F8E5A3B2DBF500" - { - "Name" = "8:WindowsPowershell" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_EB610A086BAB4DD0979BC27CA5A31095" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_F947D145E9E04E8DBF01747FA4838FDB" - { - "Name" = "8:v1.0" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_82756904F8184708B194388C789F6755" - "Folders" - { - } - } - } - } - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_4E2D7BB09B38459BA1EC96A972F5D5B3" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_A189E1C570CF48C48417696154535108" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - { - "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_CE8B4D10528A4EA487A61D155B873CCC" - { - "Name" = "8:#1918" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:PersonalFolder" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_87CD8629B7FC462E931E315AFD4D0AED" - { - "Name" = "8:OS" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_DFAC1AF0966D4E2A8E58D73A830ACC02" - "Folders" - { - } - } - "{9EF0B969-E518-4E46-987F-47570745A589}:_B2A2973E3B55492CB13E4038783D9DC1" - { - "Name" = "8:WindowsPowerShell" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_DDD4E7ACA6854964A6C172AF00694CD9" - "Folders" - { - } - } - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:Openstack-Powershell" - "ProductCode" = "8:{C18DFE3F-A1BA-4198-BFE4-D1B68C770E5D}" - "PackageCode" = "8:{33DFB56F-B04A-43E3-8841-6BBB1B71CDD5}" - "UpgradeCode" = "8:{C641E061-8F30-4D37-A138-F60C1E7CBFCC}" - "AspNetVersion" = "8:4.0.30319.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:FALSE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.0" - "Manufacturer" = "8:OpenStack" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:" - "Title" = "8:OpenStack Powershell Installation" - "Subject" = "8:" - "ARPCONTACT" = "8:Travis Plummer" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:" - "ARPURLINFOABOUT" = "8:https://www.openstack.org" - "ARPPRODUCTICON" = "8:" - "ARPIconIndex" = "3:0" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:0" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_577AC17166584F428E1BFBA6C2E8D662" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D90EB64DA3BE4D06B2FA4FF0B411F23B" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D62C6F0F1552497083B13D6DEF4B1C14" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1FB3CD672F294ECCACBDDABCF5295401" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - } - "UserInterface" - { - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_12A236C0C68E43D1955A02A2DF4107FB" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_3DBCB751BE954AE88D0D991FA4F51981" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_226596825242492183DA2072044D1A0E" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F31B30656D594A8F94C14F4E9DADCF53" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_3E74C822BC8D4C84BA6885E2B2860738" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_10F0A2B3D563447E901F553D3ED2F6DE" - { - "Sequence" = "3:210" - "DisplayName" = "8:License Agreement" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdLicenseDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "EulaText" - { - "Name" = "8:EulaText" - "DisplayName" = "8:#1008" - "Description" = "8:#1108" - "Type" = "3:6" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:2" - "Value" = "8:_0108F045584E4F02A9CCFCDE41A4E5FE" - "UsePlugInResources" = "11:TRUE" - } - "Sunken" - { - "Name" = "8:Sunken" - "DisplayName" = "8:#1007" - "Description" = "8:#1107" - "Type" = "3:5" - "ContextData" = "8:4;True=4;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:4" - "DefaultValue" = "3:4" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5AC05D021DC14E26B740EC1406672FDF" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_732B9DFF89134E46938093AA7904D6FD" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_DB577EB87E544C34933A2734BFA8A34F" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "InstallAllUsersVisible" - { - "Name" = "8:InstallAllUsersVisible" - "DisplayName" = "8:#1059" - "Description" = "8:#1159" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5120F5A6901944D2A802D7B6E26FC35E" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5CA3F491F3AD4AFC8B6C5362C82EB6D3" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7967898D916B46CCAE9CF7029B7DB728" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7BC7357CB94246999E4A8E2C16DC4EEF" - { - "Sequence" = "3:210" - "DisplayName" = "8:License Agreement" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminLicenseDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "EulaText" - { - "Name" = "8:EulaText" - "DisplayName" = "8:#1008" - "Description" = "8:#1108" - "Type" = "3:6" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:2" - "Value" = "8:_0108F045584E4F02A9CCFCDE41A4E5FE" - "UsePlugInResources" = "11:TRUE" - } - "Sunken" - { - "Name" = "8:Sunken" - "DisplayName" = "8:#1007" - "Description" = "8:#1107" - "Type" = "3:5" - "ContextData" = "8:4;True=4;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:4" - "DefaultValue" = "3:4" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_84B43E40F6BE493AA4AE1C1297A80910" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_944ACD4C1BE94CE29D115EFDC74C889D" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9EDC9C21078E4EE4B2C489BB38666C4F" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8FD10AF1C5414862AF9E8EF6E0A0B889" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_E16E901F34954D24A8DB7E2006EFD074" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_F932E58FA3164F338D979A893086D0A7" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_137D78E425F947ABAA4948884266A8A9" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_0C4093C3ABCB4881933B1E9DB5608D72" - { - "SourcePath" = "8:" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:XmlSerializer" - "OutputProjectGuid" = "8:{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_43DC30A840684F04BCFF32121E1ECFAF" - { - "SourcePath" = "8:" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:ContentFiles" - "OutputProjectGuid" = "8:{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_7CBBD5AF8E1641BC9A8E33B94C43F736" - { - "SourcePath" = "8:" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:Documentation" - "OutputProjectGuid" = "8:{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D44F1A855DE64E3295938B778445F161" - { - "SourcePath" = "8:" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:LocalizedResourceDlls" - "OutputProjectGuid" = "8:{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F9DA14B8181D4D1C81A5633A05CC0CD8" - { - "SourcePath" = "8:..\\Openstack.Client.Powershell\\obj\\Debug\\Openstack.Client.Powershell.dll" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CA25B11EEB9B4EAE95BE65E3A7F5E7EA" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:Built" - "OutputProjectGuid" = "8:{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - } - } -} diff --git a/Openstack.Client.Powershell/BaseNavigationCmdletProvider.cs b/Openstack.Client.Powershell/BaseNavigationCmdletProvider.cs index 3d2567f..c277db7 100644 --- a/Openstack.Client.Powershell/BaseNavigationCmdletProvider.cs +++ b/Openstack.Client.Powershell/BaseNavigationCmdletProvider.cs @@ -16,46 +16,43 @@ limitations under the License. using System; using System.Management.Automation; using System.Management.Automation.Provider; -using Openstack; +using OpenStack; using System.Xml.Serialization; using System.Xml; using System.IO; using System.Text; using System.Runtime.Serialization.Json; -using Openstack.Client.Powershell.Providers.Storage; +using OpenStack.Client.Powershell.Providers.Storage; using System.Reflection; using System.Xml.Linq; using System.Xml.XPath; using System.Threading; -using Openstack.Client.Powershell.Utility; -using Openstack.Storage; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Storage; using System.Security; using System.Linq; -using Openstack.Identity; +using OpenStack.Identity; -namespace Openstack.Client.Powershell.Providers.Common +namespace OpenStack.Client.Powershell.Providers.Common { public class BaseNavigationCmdletProvider : NavigationCmdletProvider - { - - OpenstackClient _client; // = new OpenstackClient(credential, CancellationToken.None); - - + { + OpenStackClient _client; //========================================================================================= /// /// /// //========================================================================================= - protected OpenstackClient Client + protected OpenStackClient Client { get - { - return (OpenstackClient)this.SessionState.PSVariable.Get("Client").Value; + { + return (OpenStackClient)this.SessionState.PSVariable.Get("CoreClient").Value; } set { - this.SessionState.PSVariable.Set(new PSVariable("Client", value)); + this.SessionState.PSVariable.Set(new PSVariable("CoreClient", value)); } } //========================================================================================= @@ -115,7 +112,7 @@ namespace Openstack.Client.Powershell.Providers.Common } catch (Exception) { - return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; + return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; } } } @@ -139,27 +136,27 @@ namespace Openstack.Client.Powershell.Providers.Common /// //================================================================================================== protected void InitializeSession() - { - CredentialManager manager = new CredentialManager(false); - IOpenstackCredential credential = manager.GetCredentials(false); + { + ConfigurationManager configManager = new ConfigurationManager(); + ExtensionManager loader = new ExtensionManager(this.SessionState, this.Context); + configManager.Load(); + ServiceProvider provider = configManager.GetDefaultServiceProvider(); - // Connect to the Service Provider.. - - var client = new OpenstackClient(credential, CancellationToken.None); - var connectTask = client.Connect(); - connectTask.Wait(); - - // Setup the environment based on what came back from Auth.. + if (provider.Name == String.Empty && provider.IsDefault == true) + { + // Technically Core is already loaded (you're in it :) but this signs in for you to the ServiceProvider selected.. + // This is just used in the case where it's the Users first time loading the CLI.. - Context context = new Context(); - context.ServiceCatalog = credential.ServiceCatalog; - context.Settings = Settings.Default; - context.ProductName = "Openstack-WinCLI"; - context.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + loader.LoadCore(provider); + } + else + { + // Load any extensions that were supplied by the ServiceProvider... - this.SessionState.PSVariable.Set(new PSVariable("Context", context)); - this.SessionState.PSVariable.Set(new PSVariable("Client", client)); - this.SetZoneColor(); + loader.LoadExtension(provider); + } + + this.SetZoneColor(); } #region Implementation of DriveCmdletProvider //================================================================================================== @@ -221,8 +218,7 @@ namespace Openstack.Client.Powershell.Providers.Common { return true; } - #endregion - + #endregion //================================================================================================== /// /// This test should not verify the existance of the item at the path. diff --git a/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs index 826e6be..f5d9eb4 100644 --- a/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs @@ -16,24 +16,24 @@ //using System; //using System.Text; //using System.Management.Automation; -//using Openstack.Objects.DataAccess; +//using OpenStack.Objects.DataAccess; //using System.IO; -//using Openstack.Common.Properties; +//using OpenStack.Common.Properties; //using System.Xml; //using System.Xml.Serialization; -//using Openstack.Client.Powershell.Providers.Storage; -//using Openstack.Objects.Domain; -//using Openstack.Objects.Utility; -//using Openstack.Client.Powershell.Providers.Common; +//using OpenStack.Client.Powershell.Providers.Storage; +//using OpenStack.Objects.Domain; +//using OpenStack.Objects.Utility; +//using OpenStack.Client.Powershell.Providers.Common; //using System.Linq; //using System.Collections.ObjectModel; //using System.Management.Automation.Host; -//namespace Openstack.Client.Powershell.Cmdlets.Common +//namespace OpenStack.Client.Powershell.Cmdlets.Common //{ // public class BasePSCmdlet : PSCmdlet // { -// private Openstack.Objects.DataAccess.ResponseFormat _responseFormat = ResponseFormat.none; +// private OpenStack.Objects.DataAccess.ResponseFormat _responseFormat = ResponseFormat.none; // private BaseRepositoryFactory _repositoryFactory; // #region Properties @@ -142,7 +142,7 @@ // } // catch (Exception) // { -// return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; +// return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; // } // } // } @@ -238,7 +238,7 @@ // if (isAuthorized == false && foundattribute == false) return; // if (!isAuthorized) -// this.ThrowTerminatingError(new ErrorRecord(new InvalidOperationException("You're not current authorized to use this service. Please go to https://www.Openstack.com/ for more information on signing up for this service."), "aa", ErrorCategory.InvalidOperation, this)); +// this.ThrowTerminatingError(new ErrorRecord(new InvalidOperationException("You're not current authorized to use this service. Please go to https://www.OpenStack.com/ for more information on signing up for this service."), "aa", ErrorCategory.InvalidOperation, this)); // } ////================================================================================================== ///// diff --git a/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs index dd67a1f..6979629 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs @@ -1,268 +1,263 @@ -/* ============================================================================ -Copyright 2014 Hewlett Packard +///* ============================================================================ +//Copyright 2014 Hewlett Packard -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 +//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 +// 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. -============================================================================ */ -using System; -using System.Management.Automation; -using Openstack.Common.Properties; -using System.Collections.ObjectModel; -using Openstack.Client.Powershell.Providers.Storage; -using System.Collections.Generic; -using Openstack.Objects.Domain; -using Openstack.Objects.DataAccess; -using Openstack.Objects.Domain.Admin; -using Openstack.Objects.DataAccess.Security; -using Openstack.Objects.Utility; +//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. +//============================================================================ */ +//using System; +//using System.Management.Automation; +//using System.Collections.ObjectModel; +//using OpenStack.Client.Powershell.Providers.Storage; +//using System.Collections.Generic; +//using OpenStack; -namespace Openstack.Client.Powershell.Cmdlets.Common -{ - public class BaseAuthenticationCmdlet : BasePSCmdlet - { - private string _key; - private string _value; - private SwitchParameter _reset = false; -//================================================================================================== -/// -/// -/// -//================================================================================================== - protected void InitializeSession(AuthenticationRequest request, Settings settings = null) - { - Context context = new Context(); +//namespace OpenStack.Client.Powershell.Cmdlets.Common +//{ +// public class BaseAuthenticationCmdlet : BasePSCmdlet +// { +// private string _key; +// private string _value; +// private SwitchParameter _reset = false; +////================================================================================================== +///// +///// +///// +////================================================================================================== +// protected void InitializeSession(AuthenticationRequest request, Settings settings = null) +// { +// Context context = new Context(); - if (request != null) - { - KeystoneAuthProvider authProvider = new KeystoneAuthProvider(); - AuthenticationResponse response = authProvider.Authenticate(request); +// if (request != null) +// { +// KeystoneAuthProvider authProvider = new KeystoneAuthProvider(); +// AuthenticationResponse response = authProvider.Authenticate(request); - context.ServiceCatalog = response.ServiceCatalog; - if (settings == null) - context.Settings = Settings.Default; - else - context.Settings = settings; - context.AccessToken = response.Token; +// context.ServiceCatalog = response.ServiceCatalog; +// if (settings == null) +// context.Settings = Settings.Default; +// else +// context.Settings = settings; +// context.AccessToken = response.Token; - this.SessionState.PSVariable.Set(new PSVariable("Context", context)); - this.SessionState.PSVariable.Set(new PSVariable("BaseRepositoryFactory", new BaseRepositoryFactory(context))); - } - } -//================================================================================================== -/// -/// -/// -//================================================================================================== - protected void InitializeSession(Settings settings) - { - AuthenticationRequest request = new AuthenticationRequest(new Credentials(settings.Username, settings.Password), settings.DefaultTenantId); - this.InitializeSession(request, settings); - } -//================================================================================================== -/// -/// -/// -/// -//================================================================================================== - private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo, string configFilePath) - { - List storageContainers = null; - OSDriveParameters parameters = new OSDriveParameters(); +// this.SessionState.PSVariable.Set(new PSVariable("Context", context)); +// this.SessionState.PSVariable.Set(new PSVariable("BaseRepositoryFactory", new BaseRepositoryFactory(context))); +// } +// } +////================================================================================================== +///// +///// +///// +////================================================================================================== +// protected void InitializeSession(Settings settings) +// { +// AuthenticationRequest request = new AuthenticationRequest(new Credentials(settings.Username, settings.Password), settings.DefaultTenantId); +// this.InitializeSession(request, settings); +// } +////================================================================================================== +///// +///// +///// +///// +////================================================================================================== +// private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo, string configFilePath) +// { +// List storageContainers = null; +// OSDriveParameters parameters = new OSDriveParameters(); - if (this.Settings != null) - { - parameters.Settings = this.Settings; - } - else - { - parameters.Settings = settings; - } +// if (this.Settings != null) +// { +// parameters.Settings = this.Settings; +// } +// else +// { +// parameters.Settings = settings; +// } - try - { - IContainerRepository storageContainerRepository = this.RepositoryFactory.CreateContainerRepository(); - storageContainers = storageContainerRepository.GetStorageContainers(configFilePath); - } - catch (Exception ex) - { - Console.WriteLine(ex); - } +// try +// { +// IContainerRepository storageContainerRepository = this.RepositoryFactory.CreateContainerRepository(); +// storageContainers = storageContainerRepository.GetStorageContainers(configFilePath); +// } +// catch (Exception ex) +// { +// Console.WriteLine(ex); +// } - Collection drives = new Collection(); +// Collection drives = new Collection(); - // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. +// // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. - try - { - if (storageContainers.Count > 0) - { - foreach (StorageContainer storageContainer in storageContainers) - { - PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); - OSDriveInfo kvsDriveInfo = new OSDriveInfo(driveInfo, parameters, this.Context); - try - { - drives.Add(kvsDriveInfo); - } - catch (Exception) { } - } - } - else - { - PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); - return new Collection - { - new OSDriveInfo(driveInfo, parameters, this.Context) - }; - } - } - catch (Exception) - { +// try +// { +// if (storageContainers.Count > 0) +// { +// foreach (StorageContainer storageContainer in storageContainers) +// { +// PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); +// OSDriveInfo kvsDriveInfo = new OSDriveInfo(driveInfo, parameters, this.Context); +// try +// { +// drives.Add(kvsDriveInfo); +// } +// catch (Exception) { } +// } +// } +// else +// { +// PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); +// return new Collection +// { +// new OSDriveInfo(driveInfo, parameters, this.Context) +// }; +// } +// } +// catch (Exception) +// { - } +// } - return drives; - } -//======================================================================================================= -/// -/// Removes all currently registered drives.. -/// -//======================================================================================================= - private void RemoveDrives() - { - // Remove the old Users drives first.. - - Collection deadDrives = this.SessionState.Drive.GetAllForProvider("OS-Storage"); - foreach (PSDriveInfo deadDrive in deadDrives) - { - this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); - } - } +// return drives; +// } ////======================================================================================================= ///// -///// removes only the currently registered shared drives.. +///// Removes all currently registered drives.. ///// ////======================================================================================================= -// private void RemoveSharedDrives() +// private void RemoveDrives() // { +// // Remove the old Users drives first.. + // Collection deadDrives = this.SessionState.Drive.GetAllForProvider("OS-Storage"); -// foreach (OSDriveInfo deadDrive in deadDrives) +// foreach (PSDriveInfo deadDrive in deadDrives) // { -// if (deadDrive.SharePath != null) -// this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); +// this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); // } -// } -//======================================================================================================= -/// -/// -/// -//======================================================================================================= - protected void WriteContainers(string configFilePath) - { - List invalidDriveNames = new List(); - OSDriveParameters parameters = new OSDriveParameters(); +// } +//////======================================================================================================= +/////// +/////// removes only the currently registered shared drives.. +/////// +//////======================================================================================================= +//// private void RemoveSharedDrives() +//// { +//// Collection deadDrives = this.SessionState.Drive.GetAllForProvider("OS-Storage"); +//// foreach (OSDriveInfo deadDrive in deadDrives) +//// { +//// if (deadDrive.SharePath != null) +//// this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); +//// } +//// } +////======================================================================================================= +///// +///// +///// +////======================================================================================================= +// protected void WriteContainers(string configFilePath) +// { +// List invalidDriveNames = new List(); +// OSDriveParameters parameters = new OSDriveParameters(); - // Write out the commands header information first.. +// // Write out the commands header information first.. - WriteObject(""); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("==================================================================="); - Console.ForegroundColor = ConsoleColor.Yellow; - WriteObject("Object Storage Service available. Remapping to the following drives."); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("==================================================================="); - Console.ForegroundColor = ConsoleColor.Green; - WriteObject(" "); +// WriteObject(""); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("==================================================================="); +// Console.ForegroundColor = ConsoleColor.Yellow; +// WriteObject("Object Storage Service available. Remapping to the following drives."); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("==================================================================="); +// Console.ForegroundColor = ConsoleColor.Green; +// WriteObject(" "); - HPOSNavigationProvider provider = new HPOSNavigationProvider(); - Collection drives = this.GetAvailableDrives(this.Settings, this.SessionState.Provider.GetOne("OS-Storage"), configFilePath); +// HPOSNavigationProvider provider = new HPOSNavigationProvider(); +// Collection drives = this.GetAvailableDrives(this.Settings, this.SessionState.Provider.GetOne("OS-Storage"), configFilePath); - if (drives != null) - { - this.RemoveDrives(); +// if (drives != null) +// { +// this.RemoveDrives(); - foreach (PSDriveInfo drive in drives) - { - if (drive.Name != string.Empty) - { - WriteObject("Storage Container : [" + drive.Name + "] now available."); - } +// foreach (PSDriveInfo drive in drives) +// { +// if (drive.Name != string.Empty) +// { +// WriteObject("Storage Container : [" + drive.Name + "] now available."); +// } - try - { - this.SessionState.Drive.New(drive, "local"); - } - catch (PSArgumentException ex) - { - if (drive.Name != string.Empty) - invalidDriveNames.Add(drive.Name); - } - catch (Exception) { } +// try +// { +// this.SessionState.Drive.New(drive, "local"); +// } +// catch (PSArgumentException ex) +// { +// if (drive.Name != string.Empty) +// invalidDriveNames.Add(drive.Name); +// } +// catch (Exception) { } - } - WriteObject(""); - } - else - { - // No storageContainers exist for the new credentials so make some up... +// } +// WriteObject(""); +// } +// else +// { +// // No storageContainers exist for the new credentials so make some up... - PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); - this.SessionState.Drive.New(new OSDriveInfo(driveInfo, parameters, this.Context), "local"); - } +// PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); +// this.SessionState.Drive.New(new OSDriveInfo(driveInfo, parameters, this.Context), "local"); +// } - if (invalidDriveNames.Count > 0) - { - WriteObject(""); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("================================================================="); - Console.ForegroundColor = ConsoleColor.Red; - WriteObject("Error : A subset of your Containers could not be bound to this"); - WriteObject("session due to naming conflicts with the naming standards required"); - WriteObject("for Powershell drives. These containers are listed below."); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("================================================================="); - Console.ForegroundColor = ConsoleColor.Green; - WriteObject(" "); +// if (invalidDriveNames.Count > 0) +// { +// WriteObject(""); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Red; +// WriteObject("Error : A subset of your Containers could not be bound to this"); +// WriteObject("session due to naming conflicts with the naming standards required"); +// WriteObject("for Powershell drives. These containers are listed below."); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Green; +// WriteObject(" "); - foreach (string name in invalidDriveNames) - { - WriteObject(name); - WriteObject(" "); - } - WriteObject(" "); - } - } -//======================================================================================================= -/// -/// -/// -//======================================================================================================= - protected void WriteServices() - { - WriteObject(""); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("================================================================="); - Console.ForegroundColor = ConsoleColor.Yellow; - WriteObject("Binding to new Account. New service catalog is as follows."); - Console.ForegroundColor = ConsoleColor.DarkGray; - WriteObject("================================================================="); - Console.ForegroundColor = ConsoleColor.Green; - WriteObject(" "); +// foreach (string name in invalidDriveNames) +// { +// WriteObject(name); +// WriteObject(" "); +// } +// WriteObject(" "); +// } +// } +////======================================================================================================= +///// +///// +///// +////======================================================================================================= +// protected void WriteServices() +// { +// WriteObject(""); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Yellow; +// WriteObject("Binding to new Account. New service catalog is as follows."); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Green; +// WriteObject(" "); - foreach (Service service in this.Context.ServiceCatalog) - { - WriteObject(service); - } - WriteObject(""); - } - } -} +// foreach (Service service in this.Context.ServiceCatalog) +// { +// WriteObject(service); +// } +// WriteObject(""); +// } +// } +//} diff --git a/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs index 2b6188c..625cf90 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs @@ -16,18 +16,18 @@ limitations under the License. using System; using System.Text; using System.Management.Automation; -using Openstack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Utility; using System.IO; -using Openstack.Common; +using OpenStack.Common; using System.Xml; using System.Xml.Serialization; -using Openstack.Client.Powershell.Providers.Storage; -using Openstack.Client.Powershell.Providers.Common; +using OpenStack.Client.Powershell.Providers.Storage; +using OpenStack.Client.Powershell.Providers.Common; using System.Linq; using System.Collections.ObjectModel; using System.Management.Automation.Host; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { public class BasePSCmdlet : PSCmdlet { @@ -83,15 +83,15 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //================================================================================================== - protected IOpenstackClient Client + protected IOpenStackClient CoreClient { get { - return (IOpenstackClient)this.SessionState.PSVariable.GetValue("Client", null); + return (IOpenStackClient)this.SessionState.PSVariable.GetValue("CoreClient", null); } set { - this.SessionState.PSVariable.Set(new PSVariable("Client", value)); + this.SessionState.PSVariable.Set(new PSVariable("CoreClient", value)); } } //================================================================================================== @@ -120,7 +120,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common { get { - return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; + return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; } } #endregion @@ -198,7 +198,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common //if (isAuthorized == false && foundattribute == false) return; //if (!isAuthorized) - // this.ThrowTerminatingError(new ErrorRecord(new InvalidOperationException("You're not current authorized to use this service. Please go to https://www.Openstack.com/ for more information on signing up for this service."), "aa", ErrorCategory.InvalidOperation, this)); + // this.ThrowTerminatingError(new ErrorRecord(new InvalidOperationException("You're not current authorized to use this service. Please go to https://www.OpenStack.com/ for more information on signing up for this service."), "aa", ErrorCategory.InvalidOperation, this)); } #endregion #region Methods diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs index 9bf9519..3ab03eb 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs @@ -16,12 +16,12 @@ limitations under the License. using System; using System.Management.Automation; using System.Collections; -using Openstack.Client.Powershell.Cmdlets.Common; +using OpenStack.Client.Powershell.Cmdlets.Common; using System.IO; using System.Xml; -using Openstack.Objects.Domain.Admin; +using OpenStack.Identity; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet(VerbsCommon.Get, "Catalog", SupportsShouldProcess = true)] public class GetCatalogCmdlet : BasePSCmdlet @@ -79,15 +79,15 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //======================================================================================================= - private void PrintEndpoint(Endpoint endpoint) + private void PrintEndpoint(OpenStackServiceEndpoint endpoint) { Console.WriteLine("Region : " + endpoint.Region); - Console.WriteLine("Public URL : " + endpoint.PublicURL); - Console.WriteLine("Internal URL : " + endpoint.InternalURL); - Console.WriteLine("Admin URL : " + endpoint.AdminURL); - Console.WriteLine("Version : " + endpoint.Version.Id); - Console.WriteLine("Version Info : " + endpoint.Version.InfoURL); - Console.WriteLine("Version List : " + endpoint.Version.ListURL); + Console.WriteLine("Public URL : " + endpoint.PublicUri.ToString()); + //Console.WriteLine("Internal URL : " + endpoint..InternalURL); + //Console.WriteLine("Admin URL : " + endpoint.AdminURL); + Console.WriteLine("Version : " + endpoint.Version); + //Console.WriteLine("Version Info : " + endpoint.Version.InfoURL); + //Console.WriteLine("Version List : " + endpoint.Version.ListURL); Console.WriteLine(); } //======================================================================================================= @@ -96,7 +96,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //======================================================================================================= - private void PrintServiceVerbose(Service service) + private void PrintServiceVerbose(OpenStackServiceDefinition service) { Console.WriteLine(""); this.WriteSection ("Service : " + service.Name); @@ -114,7 +114,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common Console.WriteLine(""); Console.ForegroundColor = ConsoleColor.Green; - foreach (Endpoint endpoint in service.Endpoints) + foreach (OpenStackServiceEndpoint endpoint in service.Endpoints) { this.PrintEndpoint(endpoint); } @@ -130,7 +130,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common this.WriteSection("You have access to the following Services "); WriteObject(""); - foreach (Service service in this.Context.ServiceCatalog) + foreach (OpenStackServiceDefinition service in this.Context.ServiceCatalog) { if (!_verbose) WriteObject(service); diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs index 0b94c1b..f612616 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs @@ -16,11 +16,11 @@ limitations under the License. using System; using System.Management.Automation; using System.Collections; -using Openstack.Client.Powershell.Cmdlets.Common; +using OpenStack.Client.Powershell.Cmdlets.Common; using System.IO; using System.Xml; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet(VerbsCommon.Get, "Config", SupportsShouldProcess = true)] public class GetConfigCmdlet : BasePSCmdlet @@ -57,7 +57,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common this.WriteObject("Configuration File located at " + configFilePath); WriteObject(""); - foreach (DictionaryEntry setting in this.Settings) + foreach (DictionaryEntry setting in this.Context.Settings) { if (((string)setting.Key) == "SecretKey" || ((string)setting.Key)== "AccessKey") { diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs index 6523797..68a1bf3 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs @@ -15,25 +15,26 @@ //============================================================================ */ using System; using System.Management.Automation; -using Openstack.Client.Powershell.Providers.Common; +using OpenStack.Client.Powershell.Providers.Common; using System.Security.Cryptography; using System.Text; using System.Web; -using Openstack; +using OpenStack; using System.Xml.Linq; using System.Collections.Generic; -using Openstack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Utility; using System.Linq; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet(VerbsCommon.Get, "SP", SupportsShouldProcess = true)] - //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)] + //[RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] public class GetServiceProvidersCmdlet : BasePSCmdlet { #region Parameters #endregion #region Methods + //========================================================================================= /// /// @@ -41,22 +42,9 @@ namespace Openstack.Client.Powershell.Cmdlets.Common //========================================================================================= protected override void ProcessRecord() { - List serviceProviders = new List(); - XDocument doc = XDocument.Load(this.ConfigFilePath); - IEnumerable serviceProviderNodes = doc.Descendants("ServiceProvider"); - - foreach (XElement element in serviceProviderNodes) - { - ServiceProvider provider = new ServiceProvider(); - provider.AuthenticationServiceURI = element.Elements().Where(e => e.Attribute("key").Value == "AuthenticationServiceURI").Attributes("value").Single().Value; - provider.DefaultTenantId = element.Elements().Where(e => e.Attribute("key").Value == "DefaultTenantId").Attributes("value").Single().Value; - provider.Username = element.Elements().Where(e => e.Attribute("key").Value == "Username").Attributes("value").Single().Value; - provider.IsDefault = Convert.ToBoolean(element.Attribute("isDefault").Value); - provider.Name = element.Attribute("name").Value; - - serviceProviders.Add(provider); - } - this.WriteObject(serviceProviders); + ConfigurationManager manager = new ConfigurationManager(); + manager.Load(); + this.WriteObject(manager.GetServiceProviders()); } #endregion } diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs index fafaac4..a07bdb6 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs @@ -15,11 +15,11 @@ limitations under the License. ============================================================================ */ using System; using System.Management.Automation; -using Openstack.Client.Powershell.Cmdlets.Common; +using OpenStack.Client.Powershell.Cmdlets.Common; using System.Reflection; -using Openstack.Client.Powershell.Providers.Common; +using OpenStack.Client.Powershell.Providers.Common; -namespace Openstack.Client.Powershell.Cmdlets.GroupManagement +namespace OpenStack.Client.Powershell.Cmdlets.GroupManagement { [Cmdlet(VerbsCommon.Get, "Version", SupportsShouldProcess = true)] public class GetVersionCmdlet : BasePSCmdlet diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs index 8be0e06..1fef173 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs @@ -17,12 +17,12 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; -using Openstack.Client.Powershell.Cmdlets.Common; +using OpenStack.Client.Powershell.Cmdlets.Common; using System.Management.Automation; using System.Xml.Linq; using System.Xml.XPath; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet("Get", "Zone", SupportsShouldProcess = true)] public class GetZoneCmdlet : BasePSCmdlet diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs index d53784b..f8d937d 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs @@ -17,18 +17,17 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; -using Openstack.Client.Powershell.Cmdlets.Common; +using OpenStack.Client.Powershell.Cmdlets.Common; using System.Management.Automation; using System.Xml.Linq; using System.Xml.XPath; -using Openstack.Objects.Domain.Admin; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet("Get", "Zones", SupportsShouldProcess = true)] public class GetZonesCmdlet : BasePSCmdlet { - private SwitchParameter _verbose = false; + private SwitchParameter _verbose = true; //========================================================================================= /// @@ -60,7 +59,7 @@ namespace Openstack.Client.Powershell.Cmdlets.Common Console.WriteLine(""); Console.WriteLine("The following Services are available from this Availability Zone"); Console.WriteLine("----------------------------------------------------------------"); - this.WriteObject(this.Context.ServiceCatalog.GetAZServices(element.Attribute("name").Value)); + this.WriteObject(this.Context.ServiceCatalog.GetServicesInAvailabilityZone(element.Attribute("name").Value)); Console.WriteLine(""); } Console.WriteLine(""); @@ -72,24 +71,24 @@ namespace Openstack.Client.Powershell.Cmdlets.Common //========================================================================================= private void ShowNonVerboseOutput(IEnumerable zoneKeyNode) { - Console.WriteLine(""); - Console.WriteLine("Current Availability Zones include "); - Console.WriteLine(""); - foreach (XElement element in zoneKeyNode) - { - Zone zone = new Zone(); - zone.Name = element.Attribute("name").Value; - zone.ShellForegroundColor = element.Attribute("shellForegroundColor").Value; - zone.Id = element.Attribute("id").Value; + //Console.WriteLine(""); + //Console.WriteLine("Current Availability Zones include "); + //Console.WriteLine(""); + //foreach (XElement element in zoneKeyNode) + //{ + // Zone zone = new Zone(); + // zone.Name = element.Attribute("name").Value; + // zone.ShellForegroundColor = element.Attribute("shellForegroundColor").Value; + // zone.Id = element.Attribute("id").Value; - if (element.Attribute("isDefault").Value == "True") - zone.IsDefault = true; - else - zone.IsDefault = false; + // if (element.Attribute("isDefault").Value == "True") + // zone.IsDefault = true; + // else + // zone.IsDefault = false; - this.WriteObject(zone); - } - Console.WriteLine(""); + // this.WriteObject(zone); + //} + //Console.WriteLine(""); } //========================================================================================= /// diff --git a/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs b/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProviderCmdlet.cs similarity index 97% rename from Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs rename to Openstack.Client.Powershell/Cmdlets/Common/NewServiceProviderCmdlet.cs index 0bddfc2..8549bca 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProviderCmdlet.cs @@ -16,13 +16,13 @@ using System.Management.Automation; using System.Xml.Linq; using System.Collections.Generic; -using Openstack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Utility; using System.Xml.XPath; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet(VerbsCommon.New, "SP", SupportsShouldProcess = true)] - //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)] + //[RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] public class NewServiceProvidersCmdlet : BasePSCmdlet { diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs index bd17be2..2f37d27 100644 --- a/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs @@ -17,21 +17,25 @@ using System; using System.Collections.Generic; using System.Management.Automation; using System.Xml.Linq; -using Openstack.Common.Properties; -using Openstack.Objects.Domain; +using System.Linq; +using OpenStack; using System.Xml.XPath; -using Openstack.Objects.DataAccess; -using Openstack.Objects.Utility; -using Openstack.Client.Powershell.Providers.Common; +using OpenStack.Client.Powershell.Providers.Common; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Identity; +using OpenStack.Client.Powershell.Providers.Storage; +using OpenStack.Storage; +using System.Threading.Tasks; +using System.Collections.ObjectModel; -namespace Openstack.Client.Powershell.Cmdlets.Common +namespace OpenStack.Client.Powershell.Cmdlets.Common { [Cmdlet(VerbsCommon.Set, "Config", SupportsShouldProcess = true)] - public class SetConfigCmdlet : BaseAuthenticationCmdlet + public class SetConfigCmdlet : BasePSCmdlet { private string _key; private string _value; - private string _configFilePath = null; + private string _configFilePath = @"C:\Users\tplummer\Source\Repos\OpenStack-NewCLI\Rackspace.Client.Powershell\Deployment\Rackspace.config"; private SwitchParameter _reset = false; private string _oldAccessKey; @@ -41,20 +45,20 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //========================================================================================= - [Parameter(Position = 1, Mandatory = false, ParameterSetName = "sc3", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] - [Alias("resetcfg")] - [ValidateNotNullOrEmpty] - public SwitchParameter Reset - { - get { return _reset; } - set { _reset = value; } - } + //[Parameter(Position = 1, Mandatory = false, ParameterSetName = "sc3", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] + //[Alias("resetcfg")] + //[ValidateNotNullOrEmpty] + //public SwitchParameter Reset + //{ + // get { return _reset; } + // set { _reset = value; } + //} //========================================================================================= /// /// /// //========================================================================================= - [Parameter(Position = 1, Mandatory = true, ParameterSetName = "sc4", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] + [Parameter(Position = 1, Mandatory = false, ParameterSetName = "sc4", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] [Alias("s")] [ValidateNotNullOrEmpty] public string ConfigFilePathKey @@ -67,48 +71,241 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //========================================================================================= - [Parameter(Position = 1, Mandatory = true, ParameterSetName = "sc", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] - [Alias("k")] - [ValidateNotNullOrEmpty] - public string Key - { - get { return _key; } - set { _key = value; } - } + //[Parameter(Position = 1, Mandatory = true, ParameterSetName = "sc", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] + //[Alias("k")] + //[ValidateNotNullOrEmpty] + //public string Key + //{ + // get { return _key; } + // set { _key = value; } + //} //========================================================================================= /// /// /// //========================================================================================= - [Parameter(Position = 2, Mandatory = true, ParameterSetName = "sc", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] - [Alias("v")] - [ValidateNotNullOrEmpty] - public string Value - { - get { return _value; } - set { _value = value; } - } + //[Parameter(Position = 2, Mandatory = true, ParameterSetName = "sc", ValueFromPipelineByPropertyName = true, HelpMessage = "s")] + //[Alias("v")] + //[ValidateNotNullOrEmpty] + //public string Value + //{ + // get { return _value; } + // set { _value = value; } + //} #endregion //======================================================================================================= /// /// /// //======================================================================================================= + protected void WriteServices() + { + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Yellow; + WriteObject("Binding to new Account. New service catalog is as follows."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + foreach (OpenStackServiceDefinition service in this.Context.ServiceCatalog) + { + WriteObject(service); + } + WriteObject(""); + } +//======================================================================================================= +/// +/// +/// +//=================================================zx====================================================== private void LoadConfigFile() - { - this.InitializeSession(Settings.Default); + { + ConfigurationManager configManager = new ConfigurationManager(); + configManager.Load(this.ConfigFilePathKey); + ServiceProvider provider = configManager.GetDefaultServiceProvider(); + + ExtensionManager loader = new ExtensionManager(this.SessionState, this.Context); + + loader.LoadCore(provider); + loader.LoadExtension(provider); // Show the User the new ServiceCatalog that we just received.. this.WriteServices(); - // If ObjectStorage is among those new Services, show the new Container set bound to those credentials.. + // If ObjectStorage is among those new Services, show the new Container set bound to those credentials.. - if (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage")) + if (this.Context.ServiceCatalog.Exists("Object Storage")) { this.WriteContainers(_configFilePath); } } +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo) //, string configFilePath) + { + List storageContainers = null; + OSDriveParameters parameters = new OSDriveParameters(); + + if (this.Context.Settings != null) + { + parameters.Settings = this.Context.Settings; + } + else + { + parameters.Settings = settings; + } + + try + { + Task> getContainersTask = this.CoreClient.CreateServiceClient().ListStorageContainers(); + getContainersTask.Wait(); + storageContainers = getContainersTask.Result.ToList(); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + + Collection drives = new Collection(); + + // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. + + try + { + string publicStoreUrl = this.Context.ServiceCatalog.GetPublicEndpoint("Object Storage", "region-a.geo-1").ToString(); + + if (storageContainers.Count > 0) + { + foreach (StorageContainer storageContainer in storageContainers) + { + PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); + OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl); + try + { + drives.Add(kvsDriveInfo); + } + catch (Exception) { } + } + } + else + { + PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); + return new Collection + { + new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl) + }; + } + } + catch (Exception ex) + { + int g = 7; + } + + return drives; + } +//======================================================================================================= +/// +/// Removes all currently registered drives.. +/// +//======================================================================================================= + private void RemoveDrives() + { + // Remove the old Users drives first.. + + Collection deadDrives = this.SessionState.Drive.GetAllForProvider("Object Storage"); + foreach (PSDriveInfo deadDrive in deadDrives) + { + this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); + } + } +//======================================================================================================= +/// +/// +/// +//======================================================================================================= + protected void WriteContainers(string configFilePath) + { + List invalidDriveNames = new List(); + OSDriveParameters parameters = new OSDriveParameters(); + + // Write out the commands header information first.. + + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("==================================================================="); + Console.ForegroundColor = ConsoleColor.Yellow; + WriteObject("Object Storage Service available. Remapping to the following drives."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("==================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + HPOSNavigationProvider provider = new HPOSNavigationProvider(); + Collection drives = this.GetAvailableDrives(this.Context.Settings, this.SessionState.Provider.GetOne("Object Storage")); + + if (drives != null) + { + this.RemoveDrives(); + + foreach (PSDriveInfo drive in drives) + { + if (drive.Name != string.Empty) + { + WriteObject("Storage Container : [" + drive.Name + "] now available."); + } + + try + { + this.SessionState.Drive.New(drive, "local"); + } + catch (PSArgumentException ex) + { + if (drive.Name != string.Empty) + invalidDriveNames.Add(drive.Name); + } + catch (Exception) { } + + } + WriteObject(""); + } + else + { + // No storageContainers exist for the new credentials so make some up... + + //PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); + //this.SessionState.Drive.New(new OSDriveInfo(driveInfo, parameters, this.Context), "local"); + } + + if (invalidDriveNames.Count > 0) + { + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Red; + WriteObject("Error : A subset of your Containers could not be bound to this"); + WriteObject("session due to naming conflicts with the naming standards required"); + WriteObject("for Powershell drives. These containers are listed below."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + foreach (string name in invalidDriveNames) + { + WriteObject(name); + WriteObject(" "); + } + WriteObject(" "); + } + } //====================================================================================================================== /// /// @@ -138,41 +335,41 @@ namespace Openstack.Client.Powershell.Cmdlets.Common /// /// //======================================================================================================= - private void LoadConfigFile(string configFilePath) - { - this.Settings = Settings.LoadConfig(configFilePath); - this.Context.Settings = this.Settings; - this.Context = this.Context; + //private void LoadConfigFile(string configFilePath) + //{ + // this.Settings = Settings.LoadConfig(configFilePath); + // this.Context.Settings = this.Settings; + // this.Context = this.Context; - // We need to ensure that the Users new identity doesn't alter the list bof available storageContainers. If so, just deal with it.. + // // We need to ensure that the Users new identity doesn't alter the list bof available storageContainers. If so, just deal with it.. - if (_oldAccessKey != this.Settings.Username) - { - this.InitializeSession(this.Settings); + // if (_oldAccessKey != this.Settings.Username) + // { + // this.InitializeSession(this.Settings); - // Show the User the new ServiceCatalog that we just received.. + // // Show the User the new ServiceCatalog that we just received.. - this.WriteServices(); + // this.WriteServices(); - // If ObjectStorage is among those new Services, show the new Container set bound to those credentials.. + // // If ObjectStorage is among those new Services, show the new Container set bound to those credentials.. - if (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage")) - { - this.WriteContainers(_configFilePath); - } + // if (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage")) + // { + // this.WriteContainers(_configFilePath); + // } - if (this.Drive.Name == "OpenStack") - { - this.SessionState.InvokeCommand.InvokeScript(@"cd\"); - ((CommonDriveInfo)this.Drive).CurrentContainer.Load(); - } + // if (this.Drive.Name == "OpenStack") + // { + // this.SessionState.InvokeCommand.InvokeScript(@"cd\"); + // ((CommonDriveInfo)this.Drive).CurrentContainer.Load(); + // } - this.SessionState.PSVariable.Set(new PSVariable("ConfigPath", configFilePath)); + // this.SessionState.PSVariable.Set(new PSVariable("ConfigPath", configFilePath)); - //Context tempContext = (Context)this.SessionState.PSVariable.GetValue("Context", null); - //this.UpdateCache(tempContext); - } - } + // //Context tempContext = (Context)this.SessionState.PSVariable.GetValue("Context", null); + // //this.UpdateCache(tempContext); + // } + //} //======================================================================================================= /// /// @@ -180,18 +377,21 @@ namespace Openstack.Client.Powershell.Cmdlets.Common //======================================================================================================= protected override void ProcessRecord() { - if (_reset) - { - _configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; - this.LoadConfigFile(); - } - else - { - if (_configFilePath != null) - this.LoadConfigFile(_configFilePath); - else - this.Settings[_key] = _value; - } + this.LoadConfigFile(); + + + //if (_reset) + //{ + // _configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; + // this.LoadConfigFile(); + //} + //else + //{ + // if (_configFilePath != null) + // this.LoadConfigFile(_configFilePath); + // else + // this.Settings[_key] = _value; + //} } } } diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetServiceProviderCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetServiceProviderCmdlet.cs new file mode 100644 index 0000000..34f2869 --- /dev/null +++ b/Openstack.Client.Powershell/Cmdlets/Common/SetServiceProviderCmdlet.cs @@ -0,0 +1,316 @@ +//* ============================================================================ +//Copyright 2014 Hewlett Packard +//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. +//============================================================================ */ +using System.Management.Automation; +using OpenStack.Client.Powershell.Utility; +using System.Linq; +using OpenStack.Identity; +using System.Collections.ObjectModel; +using System.Collections.Generic; +using OpenStack.Client.Powershell.Providers.Storage; +using OpenStack.Storage; +using System.Threading.Tasks; +using System; + +namespace OpenStack.Client.Powershell.Cmdlets.Common +{ + [Cmdlet(VerbsCommon.Set, "SP", SupportsShouldProcess = true)] + public class SetServiceProviderCmdlet : BasePSCmdlet + { + private string _name; + private SwitchParameter _setDefault = false; + + #region Properties +//========================================================================================= +/// +/// +/// +//========================================================================================= + [Parameter(ParameterSetName = "SetSP", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")] + [Alias("d")] + [ValidateNotNullOrEmpty] + public SwitchParameter SetDefault + { + get { return _setDefault; } + set { _setDefault = value; } + } +//========================================================================================= +/// +/// +/// +//========================================================================================= + [Parameter(Position = 0, ParameterSetName = "SetSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")] + [Alias("n")] + public string Name + { + get { return _name; } + set { _name = value; } + } + #endregion + #region Methods +//========================================================================================= +/// +/// +/// +//========================================================================================= + protected override void ProcessRecord() + { + ConfigurationManager manager = new ConfigurationManager(); + manager.Load(); + + ServiceProvider provider = manager.GetServiceProvider(this.Name); + provider.IsDefault = this.SetDefault; + + this.WriteObject(""); + this.WriteObject(" - Connecting to OpenStack Provider " + this.Name); + + this.InitialzeServiceProvider(provider); + } +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + private bool DoesRequireCredentials() + { + return true; + } +//================================================================================================== +/// +/// +/// +//================================================================================================== + private void InitialzeServiceProvider(ServiceProvider provider) + { + if (this.SetDefault) + { + ConfigurationManager configManager = new ConfigurationManager(); + configManager.Load(); + configManager.SetDefaultServiceProvider(provider.Name); + } + + this.WriteObject(" - Loading Service Provider extensions "); + ExtensionManager manager = new ExtensionManager(this.SessionState, this.Context); + manager.LoadExtension(provider); + this.ShowAccountState(); + } +//======================================================================================================= +/// +/// +/// +//======================================================================================================= + private void ShowAccountState() + { + // Show the User the new ServiceCatalog that we just received.. + + this.WriteObject(" - Success!"); + this.WriteObject(""); + this.WriteServices(); + + // If ObjectStorage is among those new Services, show the new Container set bound to those credentials.. + + if (this.Context.ServiceCatalog.Exists("Object Storage")) + { + this.WriteContainers(); + } + } +//======================================================================================================= +/// +/// Removes all currently registered drives.. +/// +//======================================================================================================= + private void RemoveDrives() + { + // Remove the old Users drives first.. + + Collection deadDrives = this.SessionState.Drive.GetAllForProvider("Object Storage"); + foreach (PSDriveInfo deadDrive in deadDrives) + { + this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); + } + } +//======================================================================================================= +/// +/// +/// +//======================================================================================================= + protected void WriteServices() + { + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Yellow; + WriteObject(" Binding to new Account. New service catalog is as follows."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + foreach (OpenStackServiceDefinition service in this.Context.ServiceCatalog) + { + WriteObject(service); + } + WriteObject(""); + } +//======================================================================================================= +/// +/// +/// +//======================================================================================================= + protected void WriteContainers() + { + List invalidDriveNames = new List(); + OSDriveParameters parameters = new OSDriveParameters(); + + // Write out the commands header information first.. + + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("==================================================================="); + Console.ForegroundColor = ConsoleColor.Yellow; + WriteObject(" Object Storage Service available. Remapping to the following drives."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("==================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + HPOSNavigationProvider provider = new HPOSNavigationProvider(); + Collection drives = this.GetAvailableDrives(this.Context.Settings, this.SessionState.Provider.GetOne("Object Storage")); + + if (drives != null) + { + this.RemoveDrives(); + + foreach (PSDriveInfo drive in drives) + { + if (drive.Name != string.Empty) + { + WriteObject(" Storage Container : [" + drive.Name + "] now available."); + } + + try + { + this.SessionState.Drive.New(drive, "local"); + } + catch (PSArgumentException ex) + { + if (drive.Name != string.Empty) + invalidDriveNames.Add(drive.Name); + } + catch (Exception) { } + + } + WriteObject(""); + } + else + { + // No storageContainers exist for the new credentials so make some up... + + //PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); + //this.SessionState.Drive.New(new OSDriveInfo(driveInfo, parameters, this.Context), "local"); + } + + if (invalidDriveNames.Count > 0) + { + WriteObject(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Red; + WriteObject(" Error : A subset of your Containers could not be bound to this"); + WriteObject(" session due to naming conflicts with the naming standards required"); + WriteObject(" for Powershell drives. These containers are listed below."); + Console.ForegroundColor = ConsoleColor.DarkGray; + WriteObject("================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + WriteObject(" "); + + foreach (string name in invalidDriveNames) + { + WriteObject(name); + WriteObject(" "); + } + WriteObject(" "); + } + } +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo) //, string configFilePath) + { + IEnumerable storageContainers = null; + OSDriveParameters parameters = new OSDriveParameters(); + + if (this.Context.Settings != null) + { + parameters.Settings = this.Context.Settings; + } + else + { + parameters.Settings = settings; + } + + try + { + Task getStorageAccountTask = this.CoreClient.CreateServiceClient().GetStorageAccount(); + getStorageAccountTask.Wait(); + StorageAccount result = getStorageAccountTask.Result; + storageContainers = result.Containers; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + + Collection drives = new Collection(); + + // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. + + try + { + string publicStoreUrl = this.Context.ServiceCatalog.GetPublicEndpoint("Object Storage", "region-a.geo-1").ToString(); + + if (storageContainers.Count() > 0) + { + foreach (StorageContainer storageContainer in storageContainers) + { + PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); + OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl); + try + { + drives.Add(kvsDriveInfo); + } + catch (Exception) { } + } + } + else + { + PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); + return new Collection + { + new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl) + }; + } + } + catch (Exception ex) + { + int g = 7; + } + + return drives; + } + #endregion + } +} diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs index 13bbd70..cb80213 100644 --- a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs @@ -14,18 +14,18 @@ //limitations under the License. //============================================================================ */ //using System.Management.Automation; -//using Openstack.Objects; -//using Openstack.Objects.Domain; -//using Openstack.Client.Powershell.Providers.Storage; +//using OpenStack.Objects; +//using OpenStack.Objects.Domain; +//using OpenStack.Client.Powershell.Providers.Storage; //using System; -//using Openstack.Objects.DataAccess.Storage; -//using Openstack.Client.Powershell.Providers.Common; +//using OpenStack.Objects.DataAccess.Storage; +//using OpenStack.Client.Powershell.Providers.Common; //using System.IO; -//namespace Openstack.Client.Powershell.Cmdlets.Common +//namespace OpenStack.Client.Powershell.Cmdlets.Common //{ // [Cmdlet(VerbsCommon.Copy, "Item", SupportsShouldProcess = true)] -// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)] +// [RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] // public class CopyItemCmdlet : BasePSCmdlet // { // public const string cDelimiter = "/"; @@ -223,7 +223,7 @@ // IStorageObjectRepository repository = this.RepositoryFactory.CreateStorageObjectRepository(); -// if (sourcePath.PathType == Openstack.Common.PathType.Local && targetPath.PathType == Openstack.Common.PathType.Remote) +// if (sourcePath.PathType == OpenStack.Common.PathType.Local && targetPath.PathType == OpenStack.Common.PathType.Remote) // { // long lastSegment = repository.GetLastSegmentId(targetPath); // if (lastSegment != 0) diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs index 39bd779..cae3ea4 100644 --- a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs @@ -15,16 +15,16 @@ //============================================================================ */ //using System; //using System.Management.Automation; -//using Openstack.Client.Powershell.Providers.Common; +//using OpenStack.Client.Powershell.Providers.Common; //using System.Security.Cryptography; //using System.Text; //using System.Web; -//using Openstack.Objects.Domain; +//using OpenStack.Objects.Domain; -//namespace Openstack.Client.Powershell.Cmdlets.Common +//namespace OpenStack.Client.Powershell.Cmdlets.Common //{ // [Cmdlet(VerbsCommon.Get, "URI", SupportsShouldProcess = true)] -// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)] +// [RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] // public class GetURICmdlet : BasePSCmdlet // { // private string _sourcePath; diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs index 193f4db..7149233 100644 --- a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs +++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs @@ -15,19 +15,19 @@ //============================================================================ */ //using System; //using System.Management.Automation; -//using Openstack.Objects.DataAccess; -//using Openstack.Objects.Domain; -//using Openstack.Client.Powershell.Providers.Storage; -//using Openstack.Common; +//using OpenStack.Objects.DataAccess; +//using OpenStack.Objects.Domain; +//using OpenStack.Client.Powershell.Providers.Storage; +//using OpenStack.Common; //using System.Management.Automation.Host; //using System.Collections.ObjectModel; //using System.Diagnostics.Contracts; -//using Openstack.Client.Powershell.Providers.Common; +//using OpenStack.Client.Powershell.Providers.Common; -//namespace Openstack.Client.Powershell.Cmdlets.Common +//namespace OpenStack.Client.Powershell.Cmdlets.Common //{ // [Cmdlet(VerbsCommon.Remove, "Item", SupportsShouldProcess = true)] -// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)] +// [RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] // public class RemoveItemCmdlet : BasePSCmdlet // { // public const string cDelimiter = "/"; diff --git a/Openstack.Client.Powershell/Deployment/DevProfile.ps1 b/Openstack.Client.Powershell/Deployment/DevProfile.ps1 index 2f7e147..9c44159 100644 --- a/Openstack.Client.Powershell/Deployment/DevProfile.ps1 +++ b/Openstack.Client.Powershell/Deployment/DevProfile.ps1 @@ -17,7 +17,7 @@ Echo '' $a.ForegroundColor = "gray" Echo '========================================================================================' $a.ForegroundColor = "yellow" -Echo 'Welcome to the OpenStack Powershell Environment.333' +Echo 'Welcome to the OpenStack Powershell Environment.' $a.ForegroundColor = "gray" Echo '========================================================================================' Echo '' @@ -29,13 +29,42 @@ echo ' ==> Registering Providers...' # $(TargetDir) macro in the Post-Build Script. # ----------------------------------------------------------------------------------------------------------------------------------------------------------- - #cd C:\Users\tplummer\Source\Repos\OpenStack-CLI\Openstack.Client.Powershell\bin\Release - cd C:\Users\tplummer\Source\Repos\OpenStack-NewCLI\Openstack.Client.Powershell\bin\Release -import-module .\CLIManifest.psd1 -DisableNameChecking + + + + +#Save the current value in the $p variable. +$p = [Environment]::GetEnvironmentVariable("PSModulePath") + +#Add the new path to the $p variable. Begin with a semi-colon separator. +$p += ";C:\Users\tplummer\Documents\WindowsPowerShell\Modules\OpenStack\" + +#Add the paths in $p to the PSModulePath value. +[Environment]::SetEnvironmentVariable("PSModulePath",$p) + + + + + + + + + + + + #cd C:\Users\tplummer\Source\Repos\OpenStack-CLI\OpenStack.Client.Powershell\bin\Release + #cd C:\Users\tplummer\Source\Repos\OpenStack-NewCLI\OpenStack.Client.Powershell\bin\Release + #import-module .\CLIManifest.psd1 -DisableNameChecking + + import-module OpenStack-Core -DisableNameChecking + + cd Builds: cd 1-3-4-5 +#set-sp Rackspace + #cd OpenStack: #cd Networks diff --git a/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1 b/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1 index cb8fbd2..2e4ac18 100644 --- a/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1 +++ b/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1 @@ -46,7 +46,7 @@ echo ' ==> Registering Providers...' $tempvar = get-programfilesdir - $tempvar = $tempvar + "\Openstack\OpenStack-Powershell" + $tempvar = $tempvar + "\OpenStack\OpenStack-Powershell" cd $tempvar import-module .\CLIManifest.psd1 -DisableNameChecking diff --git a/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml b/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml index 5d1ee01..63de2eb 100644 --- a/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml +++ b/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml @@ -847,7 +847,7 @@ Description ----------- - Resets the current session settings to those defined within the default config file (CLI.config) + Resets the current session settings to those defined within the default config file (OpenStack.config) @@ -898,7 +898,7 @@ - When you issue this command the URI is also pasted to the Windows clipboard for your convenience. If you want to disable this behavior simply set the CLI.config option entitled PasteGetURIResultsToClipboard to false. + When you issue this command the URI is also pasted to the Windows clipboard for your convenience. If you want to disable this behavior simply set the OpenStack.config option entitled PasteGetURIResultsToClipboard to false. diff --git a/Openstack.Client.Powershell/Deployment/Openstack.config b/Openstack.Client.Powershell/Deployment/Openstack.config new file mode 100644 index 0000000..46c33d0 --- /dev/null +++ b/Openstack.Client.Powershell/Deployment/Openstack.config @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Openstack.Client.Powershell/Deployment/CLI.config.example b/Openstack.Client.Powershell/Deployment/Openstack.config.example similarity index 100% rename from Openstack.Client.Powershell/Deployment/CLI.config.example rename to Openstack.Client.Powershell/Deployment/Openstack.config.example diff --git a/Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml b/Openstack.Client.Powershell/Deployment/Openstack.format.ps1xml similarity index 96% rename from Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml rename to Openstack.Client.Powershell/Deployment/Openstack.format.ps1xml index b88bb75..024a2ff 100644 --- a/Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml +++ b/Openstack.Client.Powershell/Deployment/Openstack.format.ps1xml @@ -3,8 +3,8 @@ ObjectStorageTypes - Openstack.Storage.StorageObject - Openstack.Storage.StorageContainer + OpenStack.Storage.StorageObject + OpenStack.Storage.StorageContainer --> @@ -14,7 +14,7 @@ service - Openstack.Objects.Domain.Admin.Zone + OpenStack.Objects.Domain.Admin.Zone @@ -65,7 +65,7 @@ service - Openstack.Objects.Domain.BlockStorage.Snapshot + OpenStack.Objects.Domain.BlockStorage.Snapshot @@ -149,7 +149,7 @@ service - Openstack.Objects.Domain.BlockStorage.VolumeBackup + OpenStack.Objects.Domain.BlockStorage.VolumeBackup @@ -247,7 +247,7 @@ service - Openstack.Objects.Domain.BlockStorage.Volume + OpenStack.Objects.Domain.BlockStorage.Volume @@ -368,7 +368,7 @@ KeyPair - Openstack.Objects.Domain.Server.KeyPair + OpenStack.Objects.Domain.Server.KeyPair @@ -421,7 +421,7 @@ Port - Openstack.Objects.Domain.Networking.Port + OpenStack.Objects.Domain.Networking.Port @@ -526,7 +526,7 @@ Subnet - Openstack.Objects.Domain.Networking.Subnet + OpenStack.Objects.Domain.Networking.Subnet @@ -603,7 +603,7 @@ service - Openstack.Client.Powershell.Utility.ServiceProvider + OpenStack.Client.Powershell.Utility.ServiceProvider @@ -653,7 +653,7 @@ service - Openstack.Objects.Domain.Networking.FloatingIP + OpenStack.Objects.Domain.Networking.FloatingIP @@ -743,7 +743,7 @@ StorageContainer - Openstack.Objects.Domain.StorageContainer + OpenStack.Objects.Domain.StorageContainer @@ -768,7 +768,7 @@ Network - Openstack.Objects.Domain.Networking.Network + OpenStack.Objects.Domain.Networking.Network @@ -849,7 +849,7 @@ service - Openstack.Objects.Domain.Admin.Service + OpenStack.Objects.Domain.Admin.Service @@ -889,7 +889,7 @@ process4 - Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemViewModel + OpenStack.Client.Powershell.Providers.ObjectStorage.StorageItemViewModel @@ -939,7 +939,7 @@ process4 - Openstack.Storage.StorageObject + OpenStack.Storage.StorageObject @@ -988,7 +988,7 @@ process5 - Openstack.Storage.StorageFolder + OpenStack.Storage.StorageFolder @@ -1037,7 +1037,7 @@ Router - Openstack.Objects.Domain.Networking.Router + OpenStack.Objects.Domain.Networking.Router @@ -1106,7 +1106,7 @@ process - Openstack.Client.Powershell.Providers.Common.BaseUIContainer + OpenStack.Client.Powershell.Providers.Common.BaseUIContainer @@ -1162,7 +1162,7 @@ process - Openstack.Administration.Domain.User + OpenStack.Administration.Domain.User @@ -1210,7 +1210,7 @@ process - Openstack.Objects.Domain.Compute.Account + OpenStack.Objects.Domain.Compute.Account @@ -1249,7 +1249,7 @@ process - Openstack.Administration.Domain.Group + OpenStack.Administration.Domain.Group @@ -1297,7 +1297,7 @@ process - Openstack.Objects.Domain.Compute.Server + OpenStack.Objects.Domain.Compute.Server @@ -1389,7 +1389,7 @@ process - Openstack.Objects.Domain.Compute.Image + OpenStack.Objects.Domain.Compute.Image @@ -1512,7 +1512,7 @@ process - Openstack.Objects.Domain.Security.SecurityGroup + OpenStack.Objects.Domain.Security.SecurityGroup @@ -1582,7 +1582,7 @@ process - Openstack.Objects.Domain.Compute.MetaDataElement + OpenStack.Objects.Domain.Compute.MetaDataElement @@ -1625,7 +1625,7 @@ flavor - Openstack.Objects.Domain.Compute.Flavor + OpenStack.Objects.Domain.Compute.Flavor diff --git a/Openstack.Client.Powershell/Deployment/Openstack.psd1 b/Openstack.Client.Powershell/Deployment/Openstack.psd1 new file mode 100644 index 0000000..f5264a3 --- /dev/null +++ b/Openstack.Client.Powershell/Deployment/Openstack.psd1 @@ -0,0 +1,21 @@ +@{ +ModuleToProcess = 'OpenStack.Client.Powershell.dll' +GUID="{847a28a4-6407-4aa6-8070-a4a51396db70}" +Author="Travis Plummer" +CompanyName="Hewlett-Packard Corporation" +Copyright="© Hewlett-Packard. All rights reserved." +ModuleVersion="1.0.0.0" +PowerShellVersion="2.0" +CLRVersion="4.0.30319" +FormatsToProcess="OpenStack.format.ps1xml" +FileList='OpenStack.config' +RequiredAssemblies = 'OpenStack.dll', 'OpenStack.Common.dll' + +} + + + + + + + diff --git a/Openstack.Client.Powershell/Deployment/PostBuild.bat b/Openstack.Client.Powershell/Deployment/PostBuild.bat index d09c045..bd0ccb9 100644 --- a/Openstack.Client.Powershell/Deployment/PostBuild.bat +++ b/Openstack.Client.Powershell/Deployment/PostBuild.bat @@ -1,21 +1,13 @@ - -===================================================================================================================== -ACTION REQUIRED : Change the DocPath Variable below to reflect your Personal Documents Folder.. -===================================================================================================================== -set DocPath=C:\Users\Travis\Documents +echo set DocPath=C:\Users\Travis\Documents - md %DocPath%\WindowsPowershell\ - md %DocPath%\OS\ - md %DocPath%\OS\ +echo md %DocPath%\WindowsPowershell\ + echo md %DocPath%\OS\ + echo md %DocPath%\OS\ -echo copy ..\..\.\Deployment\DevProfile.ps1 %DocPath%\WindowsPowershell\Microsoft.PowerShell_profile.ps1 -copy ..\..\.\Deployment\DevProfile.ps1 C:\Users\tplummer\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -copy ..\..\.\Deployment\CLI.config C:\Users\tplummer\Documents\OS\CLI.config -copy ..\..\.\Deployment\Openstack.Client.Powershell.dll-Help.xml %DocPath%\OS\Openstack.Client.Powershell.dll-Help.xml -copy ..\..\.\Deployment\OpenstackShell.format.ps1xml C:\Users\tplummer\Source\Repos\Openstack-NewCLI\Openstack.Client.Powershell\bin\Release\OpenstackShell.format.ps1xml + echo copy ..\..\.\Deployment\DevProfile.ps1 C:\Users\tplummer\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 + echo copy ..\..\.\Deployment\OpenStack.config C:\Users\tplummer\Documents\OS\OpenStack.config + echo copy ..\..\.\Deployment\OpenStack.Client.Powershell.dll-Help.xml %DocPath%\OS\OpenStack.Client.Powershell.dll-Help.xml + echo copy ..\..\.\Deployment\OpenstackShell.format.ps1xml C:\Users\tplummer\Source\Repos\OpenStack-NewCLI\OpenStack.Client.Powershell\bin\Release\OpenstackShell.format.ps1xml -echo copy C:\Users\tplummer\Source\Repos\Openstack-NewCLI\Openstack.Client.Powershell\bin\Release\Openstack.Client.Powershell.dll C:\Users\tplummer\Source\Repos\OpenStack.HP.Extensions\Openstack.HP.Extensions\bin\Debug - -echo %DocPath%\OS\OpenstackShell.format.ps1xml \ No newline at end of file diff --git a/Openstack.Client.Powershell/Deployment/PostBuild.example b/Openstack.Client.Powershell/Deployment/PostBuild.example index 9ecf6d1..71f1258 100644 --- a/Openstack.Client.Powershell/Deployment/PostBuild.example +++ b/Openstack.Client.Powershell/Deployment/PostBuild.example @@ -9,5 +9,5 @@ set DocPath=C:\Users\Travis\Documents md %DocPath%\OS\ copy ..\..\.\Deployment\DevProfile.ps1 %DocPath%\WindowsPowershell\Microsoft.PowerShell_profile.ps1 -copy ..\..\.\Deployment\CLI.config %DocPath%\OS\CLI.config -copy ..\..\.\Deployment\Openstack.Client.Powershell.dll-Help.xml %DocPath%\OS\Openstack.Client.Powershell.dll-Help.xml \ No newline at end of file +copy ..\..\.\Deployment\OpenStack.config %DocPath%\OS\OpenStack.config +copy ..\..\.\Deployment\OpenStack.Client.Powershell.dll-Help.xml %DocPath%\OS\OpenStack.Client.Powershell.dll-Help.xml diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt b/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt deleted file mode 100644 index 103d384..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt +++ /dev/null @@ -1,92 +0,0 @@ -==================================================================================================================== -/// -/// -/// -/// -/// -/// -//====================================================================================================================== - public StorageObject GetStorageObject(string path) - { - try - { - path = path.Replace(@"\", "/"); - RequestHeaders headers = StorageRequestSigner.CreateSignedHeaders(HttpMethod.GET, path); - string resourcePath = ["StorageManagementURI"] + "/" + path; - HttpClient client = new HttpClient(); - client.DefaultHeaders = headers; - - Uri uri = new Uri(resourcePath); - HttpResponseMessage msg = client.Get(uri); - - if (msg.StatusCode == System.Net.HttpStatusCode.OK) - { - msg.Content.LoadIntoBufferAsync(); - StorageObject storageObject = new StorageObject(); - storageObject.Key = path; - storageObject.Load(msg.Content.ReadAsStream()); - this.CopyCommonRequestHeaders(ref storageObject, msg.Headers); - return storageObject; - } - else - { - return null; - } - } - catch (Exception ex) - { - Console.WriteLine(ex); - } - return null; - } -//====================================================================================================================== -/// -/// -/// -/// -/// -//====================================================================================================================== - public bool IsValidPath(string storageContainer, string path) - { - HttpClient client = new HttpClient(); - Uri uri = new Uri(["StorageManagementURI"] + cDelimiter + storageContainer + cDelimiter + path + cDelimiter + "folder.txt"); - string rootCheck = null; - - if (path == cDelimiter) { - rootCheck = String.Empty; - } - else { - rootCheck = cFolderMarker; - } - - - if (this.GetStorageObject(storageContainer + cDelimiter + path + cDelimiter + rootCheck) != null) - { - return true; - } - else - { - return false; - } - } -//====================================================================================================================== -/// -/// -/// -/// -//====================================================================================================================== - public StorageObjects GetStorageObjects (string storageContainer, string path) - { - HttpQueryString queryString = new HttpQueryString(); - - if (path == "") - { - queryString.Add("prefix", "" ); - queryString.Add("delimiter", "/"); - } - else - { - path = path.Replace(@"\", "/"); - queryString.Add("prefix", path); - queryString.Add("delimiter", "/"); - } \ No newline at end of file diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/PostBuild.targets b/Openstack.Client.Powershell/Deployment/ScratchPad/PostBuild.targets deleted file mode 100644 index 07013fc..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/PostBuild.targets +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Release - Any CPU - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml deleted file mode 100644 index ab26426..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml deleted file mode 100644 index a1bf735..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - 22 - - - - tcp - - - 22 - - - - 0.0.0.0/0 - - - - - - -1 - - - - icmp - - - -1 - - - - 0.0.0.0/0 - - - - - - default - - - - - - - 11 - - - - tcp - - - 33 - - - - 0.0.0.0/0 - - - - - - -1 - - - - icmp - - - -1 - - - - 0.0.0.0/0 - - - - - - default - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupsTest.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupsTest.xml deleted file mode 100644 index d152d40..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupsTest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml deleted file mode 100644 index 8562881..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - Web Head 1 - 2.1 - - - - - - - - - - - - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server1.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server1.xml deleted file mode 100644 index d9bf71e..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server1.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - Web Head 1 - 2.1 - - - - - - - - - - - - - - - - - diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Servers.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Servers.xml deleted file mode 100644 index fae1202..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Servers.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/app.config b/Openstack.Client.Powershell/Deployment/ScratchPad/app.config deleted file mode 100644 index 2e14572..0000000 --- a/Openstack.Client.Powershell/Deployment/ScratchPad/app.config +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Openstack.Client.Powershell/Deployment/readme.txt b/Openstack.Client.Powershell/Deployment/readme.txt index e2feb1a..0f3b03e 100644 --- a/Openstack.Client.Powershell/Deployment/readme.txt +++ b/Openstack.Client.Powershell/Deployment/readme.txt @@ -1,4 +1,4 @@ -Openstack Powershell CLI - Getting Set up to Contribute +OpenStack Powershell CLI - Getting Set up to Contribute I - Pre-requisits @@ -6,7 +6,7 @@ I - Pre-requisits A. Set the Required Execution Policy - To use the Openstack CLI Software for Windows PowerShell, you must make sure that your Powershell environment is capable of executing 3rd party modules. + To use the OpenStack CLI Software for Windows PowerShell, you must make sure that your Powershell environment is capable of executing 3rd party modules. Note: If you are performing a re-installation of the software package, you can skip this step. This step is applicable only for a fresh installation. Open a PowerShell window as the administrator and issue the command set-executionpolicy -ExecutionPolicy Unrestricted: @@ -31,27 +31,27 @@ I - Pre-requisits C. - Supplying your Credentials Our next step is to make sure that we supply the proper credentials when logging on to the system. If you ran the CLI after your initial -install, you'll have noticed that you were prompted for this information. The result is stored in the CLI.config file located within the Users Personal Data Folder +install, you'll have noticed that you were prompted for this information. The result is stored in the OpenStack.config file located within the Users Personal Data Folder under the OS directory. With each Build we must update that file with the version in our solution. This is so that when new config file changes are introduced, you have the CLI picking them up at runtime from the expected location (instead of residing in just your project directory). Complete these steps to supply this information. -1. Navigate to the Openstack.Client.Powershell project and look into the Deployment folder. -2. Within that folder you will see a file called CLI.config.example +1. Navigate to the OpenStack.Client.Powershell project and look into the Deployment folder. +2. Within that folder you will see a file called OpenStack.config.example 3. Copy the example file into the same folder but remove the .example on the filename. -4. Open up the CLI.config file that you just created. +4. Open up the OpenStack.config file that you just created. 5. Find the config section entitled "IdentityServices". 6. Within this section supply values for Username, Password, and Default Tenenat Id. All of this can be found within your account information on you providers portal. -Each time that we build, this CLI.config file will be moved to the correct runtime location via Post-Build Scripts outlined in the next section. +Each time that we build, this OpenStack.config file will be moved to the correct runtime location via Post-Build Scripts outlined in the next section. D. - Edit Post Build Scripts -Within the Openstack.Client.Powershell projects Post-Build Event you'll notice that we call a PostBuild.bat file. This +Within the OpenStack.Client.Powershell projects Post-Build Event you'll notice that we call a PostBuild.bat file. This batch file will move important run-time files required by the CLI to their proper locations if you decide to edit them. -Without this, all changes to important files (like CLI.config) would go unnoticed because they would sit in our project +Without this, all changes to important files (like OpenStack.config) would go unnoticed because they would sit in our project folders on disk (rather than the location the CLI expects). To create tis batch file, follow these steps. -1. Navigate to the Openstack.Client.Powershell project and look into the Deployment folder. +1. Navigate to the OpenStack.Client.Powershell project and look into the Deployment folder. 2. Within that folder you will see a file called PostBuild.example 3. Open up that file and copy the contents to the clipboard. 4. Within that same folder create a file called PostBuild.bat @@ -66,7 +66,7 @@ Powershell loads. Here we can set up the look of the environment, issue some def and loading Powershell Modules. The Powershell module is where all of our CLI code resides and must get loaded by this script. The only problem here is that the path to that module is specific to your machine. To address this follow these steps - 1. Open up the DevProfile.ps1.example file within the Solutions [Openstack.Client.Powershell]\Deployment folder. + 1. Open up the DevProfile.ps1.example file within the Solutions [OpenStack.Client.Powershell]\Deployment folder. 2. Copy the contents of this file into a new text file called DevProfile.ps1 3. Search this document for "ACTION REQUIRED" and follow the instructions given. @@ -122,5 +122,5 @@ III. Testing -> Folder2 (contains files) -> Folder3 (contains NO files) - Note : Go to the Testing section in the CLI.Config file. Make sure that LocalTestDirectory + Note : Go to the Testing section in the OpenStack.config file. Make sure that LocalTestDirectory element points to the root of the test folder hierarchy (Folder1 in the example above). \ No newline at end of file diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk b/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk deleted file mode 100644 index a5aa06a..0000000 Binary files a/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk and /dev/null differ diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj b/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj index 67cdc30..d3b0aef 100644 --- a/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj +++ b/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj @@ -21,7 +21,7 @@ true full false - bin\Release\ + ..\..\..\..\Documents\WindowsPowerShell\Modules\Openstack\Openstack-Core\ DEBUG prompt 4 @@ -62,12 +62,9 @@ False ..\packages\AWSSDK.2.0.11.0\lib\net45\AWSSDK.dll - + False - ..\..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll - - - ..\packages\Newtonsoft.Json.4.5.7\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll @@ -95,9 +92,19 @@ + + + + + + + + + - + + @@ -109,25 +116,31 @@ + + + + + + - + Designer Always - + Designer Always - + Designer Always @@ -175,7 +188,9 @@ Designer - + + Always + @@ -187,7 +202,7 @@ - + Always @@ -199,10 +214,6 @@ - - {c53d669c-cdf1-4157-aec1-bd167f655b2b} - Openstack.Common - {b2c92371-b62b-45a2-adeb-edebefa3a75c} Openstack @@ -220,11 +231,17 @@ Echo Executing Post-Build Scripts Echo ===================== -copy ..\..\.\Deployment\CLIManifest.psd1 $(ProjectDir)\bin\release\CLIManifest.psd1 -copy ..\..\.\Deployment\OpenstackShell.format.ps1xml $(ProjectDir)\bin\release\OpenstackShell.format.ps1xml -copy ..\..\.\Deployment\Openstack.Client.Powershell.dll-help.xml $(ProjectDir)\bin\release\Openstack.Client.Powershell.dll-help.xml -call $(ProjectDir)Deployment\PostBuild.bat +copy C:\Users\tplummer\Source\Repos\openstack-cli-powershell\Openstack.Client.Powershell\Deployment\*.* C:\Users\tplummer\Documents\WindowsPowerShell\Modules\Openstack\Openstack-Core +copy C:\Users\tplummer\Source\Repos\openstack-cli-powershell\Openstack.Client.Powershell\Deployment\DevProfile.ps1 C:\Users\tplummer\Documents\WindowsPowerShell\Microsoft.Powershell_profile.ps1 +copy C:\Users\tplummer\Source\Repos\openstack-cli-powershell\Openstack.Client.Powershell\Deployment\Openstack.config C:\Users\tplummer\Documents\OS\Openstack.config + + + + + + + diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo b/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo deleted file mode 100644 index 7383093..0000000 Binary files a/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo and /dev/null differ diff --git a/Openstack.Client.Powershell/Properties/AssemblyInfo.cs b/Openstack.Client.Powershell/Properties/AssemblyInfo.cs index 7c46497..1bddd94 100644 --- a/Openstack.Client.Powershell/Properties/AssemblyInfo.cs +++ b/Openstack.Client.Powershell/Properties/AssemblyInfo.cs @@ -20,11 +20,11 @@ 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("Openstack.Client.Powershell")] +[assembly: AssemblyTitle("OpenStack.Client.Powershell")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("OpenStack")] -[assembly: AssemblyProduct("Openstack.Client.Powershell")] +[assembly: AssemblyProduct("OpenStack.Client.Powershell")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Openstack.Client.Powershell/Providers/CommonDriveInfo.cs b/Openstack.Client.Powershell/Providers/CommonDriveInfo.cs new file mode 100644 index 0000000..658f392 --- /dev/null +++ b/Openstack.Client.Powershell/Providers/CommonDriveInfo.cs @@ -0,0 +1,85 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; +using Openstack.Objects.DataAccess; +using Openstack.Common.DataAccess; +using Openstack.Client.Powershell.Providers.Common; + +namespace Openstack.Client.Powershell.Providers.Common +{ + public class CommonDriveInfo : PSDriveInfo + { + private CommonDriveParameters _parameters = null; + private BaseUIContainer _currentContainer = null; + + #region Ctors +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + public CommonDriveInfo(PSDriveInfo driveInfo, CommonDriveParameters parameters) : base (driveInfo) + { + _parameters = parameters; + } + #endregion + #region Methods +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + public Hashtable GetParameters() + { + return null; + } + #endregion + #region Properties +//================================================================================================== +/// +/// +/// +//================================================================================================== + public BaseUIContainer CurrentTenant + { + get { return _currentContainer; } + set + { + _currentContainer = value; + this.CurrentLocation = _currentContainer.Path; + } + } +//================================================================================================== +/// +/// +/// +//================================================================================================== + public BaseUIContainer CurrentContainer + { + get { return _currentContainer; } + set + { + _currentContainer = value; + this.CurrentLocation = _currentContainer.Path; + } + } + #endregion + } +} diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs index 8985fb0..c6639ce 100644 --- a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs +++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs @@ -16,17 +16,17 @@ limitations under the License. using System.Collections.Generic; using System.Management.Automation; using System.Collections; -using Openstack; +using OpenStack; using System.Diagnostics.Contracts; -using Openstack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Utility; using System; using System.IO; using System.Linq; -using Openstack.Storage; -using Openstack.Identity; +using OpenStack.Storage; +using OpenStack.Identity; -namespace Openstack.Client.Powershell.Providers.Storage +namespace OpenStack.Client.Powershell.Providers.Storage { public class OpenStackPSDriveInfo : PSDriveInfo { @@ -138,7 +138,7 @@ namespace Openstack.Client.Powershell.Providers.Storage { foreach (PSDriveInfo drive in this.Provider.Drives) { - if (drive.Provider.Name == "OS-Storage" && drive.Name.Contains(name)) + if (drive.Provider.Name == "Object Storage" && drive.Name.Contains(name)) return true; } return false; @@ -228,6 +228,23 @@ namespace Openstack.Client.Powershell.Providers.Storage /// /// /// +//================================================================================================== + private string StorageServiceURL + { + get + { + return this._context.ServiceCatalog.GetPublicEndpoint("object-store", null).ToString(); + + //if (this.Drive.SharePath == null) + // return this.Context.ServiceCatalog.GetPublicEndpoint("object-store", null).ToString(); //.GetService("object-store").Url; + //else + // return this.Drive.SharePath; + } + } +//================================================================================================== +/// +/// +/// /// /// //================================================================================================== @@ -250,6 +267,7 @@ namespace Openstack.Client.Powershell.Providers.Storage // If the path supplied already contains a storageContainer name, strip it out and pass it in as the volume name.. path = path.Replace(firstElement, string.Empty); + return new StoragePath(this.StorageServiceUrl); } @@ -345,7 +363,11 @@ namespace Openstack.Client.Powershell.Providers.Storage { get { - return _storageServiceUrl; + if (this.SharePath == null) + return this._context.ServiceCatalog.GetPublicEndpoint("Object Storage", "region-a.geo-1").ToString(); + //return this._context.ServiceCatalog.GetPublicEndpoint("Object Storage", null).ToString(); + else + return this.SharePath; } } //================================================================================================== diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs index f6b1bab..94705e9 100644 --- a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs +++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs @@ -13,9 +13,9 @@ 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. ============================================================================ */ -using Openstack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Utility; -namespace Openstack.Client.Powershell.Providers.Storage +namespace OpenStack.Client.Powershell.Providers.Storage { public class OSDriveParameters { diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs index ded3813..9e6295d 100644 --- a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs +++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs @@ -19,16 +19,17 @@ using System.Linq; using System.Management.Automation; using System.Management.Automation.Provider; using System.Collections.ObjectModel; -using Openstack.Storage; -using Openstack.Client.Powershell.Utility; -using Openstack.Client.Powershell.Providers.Common; +using OpenStack.Storage; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Client.Powershell.Providers.Common; using System.Management.Automation.Runspaces; -using Openstack; +using OpenStack; using System.Threading.Tasks; using System.Threading; -using Openstack.Client.Powershell.Providers.ObjectStorage; +using OpenStack.Client.Powershell.Providers.ObjectStorage; -namespace Openstack.Client.Powershell.Providers.Storage + +namespace OpenStack.Client.Powershell.Providers.Storage { [CmdletProvider("Object Storage", ProviderCapabilities.ExpandWildcards)] public class HPOSNavigationProvider : BaseNavigationCmdletProvider @@ -49,7 +50,7 @@ namespace Openstack.Client.Powershell.Providers.Storage { get { - IOpenstackClient client = (IOpenstackClient)this.SessionState.PSVariable.GetValue("Client", null); + IOpenStackClient client = (IOpenStackClient)this.SessionState.PSVariable.GetValue("CoreClient", null); return client.CreateServiceClient(); } @@ -70,6 +71,22 @@ namespace Openstack.Client.Powershell.Providers.Storage /// /// /// +//================================================================================================== + private string StorageServiceURL + { + get + { + if (this.Drive == null || this.Drive.SharePath == null) + return this.Context.ServiceCatalog.GetPublicEndpoint("Object Storage", "region-a.geo-1").ToString(); + //return this.Context.ServiceCatalog.GetPublicEndpoint("object-store", null).ToString(); //.GetService("object-store").Url; + else + return this.Drive.SharePath; + } + } +//================================================================================================== +/// +/// +/// /// //================================================================================================== public System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo) @@ -104,13 +121,13 @@ namespace Openstack.Client.Powershell.Providers.Storage // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. try - { + { if (storageContainers.Count() > 0) { foreach (StorageContainer storageContainer in storageContainers) { PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); - parameters.Settings = this.Settings; + parameters.Settings = this.Settings; OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, this.StorageServiceURL); //kvsDriveInfo.SharePath = storageContainer.SharePath; drives.Add(kvsDriveInfo); @@ -155,9 +172,9 @@ namespace Openstack.Client.Powershell.Providers.Storage { WriteDebug("No Storage Containers found, initializing defaults."); PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.ProviderInfo, "/", "Root folder for your Container", null); - + return new Collection - { + { new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, this.StorageServiceURL) }; } @@ -169,6 +186,8 @@ namespace Openstack.Client.Powershell.Providers.Storage //================================================================================================== protected override System.Collections.ObjectModel.Collection InitializeDefaultDrives() { + Thread.Sleep(10000); + this.InitializeSession(); if (this.Context.ServiceCatalog.Exists(this.ProviderInfo.Name)) @@ -257,9 +276,9 @@ namespace Openstack.Client.Powershell.Providers.Storage /// /// //================================================================================================== - private IEnumerable GetStorageObjects(string path) + private IEnumerable GetStorageObjects(string path) { - List modelViewItems = new List(); + List modelViewItems = new List(); Task listStorageObjectTask; string folderName = null; @@ -267,7 +286,7 @@ namespace Openstack.Client.Powershell.Providers.Storage path = path + @"\"; StoragePath storagePath = this.CreateStoragePath(path); - IStorageServiceClient client = this.Client.CreateServiceClient(); + var client = this.Client.CreateServiceClient(); if (path == "\\") { folderName = "/"; @@ -280,7 +299,7 @@ namespace Openstack.Client.Powershell.Providers.Storage listStorageObjectTask.Wait(); foreach (StorageItem item in listStorageObjectTask.Result.Objects.Union(listStorageObjectTask.Result.Folders)) { - StorageItemModelView modelView = new StorageItemModelView(item); + StorageItemViewModel modelView = new StorageItemViewModel(item); modelViewItems.Add(modelView); } return modelViewItems; @@ -290,7 +309,7 @@ namespace Openstack.Client.Powershell.Providers.Storage /// /// //================================================================================================== - private void WriteData(IEnumerable storageItemViewModel, string path, WildcardPattern pattern = null) + private void WriteData(IEnumerable storageItemViewModel, string path, WildcardPattern pattern = null) { FolderStatistics statistics = new FolderStatistics(); bool doesExist = false; @@ -305,7 +324,7 @@ namespace Openstack.Client.Powershell.Providers.Storage //List folders = storageObjects.Where(so => so.Name.EndsWith(@"\")).ToList(); - List folders = storageItemViewModel.Where(so => so.Type == "Folder").ToList(); + List folders = storageItemViewModel.Where(so => so.Type == "Folder").ToList(); // List folders = storageObjects.Where(so => so.StorageObjectType == StorageObjectType.Folder).ToList(); @@ -334,7 +353,7 @@ namespace Openstack.Client.Powershell.Providers.Storage /// Writes out the files represented as StorageObjects for the supplied path. /// //================================================================================================== - private FolderStatistics WriteFiles(IEnumerable storageObjects, string path) + private FolderStatistics WriteFiles(IEnumerable storageObjects, string path) { FolderStatistics statistics = new FolderStatistics(); @@ -358,13 +377,13 @@ namespace Openstack.Client.Powershell.Providers.Storage /// Writes out a list of supplied Folders and returns stats on them as well. /// //================================================================================================== - private void WriteFolders(List folders, ref FolderStatistics statistics) + private void WriteFolders(List folders, ref FolderStatistics statistics) { if (folders != null) { // Write out each folder we find in the current directory.. - foreach (StorageItemModelView obj in folders) + foreach (StorageItemViewModel obj in folders) { string fixedString = obj.Name.TrimEnd('/'); string[] folderNames = fixedString.Split('/'); @@ -542,7 +561,7 @@ namespace Openstack.Client.Powershell.Providers.Storage if (this.CheckDefaultDrive(true)) return; this.WriteHeader(); - this.WriteData(this.GetStorageObjects(path).ToList(), path); + this.WriteData(this.GetStorageObjects(path).ToList(), path); } //================================================================================================== /// @@ -663,11 +682,11 @@ namespace Openstack.Client.Powershell.Providers.Storage if (this.CheckDefaultDrive(true)) return; this.WriteHeader(); - IEnumerable storageObjects = this.GetStorageObjects(path); + IEnumerable storageObjects = this.GetStorageObjects(path); - this.WriteData(storageObjects.ToList(), path); + this.WriteData(storageObjects.ToList(), path); } //================================================================================================== /// @@ -697,22 +716,6 @@ namespace Openstack.Client.Powershell.Providers.Storage /// /// /// -//================================================================================================== - private string StorageServiceURL - { - get - { - return this.StorageClient.GetPublicEndpoint().AbsoluteUri; - //if (this.Drive.SharePath == null) - // return this.Context.ServiceCatalog.GetService("object-store").Url; - //else - // return this.Drive.SharePath; - } - } -//================================================================================================== -/// -/// -/// //================================================================================================== private OpenStackPSDriveInfo Drive { diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/StorageItemViewModel.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/StorageItemViewModel.cs index 29cdf63..c71f7ff 100644 --- a/Openstack.Client.Powershell/Providers/ObjectStorage/StorageItemViewModel.cs +++ b/Openstack.Client.Powershell/Providers/ObjectStorage/StorageItemViewModel.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Openstack.Storage; +using OpenStack.Storage; -namespace Openstack.Client.Powershell.Providers.ObjectStorage +namespace OpenStack.Client.Powershell.Providers.ObjectStorage { public class StorageItemViewModel { diff --git a/Openstack.Client.Powershell/Utility/AccountCapabilities.cs b/Openstack.Client.Powershell/Utility/AccountCapabilities.cs new file mode 100644 index 0000000..52a38fc --- /dev/null +++ b/Openstack.Client.Powershell/Utility/AccountCapabilities.cs @@ -0,0 +1,225 @@ +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Management.Automation; +//using System.Text; +//using System.Threading.Tasks; +//using OpenStack.Client.Powershell.Providers.Storage; +//using OpenStack.Identity; +//using OpenStack.Storage; + +//namespace OpenStack.Client.Powershell.Utility +//{ +// public class AccountCapabilities +// { +// private SessionState _session; +// private Context _context; + +// #region Properties +// public Context Context +// { +// get { return _context; } +// set { _context = value; } +// } +// public SessionState Session +// { +// get { return _session; } +// set { _session = value; } +// } + +// public AccountCapabilities(SessionState session, Context context) +// { +// _session = session; +// _context = context; +// } +// //======================================================================================================= +// /// +// /// +// /// +// //======================================================================================================= +// public void WriteServices() +// { +// this.Session.InvokeCommand.InvokeScript("Hey"); + +// //WriteObject(""); +// //Console.ForegroundColor = ConsoleColor.DarkGray; +// //WriteObject("================================================================="); +// //Console.ForegroundColor = ConsoleColor.Yellow; +// //WriteObject("Binding to new Account. New service catalog is as follows."); +// //Console.ForegroundColor = ConsoleColor.DarkGray; +// //WriteObject("================================================================="); +// //Console.ForegroundColor = ConsoleColor.Green; +// //WriteObject(" "); + +// //foreach (OpenstackServiceDefinition service in this.Context.ServiceCatalog) +// //{ +// // WriteObject(service); +// //} +// //WriteObject(""); +// } +// //================================================================================================== +// /// +// /// +// /// +// /// +// //================================================================================================== +// private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo) //, string configFilePath) +// { +// List storageContainers = null; +// OSDriveParameters parameters = new OSDriveParameters(); + +// if (this.Context.Settings != null) +// { +// parameters.Settings = this.Context.Settings; +// } +// else +// { +// parameters.Settings = settings; +// } + +// try +// { +// Task> getContainersTask = this.CoreClient.CreateServiceClient().ListStorageContainers(); +// getContainersTask.Wait(); +// storageContainers = getContainersTask.Result.ToList(); +// } +// catch (Exception ex) +// { +// Console.WriteLine(ex); +// } + +// Collection drives = new Collection(); + +// // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell.. + +// try +// { +// string publicStoreUrl = this.Context.ServiceCatalog.GetPublicEndpoint("Object Storage", "region-a.geo-1").ToString(); + +// if (storageContainers.Count > 0) +// { +// foreach (StorageContainer storageContainer in storageContainers) +// { +// PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, providerInfo, "/", "Root folder for your storageContainer", null); +// OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl); +// try +// { +// drives.Add(kvsDriveInfo); +// } +// catch (Exception) { } +// } +// } +// else +// { +// PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); +// return new Collection +// { +// new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, publicStoreUrl) +// }; +// } +// } +// catch (Exception ex) +// { +// int g = 7; +// } + +// return drives; +// } +// //======================================================================================================= +// /// +// /// Removes all currently registered drives.. +// /// +// //======================================================================================================= +// private void RemoveDrives() +// { +// // Remove the old Users drives first.. + +// Collection deadDrives = this.SessionState.Drive.GetAllForProvider("Object Storage"); +// foreach (PSDriveInfo deadDrive in deadDrives) +// { +// this.SessionState.Drive.Remove(deadDrive.Name, true, "local"); +// } +// } +// //======================================================================================================= +// /// +// /// +// /// +// //======================================================================================================= +// public void WriteContainers(string configFilePath) +// { +// List invalidDriveNames = new List(); +// OSDriveParameters parameters = new OSDriveParameters(); + +// // Write out the commands header information first.. + +// WriteObject(""); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("==================================================================="); +// Console.ForegroundColor = ConsoleColor.Yellow; +// WriteObject("Object Storage Service available. Remapping to the following drives."); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("==================================================================="); +// Console.ForegroundColor = ConsoleColor.Green; +// WriteObject(" "); + +// HPOSNavigationProvider provider = new HPOSNavigationProvider(); +// Collection drives = this.GetAvailableDrives(this.Context.Settings, this.SessionState.Provider.GetOne("Object Storage")); + +// if (drives != null) +// { +// this.RemoveDrives(); + +// foreach (PSDriveInfo drive in drives) +// { +// if (drive.Name != string.Empty) +// { +// WriteObject("Storage Container : [" + drive.Name + "] now available."); +// } + +// try +// { +// this.SessionState.Drive.New(drive, "local"); +// } +// catch (PSArgumentException ex) +// { +// if (drive.Name != string.Empty) +// invalidDriveNames.Add(drive.Name); +// } +// catch (Exception) { } + +// } +// WriteObject(""); +// } +// else +// { +// // No storageContainers exist for the new credentials so make some up... + +// //PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.SessionState.Drive.Current.Provider, "/", "Root folder for your storageContainer", null); +// //this.SessionState.Drive.New(new OSDriveInfo(driveInfo, parameters, this.Context), "local"); +// } + +// if (invalidDriveNames.Count > 0) +// { +// WriteObject(""); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Red; +// WriteObject("Error : A subset of your Containers could not be bound to this"); +// WriteObject("session due to naming conflicts with the naming standards required"); +// WriteObject("for Powershell drives. These containers are listed below."); +// Console.ForegroundColor = ConsoleColor.DarkGray; +// WriteObject("================================================================="); +// Console.ForegroundColor = ConsoleColor.Green; +// WriteObject(" "); + +// foreach (string name in invalidDriveNames) +// { +// WriteObject(name); +// WriteObject(" "); +// } +// WriteObject(" "); +// } +// } +// } +//} +// #endregion \ No newline at end of file diff --git a/Openstack.Client.Powershell/Utility/ConfigurationManager.cs b/Openstack.Client.Powershell/Utility/ConfigurationManager.cs new file mode 100644 index 0000000..eecb0d7 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/ConfigurationManager.cs @@ -0,0 +1,306 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Linq; +using System.Collections; +using System.IO; +using System.Xml.XPath; + +namespace OpenStack.Client.Powershell.Utility +{ + public class ConfigurationManager + { + private bool _isLoaded = false; + private XDocument _document = new XDocument(); + + public XDocument Document + { + get { return _document; } + set { _document = value; } + } + public bool IsLoaded + { + get { return _isLoaded; } + set { _isLoaded = value; } + } +//==================================================================================== +/// +/// +/// +//==================================================================================== + public ConfigurationManager() + { } +//==================================================================================== +/// +/// +/// +/// +/// +//========================================================================================= + private XElement CreateAddElement(CredentialElement credentialElement) + { + XElement element = new XElement("add"); + element.SetAttributeValue("key", credentialElement.Key); + element.SetAttributeValue("value", credentialElement.Value); + element.SetAttributeValue("displayName", credentialElement.DisplayName); + element.SetAttributeValue("isMandatory", credentialElement.IsMandatory); + + return element; + } +//================================================================================================== +/// +/// +/// +/// +/// +//================================================================================================== + private ServiceProvider ResolveServiceProviderCredentials(ServiceProvider provider) + { + if (!this.IsLoaded) throw new InvalidOperationException("Instance must be Loaded first.."); + + CredentialElement configFilePathCredentialElement = provider.CredentialElements.Where(ce => ce.Key == "ConfigFilePath").SingleOrDefault(); + if (configFilePathCredentialElement != null) + { + // Need to get credentials from the linked in Config File.. + + ConfigurationManager manager = new ConfigurationManager(); + manager.Load(configFilePathCredentialElement.Value); + provider.CredentialElements.Remove(provider.CredentialElements.Where(ce => ce.Key == "ConfigFilePath").Single()); + return manager.GetServiceProvider(provider.Name); + } + else + { + return provider; + } + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + public void SetDefaultServiceProvider(string providerName) + { + if (!this.IsLoaded) throw new InvalidOperationException("Instance must be Loaded first.."); + + XElement defaultProvider = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("isDefault").Value == "true").Single(); + defaultProvider.Attribute("isDefault").SetValue("false"); + XElement serviceProviderNode = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("name").Value == providerName).Single(); + serviceProviderNode.Attribute("isDefault").SetValue("true"); + this.Document.Save(this.GetFullConfigPath()); + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + public ServiceProvider GetDefaultServiceProvider() + { + if (!this.IsLoaded) throw new InvalidOperationException("Instance must be Loaded first.."); + + XElement serviceProviderNode = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("isDefault").Value == "true").Single(); + return this.GetServiceProvider(serviceProviderNode.Attribute("name").Value); + } +//========================================================================================= +/// +/// +/// +//========================================================================================= + public void Load() + { + _document = new XDocument(); ; + _document = XDocument.Load(this.GetFullConfigPath()); + _isLoaded = true; + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + public void Load(string configFilePath) + { + _document = new XDocument(); + _document = XDocument.Load(configFilePath); + _isLoaded = true; + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + private string GetFullConfigPath() + { + if (File.Exists("OpenStack.config")) + { + return this.GetType().Assembly.Location; + } + else if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config")) + { + return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; + } + else + { + throw new InvalidOperationException("Unable to locate OpenStack.config file."); + } + } + //========================================================================================= +/// +/// +/// +/// +/// +//========================================================================================= + public ServiceProvider GetServiceProvider(string name) + { + if (!this.IsLoaded) throw new InvalidOperationException("Instance must be Loaded first.."); + + XElement serviceProviderNode = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("name").Value == name).Single(); + var provider = new ServiceProvider(); + provider.Name = serviceProviderNode.Attribute("name").Value; + provider.IsDefault = Convert.ToBoolean(serviceProviderNode.Attribute("isDefault").Value); + + // The ServiceProvider in the Primary config file is pointing to a Vender specific config so reolve that first.. + + foreach (XElement xElement in serviceProviderNode.Elements()) + { + CredentialElement element = new CredentialElement(); + element.Key = xElement.Attribute("key").Value; + element.Value = xElement.Attribute("value").Value; + + if (xElement.Attribute("key").Value == "AuthenticationServiceURI") + provider.AuthenticationServiceURI = xElement.Attribute("value").Value; + + if (xElement.Attribute("key").Value == "isDefault") + provider.IsDefault = Convert.ToBoolean(xElement.Attribute("value").Value); + + try + { + element.IsMandatory = Convert.ToBoolean(xElement.Attribute("isMandatory").Value); + element.DisplayName = xElement.Attribute("displayName").Value; + //element.HelpText = xElement.Attribute("helpText").Value; + } + catch (Exception) { } + + if (element.Key == "ConfigFilePath") + { + provider.CredentialElements.Add(element); + ServiceProvider resolvedProvider = this.ResolveServiceProviderCredentials(provider); + resolvedProvider.ConfigFilePath = element.Value; + return resolvedProvider; + } + else + provider.CredentialElements.Add(element); + } + return provider; + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + public IEnumerable GetServiceProviders() + { + List serviceProviders = new List(); + foreach (XElement element in this.Document.Descendants("ServiceProvider")) + { + ServiceProvider newProvider = this.GetServiceProvider(element.Attribute("name").Value); + newProvider.IsDefault = Convert.ToBoolean(element.Attribute("isDefault").Value); + serviceProviders.Add(newProvider); + } + + return serviceProviders; + } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + public void RemoveInitialServiceProvider(ref XDocument _document) + { + try + { + XElement oldServiceProvider = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("name").Value == String.Empty).Single(); + if (oldServiceProvider != null) + oldServiceProvider.Remove(); + } + catch (InvalidOperationException ex) { } + } +//========================================================================================= +/// +/// +/// +/// +/// +//========================================================================================= + private void RemoveDefaultServiceProvider(ref XDocument doc) + { + try + { + XElement serviceProviderNode = doc.Descendants("ServiceProvider").Where(sp => sp.Attribute("isDefault").Value == "True").Single(); + serviceProviderNode.Attribute("isDefault").SetValue("false"); + } + catch (Exception) { } + } +//========================================================================================= +/// +/// Flush and fill style.. +/// +//========================================================================================= + public void WriteServiceProvider(ServiceProvider serviceProvider, bool removeInitialServiceProvider = false) + { + IEnumerable serviceProviderNodes = this.Document.Descendants("ServiceProvider"); + XElement spElement = new XElement("ServiceProvider", + new XAttribute("name", serviceProvider.Name), + new XAttribute("isDefault", serviceProvider.IsDefault)); + + // Get rid of the old ServiceProvider first ... + + try + { + XElement oldServiceProvider = this.Document.Descendants("ServiceProvider").Where(sp => sp.Attribute("name").Value == serviceProvider.Name).Single(); + if (oldServiceProvider != null) + oldServiceProvider.Remove(); + } + catch (InvalidOperationException ex) { } + + + // If this new Provider is set = default, remove the default flag from the previous one.. + + if (serviceProvider.IsDefault) { + RemoveDefaultServiceProvider(ref _document); + } + + // Create CredentialElement instances for all Key\Value (Add elements).. + + foreach (CredentialElement element in serviceProvider.CredentialElements) { + spElement.Add(this.CreateAddElement(element)); + } + + if (removeInitialServiceProvider == true) + this.RemoveInitialServiceProvider(ref _document); + + this.Document.XPathSelectElement("configuration/appSettings/IdentityServices").Add(spElement); + this.Document.Save(this.GetFullConfigPath()); + } + } +} diff --git a/Openstack.Client.Powershell/Utility/Context.cs b/Openstack.Client.Powershell/Utility/Context.cs index 2f9be33..5a603b1 100644 --- a/Openstack.Client.Powershell/Utility/Context.cs +++ b/Openstack.Client.Powershell/Utility/Context.cs @@ -13,24 +13,23 @@ 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. ============================================================================ */ -using Openstack.Common; -using Openstack; +using OpenStack.Common; +using OpenStack; using System.Security; using System.Reflection; -using Openstack.Identity; +using OpenStack.Identity; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { public class Context { - private IOpenstackServiceCatalog _serviceCatalog; + private IOpenStackServiceCatalog _serviceCatalog; private Settings _settings; //private Token _accessToken; private string _productName = "OpenstackDotNetAPI"; private string _version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); private string _forecolor = "Green"; - - + #region Ctors //================================================================================================== /// @@ -98,7 +97,7 @@ namespace Openstack.Client.Powershell.Utility /// /// //================================================================================================== - public IOpenstackServiceCatalog ServiceCatalog + public IOpenStackServiceCatalog ServiceCatalog { get { return _serviceCatalog; } set { _serviceCatalog = value; } diff --git a/Openstack.Client.Powershell/Utility/CredentialElement.cs b/Openstack.Client.Powershell/Utility/CredentialElement.cs new file mode 100644 index 0000000..74e7383 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/CredentialElement.cs @@ -0,0 +1,73 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OpenStack.Client.Powershell.Utility +{ + public class CredentialElement + { + private string _key; + private string _value; + private string _displayName; + private string _helpText; + private bool _isMandatory = true; + + public CredentialElement(string key) + { + _key = key; + } + + public CredentialElement() + { + + } + + public bool IsMandatory + { + get { return _isMandatory; } + set { _isMandatory = value; } + } + + public string HelpText + { + get { return _helpText; } + set { _helpText = value; } + } + + public string DisplayName + { + get { return _displayName; } + set { _displayName = value; } + } + + public string Value + { + get { return _value; } + set { _value = value; } + } + + + public string Key + { + get { return _key; } + set { _key = value; } + } + } +} diff --git a/Openstack.Client.Powershell/Utility/CredentialManager.cs b/Openstack.Client.Powershell/Utility/CredentialManager.cs index c08839d..9b2b514 100644 --- a/Openstack.Client.Powershell/Utility/CredentialManager.cs +++ b/Openstack.Client.Powershell/Utility/CredentialManager.cs @@ -17,21 +17,21 @@ using System; using System.Xml.Linq; using System.Xml.XPath; using System.Security; -using Openstack.Identity; -using Openstack.Client.Powershell.Utility; +using OpenStack.Identity; +using OpenStack.Client.Powershell.Utility; using System.Linq; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Diagnostics.Contracts; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { public class ServiceProviderInfo { public string Name; - public IOpenstackCredential Credential; - public string ServbiceProviderUrl; + public IOpenStackCredential Credential; + public string ServiceProviderUrl; } public class CredentialManager @@ -58,33 +58,6 @@ namespace Openstack.Client.Powershell.Utility if (accountIdNode == String.Empty || accessKeyNode == String.Empty || identityServiceURI == String.Empty || tenantId == String.Empty) return true; else return false; - - - - - //// First make sure the User info exist.. - - //System.Collections.Generic.IEnumerable attributes = accountIdNode.Attributes(); - //foreach (XAttribute attribute in attributes) - //{ - // if (attribute.Name == "value" && attribute.Value == string.Empty) - // { - // return true; - // } - //} - - //// Now check to ensure the auth key exist - - //System.Collections.Generic.IEnumerable attributes2 = accessKeyNode.Attributes(); - //foreach (XAttribute attribute in attributes2) - //{ - // if (attribute.Name == "value" && attribute.Value == string.Empty) - // { - // return true; - // } - //} - - //return false; } //================================================================================================== /// @@ -204,6 +177,38 @@ namespace Openstack.Client.Powershell.Utility /// /// /// +//================================================================================================== + private ServiceProviderInfo PromptForCredentials(XElement element) + { + ServiceProviderInfo info = new ServiceProviderInfo(); + + Console.WriteLine("User Name : "); + string username = Console.ReadLine(); + Console.WriteLine(""); + Console.WriteLine("Password : "); + string password = CredentialManager.ReadPassword(); + Console.WriteLine(""); + Console.WriteLine("Tenant Name : "); + string tenantName = Console.ReadLine(); + Console.WriteLine(""); + Console.WriteLine("Service Provider Identity Service Url : "); + string identityServiceUrl = Console.ReadLine(); + Console.WriteLine(""); + Console.WriteLine("Finally supply a name for this Profile."); + string name = Console.ReadLine(); + Console.WriteLine(""); + Console.WriteLine(""); + info.Credential = new OpenStackCredential(new Uri(identityServiceUrl), username, password, tenantName); + info.ServiceProviderUrl = identityServiceUrl; + info.Name = name; + + return info; + } +//================================================================================================== +/// +/// +/// +/// //================================================================================================== private ServiceProviderInfo PromptForCredentials() { @@ -225,8 +230,8 @@ namespace Openstack.Client.Powershell.Utility string name = Console.ReadLine(); Console.WriteLine(""); Console.WriteLine(""); - info.Credential = new OpenstackCredential(new Uri(identityServiceUrl), username, this.ConvertToSecureString(password), tenantName); - info.ServbiceProviderUrl = identityServiceUrl; + info.Credential = new OpenStackCredential(new Uri(identityServiceUrl), username, password, tenantName); + info.ServiceProviderUrl = identityServiceUrl; info.Name = name; return info; @@ -244,7 +249,7 @@ namespace Openstack.Client.Powershell.Utility Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("We've noticed that you haven't supplied any credentials yet. To continue we need to get your Username, "); Console.WriteLine("Password, and the Tenant Id provided to you during the sign up process. If you haven't signed up"); - Console.WriteLine("for any services yet, just go to https://console.Openstack.com for details on how to get started today!"); + Console.WriteLine("for any services yet, just go to https://console.OpenStack.com for details on how to get started today!"); Console.ForegroundColor = ConsoleColor.DarkGray; Console.WriteLine("======================================================================================================="); Console.ForegroundColor = ConsoleColor.Green; @@ -262,7 +267,7 @@ namespace Openstack.Client.Powershell.Utility Console.WriteLine("======================================================================================================="); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("The credentials that you have supplied could not be verified. Please try again. If you continue to have "); - Console.WriteLine("problems please feel free to contact our support staff at https://console.Openstack.com"); + Console.WriteLine("problems please feel free to contact our support staff at https://console.OpenStack.com"); Console.ForegroundColor = ConsoleColor.DarkGray; Console.WriteLine("======================================================================================================="); Console.ForegroundColor = ConsoleColor.Green; @@ -273,13 +278,15 @@ namespace Openstack.Client.Powershell.Utility /// /// //================================================================================================== - public IOpenstackCredential GetCredentials(bool badCredentialsSupplied = false) + public IOpenStackCredential GetCredentials(bool badCredentialsSupplied = false) { ServiceProviderInfo info; - IOpenstackCredential credential; + IOpenStackCredential credential; - string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; + string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; XDocument doc = XDocument.Load(configFilePath); + + XElement serviceProviderNode = doc.Descendants("ServiceProvider").Where(a => a.Attribute("isDefault").Value == "True").FirstOrDefault(); XElement username = serviceProviderNode.Elements().Where(u => u.Name == "add" && u.Attribute("key").Value == "Username").Single(); XElement password = serviceProviderNode.Elements().Where(u => u.Name == "add" && u.Attribute("key").Value == "Password").Single(); @@ -301,7 +308,7 @@ namespace Openstack.Client.Powershell.Utility { // The test client would be an example of where we need to supress the prompt for credentials. Here we just raise an exception instead.. - throw new SecurityException("You must supply a valid Access Key and Secret Key in the CLI.config file to start unit testing."); + throw new SecurityException("You must supply a valid Access Key and Secret Key in the OpenStack.config file to start unit testing."); } while (!this.VerifyCredentials(username.Value, password.Value)) @@ -313,7 +320,7 @@ namespace Openstack.Client.Powershell.Utility } username.SetAttributeValue("value", credential.UserName); - password.SetAttributeValue("value", this.convertToUNSecureString(credential.Password)); + password.SetAttributeValue("value", credential.Password); tenantId.SetAttributeValue("value", credential.TenantId); identityServiceUrl.SetAttributeValue("value", credential.AuthenticationEndpoint.AbsoluteUri); name.SetValue(info.Name); @@ -326,10 +333,11 @@ namespace Openstack.Client.Powershell.Utility // We didn't need to prompt for credentials from the user so just send back what we found in the config file.. - SecureString securePassword = new SecureString(); - password.Attribute("value").Value.ToCharArray().ToList().ForEach(securePassword.AppendChar); - string h = this.convertToUNSecureString(securePassword); - IOpenstackCredential newCredential = new OpenstackCredential(new Uri(identityServiceUrl.Attribute("value").Value), username.Attribute("value").Value, securePassword, tenantId.Attribute("value").Value); + //SecureString securePassword = new SecureString(); + //password.Attribute("value").Value.ToCharArray().ToList().ForEach(securePassword.AppendChar); + + + IOpenStackCredential newCredential = new OpenStackCredential(new Uri(identityServiceUrl.Attribute("value").Value), username.Attribute("value").Value, password.Attribute("value").Value, tenantId.Attribute("value").Value); return newCredential; } diff --git a/Openstack.Client.Powershell/Utility/Enums.cs b/Openstack.Client.Powershell/Utility/Enums.cs index 1ca34e2..7e02fcd 100644 --- a/Openstack.Client.Powershell/Utility/Enums.cs +++ b/Openstack.Client.Powershell/Utility/Enums.cs @@ -15,7 +15,7 @@ limitations under the License. ============================================================================ */ using System.Xml.Serialization; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { public enum StorageOperationType diff --git a/Openstack.Client.Powershell/Utility/ExtensionManager.cs b/Openstack.Client.Powershell/Utility/ExtensionManager.cs new file mode 100644 index 0000000..ac53f19 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/ExtensionManager.cs @@ -0,0 +1,163 @@ +//* ============================================================================ +//Copyright 2014 Hewlett Packard + +//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. +//============================================================================ */ +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Policy; +using OpenStack.Client.Powershell.Utility; +using System.Linq; +using OpenStack.Identity; +using System.Threading; + +namespace OpenStack.Client.Powershell.Utility +{ + public class ExtensionManager + { + private SessionState _session; + private Context _context; + + #region Properties + public Context Context + { + get { return _context; } + set { _context = value; } + } + public SessionState Session + { + get { return _session; } + set { _session = value; } + } + #endregion + //================================================================================================== +/// +/// +/// +/// +/// +//================================================================================================== + public ExtensionManager(SessionState session, Context context) + { + _session = session; + _context = context; + } +//================================================================================================== +/// +/// +/// +/// +/// +//================================================================================================== + private Settings GetSettings(ServiceProvider provider) + { + if (provider.ConfigFilePath == null) { + Settings.Default.Reset(); + return Settings.Default; + } + else { + return Settings.LoadConfig(provider.ConfigFilePath); + } + } +//================================================================================================== +/// +/// +/// +/// +/// +/// +//================================================================================================== + private void SetSessionState(IOpenStackCredential credential, IOpenStackClient client, ServiceProvider provider) + { + // Setup the environment based on what came back from Auth.. + + Context context = new Context(); + context.ServiceCatalog = credential.ServiceCatalog; + context.Settings = this.GetSettings(provider); + context.ProductName = "OpenStack-WinCLI"; + context.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + this.Session.PSVariable.Set(new PSVariable("Context", context)); + this.Session.PSVariable.Set(new PSVariable("CoreClient", client)); + } +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + public void LoadCore(ServiceProvider provider) + { + OpenstackCoreRegistrationManager manager = new OpenstackCoreRegistrationManager(); + RegistrationResponse response = manager.Register(provider); + + // Connect to the Service Provider.. + + + var client = OpenStackClientFactory.CreateClient(response.Credentials, CancellationToken.None, null); + var connectTask = client.Connect(); + connectTask.Wait(); + + this.SetSessionState(response.Credentials, client, provider); + + ConfigurationManager configManager = new ConfigurationManager(); + configManager.WriteServiceProvider(response.Provider, true); + } +//================================================================================================== +/// +/// +/// +//================================================================================================== + public void LoadExtension(ServiceProvider targetProvider) + { + string moduleName = targetProvider.Name; + AppDomain currentDomain = AppDomain.CurrentDomain; + Evidence asEvidence = currentDomain.Evidence; + + ConfigurationManager configManager = new ConfigurationManager(); + configManager.Load(); + + // Load the specified module. We take a before and after snapshot of assemblies loaded in the current AppDomain. + // The targetList represents only what's been added... + + Assembly[] originalList = currentDomain.GetAssemblies(); + this.Session.InvokeCommand.InvokeScript("Import-Module " + moduleName + " -DisableNameChecking"); + Assembly[] modifiedList = currentDomain.GetAssemblies(); + var targetList = modifiedList.Except(originalList); + + foreach (Assembly assembly in targetList) + { + // Grab a Type instance for the first occurrence of a subtyped RegistrationManager. Create a new instance from that System.Type so that we can + // let them supply the IOpenStackCredential instance... + + Type registrationManagerType = assembly.GetTypes().Where(b => b.BaseType.UnderlyingSystemType.FullName == "OpenStack.Client.Powershell.Utility.RegistrationManager").First(); + RegistrationManager manager = (RegistrationManager)Activator.CreateInstance(registrationManagerType, null); + RegistrationResponse response = manager.Register(configManager.GetServiceProvider(moduleName)); + IOpenStackCredential credential = response.Credentials; + + // Create our Extension Client and stash it.... + + var client = OpenStackClientFactory.CreateClient(credential); + var connectTask = client.Connect(); + connectTask.Wait(); + + // Save the credentials .. + + configManager.WriteServiceProvider(response.Provider); + + // Store Context and Client so that all PS-Providers and Cmdlets have access to it.. + + this.SetSessionState(credential, client, targetProvider); + } + } + } +} diff --git a/Openstack.Client.Powershell/Utility/OpenstackCoreRegistrationManager.cs b/Openstack.Client.Powershell/Utility/OpenstackCoreRegistrationManager.cs new file mode 100644 index 0000000..8f55096 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/OpenstackCoreRegistrationManager.cs @@ -0,0 +1,51 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using System.Text; +using System.Threading.Tasks; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Identity; + +namespace OpenStack.Client.Powershell.Utility +{ + public class OpenstackCoreRegistrationManager : RegistrationManager + { + public override RegistrationResponse Register(ServiceProvider serviceProvider) + { + this.ValidateCredentialElements(ref serviceProvider); + + string authenticationEndpoint = serviceProvider.CredentialElements.Where(ce => ce.Key == "AuthenticationServiceURI").Single().Value; + string userName = serviceProvider.CredentialElements.Where(ce => ce.Key == "Username").Single().Value; + string password = serviceProvider.CredentialElements.Where(ce => ce.Key == "Password").Single().Value; + string tenantId = serviceProvider.CredentialElements.Where(ce => ce.Key == "DefaultTenantId").Single().Value; + IOpenStackCredential credential = new OpenStackCredential(new Uri (authenticationEndpoint), userName, password, tenantId); + + return new RegistrationResponse(credential, serviceProvider); + } + + private SecureString GetSecureString(string password) + { + SecureString securePassword = new SecureString(); + password.ToCharArray().ToList().ForEach(securePassword.AppendChar); + return SecureStringHelper.ConvertToSecureString(password); + + } + } +} + diff --git a/Openstack.Client.Powershell/Utility/RegistrationManager.cs b/Openstack.Client.Powershell/Utility/RegistrationManager.cs new file mode 100644 index 0000000..068b21b --- /dev/null +++ b/Openstack.Client.Powershell/Utility/RegistrationManager.cs @@ -0,0 +1,95 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using OpenStack.Identity; + +namespace OpenStack.Client.Powershell.Utility +{ + public abstract class RegistrationManager + { + // public abstract ServiceProviderInfo CreateCredential(Dictionary configValues); + public abstract RegistrationResponse Register(ServiceProvider serviceProvider); +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + protected void ValidateCredentialElements (ref ServiceProvider serviceProvider) + { + // If there are any CredentialElements with empty values, get them now from the User.. + + List elements = serviceProvider.CredentialElements; + if (elements.Where(e => e.Value == String.Empty).Any()) + { + this.WriteGetCredentialsHeader(); + + for (int i = 0; i < elements.Count; i++) + { + if (elements[i].IsMandatory && elements[i].Value == String.Empty) { + elements[i].Value = this.PromptForCredentialElement(elements[i]); + } + } + } + + // Also check that the ServiceProvider name was supplied.. + + if (serviceProvider.Name == String.Empty) + { + Console.WriteLine(""); + Console.WriteLine("Service Provider Name :"); + Console.WriteLine(""); + serviceProvider.Name = Console.ReadLine(); + } + } +//================================================================================================== +/// +/// +/// +/// +//================================================================================================== + private string PromptForCredentialElement(CredentialElement element) + { + Console.WriteLine(""); + Console.WriteLine(element.DisplayName + " :"); + Console.WriteLine(""); + return Console.ReadLine(); + } +//================================================================================================== +/// +/// Writes out header information to be used during the process that prompts for new credentials. +/// +//================================================================================================== + private void WriteGetCredentialsHeader() + { + Console.WriteLine(""); + Console.ForegroundColor = ConsoleColor.DarkGray; + Console.WriteLine("======================================================================================================="); + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine("We've noticed that you haven't supplied any credentials yet. To continue we need to get your Username, "); + Console.WriteLine("Password, and the Tenant Id provided to you during the sign up process. If you haven't signed up"); + Console.WriteLine("for any services yet, just go to https://console.OpenStack.com for details on how to get started today!"); + Console.ForegroundColor = ConsoleColor.DarkGray; + Console.WriteLine("======================================================================================================="); + Console.ForegroundColor = ConsoleColor.Green; + Console.WriteLine(" "); + } + } +} diff --git a/Openstack.Client.Powershell/Utility/RegistrationResponse.cs b/Openstack.Client.Powershell/Utility/RegistrationResponse.cs new file mode 100644 index 0000000..240a087 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/RegistrationResponse.cs @@ -0,0 +1,50 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using OpenStack.Identity; + +namespace OpenStack.Client.Powershell.Utility +{ + public class RegistrationResponse + { + private IOpenStackCredential _credentials; + private ServiceProvider _provider; + + public ServiceProvider Provider + { + get { return _provider; } + set { _provider = value; } + } + + public RegistrationResponse() + { } + + public RegistrationResponse(IOpenStackCredential credential, ServiceProvider provider) + { + _credentials = credential; + _provider = provider; + } + public IOpenStackCredential Credentials + { + get { return _credentials; } + set { _credentials = value; } + } + } +} diff --git a/Openstack.Client.Powershell/Utility/SecureStringHelper.cs b/Openstack.Client.Powershell/Utility/SecureStringHelper.cs new file mode 100644 index 0000000..6db7038 --- /dev/null +++ b/Openstack.Client.Powershell/Utility/SecureStringHelper.cs @@ -0,0 +1,68 @@ +/* ============================================================================ +Copyright 2014 Hewlett Packard + +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. +============================================================================ */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security; +using System.Text; +using System.Threading.Tasks; + +namespace OpenStack.Client.Powershell.Utility +{ + public static class SecureStringHelper + { + //================================================================================================== + /// + /// + /// + /// + /// + //================================================================================================== + public static string convertToUNSecureString(SecureString secstrPassword) + { + IntPtr unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(secstrPassword); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } + //================================================================================================== + /// + /// + /// + /// + /// + //================================================================================================== + public static SecureString ConvertToSecureString(string value) + { + // Instantiate the secure string. + SecureString securePwd = new SecureString(); + var secureStr = new SecureString(); + if (value.Length > 0) + { + foreach (var c in value.ToCharArray()) secureStr.AppendChar(c); + } + else return null; + return secureStr; + } + } +} diff --git a/Openstack.Client.Powershell/Utility/ServiceProvider.cs b/Openstack.Client.Powershell/Utility/ServiceProvider.cs index 5e51b0a..4c9378a 100644 --- a/Openstack.Client.Powershell/Utility/ServiceProvider.cs +++ b/Openstack.Client.Powershell/Utility/ServiceProvider.cs @@ -19,44 +19,63 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { - public class ServiceProvider + public class ServiceProvider { private string _name; private bool _isDefault = false; private string _authenticationServiceURI; private string _defaultTenantId; - private string _username; + private bool _isDirty = false; + private List _credentialElements = new List(); + private string _configFilePath; - public string Username + public string ConfigFilePath { - get { return _username; } - set { _username = value; } + get { return _configFilePath; } + set { _configFilePath = value; } + } + + public List CredentialElements + { + get { return _credentialElements; } + set { _credentialElements = value; } + } + + + public bool IsDirty + { + get { return _isDirty; } + set { _isDirty = value; } } public string DefaultTenantId { get { return _defaultTenantId; } - set { _defaultTenantId = value; } + set + { + _defaultTenantId = value; + _isDirty = true; + } } public string AuthenticationServiceURI { get { return _authenticationServiceURI; } - set { _authenticationServiceURI = value; } + set { _authenticationServiceURI = value; _isDirty = true; } } public bool IsDefault { get { return _isDefault; } - set { _isDefault = value; } + set { _isDefault = value; _isDirty = true; } } public string Name { get { return _name; } - set { _name = value; } + set { _name = value; _isDirty = true; } } } } diff --git a/Openstack.Client.Powershell/Utility/Settings.cs b/Openstack.Client.Powershell/Utility/Settings.cs index 14e7916..0073646 100644 --- a/Openstack.Client.Powershell/Utility/Settings.cs +++ b/Openstack.Client.Powershell/Utility/Settings.cs @@ -21,12 +21,29 @@ using System.Xml.Linq; using System.Collections; using System.Configuration; using System.IO; +using System.Xml.XPath; +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Policy; +using OpenStack.Client.Powershell.Utility; +using System.Linq; +using OpenStack.Identity; +using System.Threading; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { public sealed partial class Settings : Hashtable { private static Settings defaultInstance = new Settings(); + private static string _configFilePath; + private XDocument _document; + + public string ConfigFilePath + { + get { return _configFilePath; } + set { _configFilePath = value; } + } #region Ctors //================================================================================================== @@ -656,20 +673,18 @@ namespace Openstack.Client.Powershell.Utility //================================================================================================== public void Reset() { - System.Diagnostics.Debug.WriteLine("here"); - - if (File.Exists("CLI.config")) + if (File.Exists("OpenStack.config")) { - this.Load("CLI.config"); + this.Load("OpenStack.config"); } - else if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config")) + else if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config")) { - string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config"; + string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; this.Load(configFilePath); } else { - throw new InvalidOperationException("Unable to locate CLI.config file."); + throw new InvalidOperationException("Unable to locate OpenStack.config file."); } } //================================================================================================== @@ -696,6 +711,7 @@ namespace Openstack.Client.Powershell.Utility { Settings settings = new Settings(true); XDocument document = XDocument.Load(configFilePath); + _configFilePath = configFilePath; foreach (XElement element in document.Descendants("add")) { @@ -713,7 +729,7 @@ namespace Openstack.Client.Powershell.Utility } //================================================================================================== /// -/// Fully Qualified path to a config file +/// Fully Qualified path to a config file /// /// //================================================================================================== @@ -722,12 +738,17 @@ namespace Openstack.Client.Powershell.Utility try { XDocument document = XDocument.Load(configFilePath); + _configFilePath = configFilePath; this.Clear(); foreach (XElement element in document.Descendants("add")) { string key = element.Attribute(XName.Get("key")).Value; string value = element.Attribute(XName.Get("value")).Value; - this.Add(key, value); + try + { + this.Add(key, value); + } + catch (Exception) { } } } catch (Exception ex) @@ -736,6 +757,31 @@ namespace Openstack.Client.Powershell.Utility throw ex; } } +//========================================================================================= +/// +/// +/// +/// +//========================================================================================= + private string GetConfigPath() + { + //if (_configFilePath != null) + // return _configFilePath; + + if (File.Exists("OpenStack.config")) + { + return this.GetType().Assembly.Location; + } + else if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config")) + { + return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\OpenStack.config"; + } + else + { + throw new InvalidOperationException("Unable to locate OpenStack.config file."); + } + } + #endregion } } diff --git a/Openstack.Client.Powershell/Utility/StoragePath.cs b/Openstack.Client.Powershell/Utility/StoragePath.cs index 654c020..52322e7 100644 --- a/Openstack.Client.Powershell/Utility/StoragePath.cs +++ b/Openstack.Client.Powershell/Utility/StoragePath.cs @@ -18,14 +18,14 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.IO; -using Openstack; -using Openstack.Client.Powershell.Utility; +using OpenStack; +using OpenStack.Client.Powershell.Utility; using System.Collections.ObjectModel; -using Openstack.Common; +using OpenStack.Common; using System.Diagnostics.Contracts; using System.Web; -namespace Openstack.Client.Powershell.Utility +namespace OpenStack.Client.Powershell.Utility { public class StoragePath { diff --git a/Openstack.Client.Powershell/app.config b/Openstack.Client.Powershell/app.config index 6193adb..daf5661 100644 --- a/Openstack.Client.Powershell/app.config +++ b/Openstack.Client.Powershell/app.config @@ -2,14 +2,14 @@ -
+
- + - C:\Projects\OS\Openstack.Client.Powershell\Openstack.Client.AsyncQueue\Openstack.Client.AsyncQueue\bin\Debug\Openstack.Client.AsyncQueue.exe + C:\Projects\OS\OpenStack.Client.Powershell\OpenStack.Client.AsyncQueue\OpenStack.Client.AsyncQueue\bin\Debug\OpenStack.Client.AsyncQueue.exe - + diff --git a/Openstack.Client.Powershell/bin/Release/AWSSDK.dll b/Openstack.Client.Powershell/bin/Release/AWSSDK.dll deleted file mode 100644 index d8235cc..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/AWSSDK.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/AWSSDK.pdb b/Openstack.Client.Powershell/bin/Release/AWSSDK.pdb deleted file mode 100644 index f5d447d..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/AWSSDK.pdb and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/BouncyCastle.Crypto.dll b/Openstack.Client.Powershell/bin/Release/BouncyCastle.Crypto.dll deleted file mode 100644 index a078d27..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/BouncyCastle.Crypto.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/Deployment/CLI.config b/Openstack.Client.Powershell/bin/Release/Deployment/Openstack.config similarity index 75% rename from Openstack.Client.Powershell/Deployment/CLI.config rename to Openstack.Client.Powershell/bin/Release/Deployment/Openstack.config index a884916..139be7f 100644 --- a/Openstack.Client.Powershell/Deployment/CLI.config +++ b/Openstack.Client.Powershell/bin/Release/Deployment/Openstack.config @@ -31,11 +31,17 @@ - - - - - + + + + + + + + + + + diff --git a/Openstack.Client.Powershell/Deployment/CLIManifest.psd1 b/Openstack.Client.Powershell/bin/Release/Deployment/Openstack.psd1 similarity index 93% rename from Openstack.Client.Powershell/Deployment/CLIManifest.psd1 rename to Openstack.Client.Powershell/bin/Release/Deployment/Openstack.psd1 index 4e9bf61..13128c2 100644 --- a/Openstack.Client.Powershell/Deployment/CLIManifest.psd1 +++ b/Openstack.Client.Powershell/bin/Release/Deployment/Openstack.psd1 @@ -8,7 +8,7 @@ ModuleVersion="1.0.0.0" PowerShellVersion="2.0" CLRVersion="4.0.30319" FormatsToProcess="OpenstackShell.format.ps1xml" -FileList='CLI.config' +FileList='Openstack.config' RequiredAssemblies = 'Openstack.dll', 'Openstack.Common.dll' } diff --git a/Openstack.Client.Powershell/bin/Release/Deployment/OpenstackShell.format.ps1xml b/Openstack.Client.Powershell/bin/Release/Deployment/OpenstackShell.format.ps1xml index e9597e8..b88bb75 100644 --- a/Openstack.Client.Powershell/bin/Release/Deployment/OpenstackShell.format.ps1xml +++ b/Openstack.Client.Powershell/bin/Release/Deployment/OpenstackShell.format.ps1xml @@ -889,7 +889,7 @@ process4 - Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemModelView + Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemViewModel diff --git a/Openstack.Client.Powershell/bin/Release/Deployment/ScratchPad/AnotherTest.txt b/Openstack.Client.Powershell/bin/Release/Deployment/ScratchPad/AnotherTest.txt deleted file mode 100644 index 103d384..0000000 --- a/Openstack.Client.Powershell/bin/Release/Deployment/ScratchPad/AnotherTest.txt +++ /dev/null @@ -1,92 +0,0 @@ -==================================================================================================================== -/// -/// -/// -/// -/// -/// -//====================================================================================================================== - public StorageObject GetStorageObject(string path) - { - try - { - path = path.Replace(@"\", "/"); - RequestHeaders headers = StorageRequestSigner.CreateSignedHeaders(HttpMethod.GET, path); - string resourcePath = ["StorageManagementURI"] + "/" + path; - HttpClient client = new HttpClient(); - client.DefaultHeaders = headers; - - Uri uri = new Uri(resourcePath); - HttpResponseMessage msg = client.Get(uri); - - if (msg.StatusCode == System.Net.HttpStatusCode.OK) - { - msg.Content.LoadIntoBufferAsync(); - StorageObject storageObject = new StorageObject(); - storageObject.Key = path; - storageObject.Load(msg.Content.ReadAsStream()); - this.CopyCommonRequestHeaders(ref storageObject, msg.Headers); - return storageObject; - } - else - { - return null; - } - } - catch (Exception ex) - { - Console.WriteLine(ex); - } - return null; - } -//====================================================================================================================== -/// -/// -/// -/// -/// -//====================================================================================================================== - public bool IsValidPath(string storageContainer, string path) - { - HttpClient client = new HttpClient(); - Uri uri = new Uri(["StorageManagementURI"] + cDelimiter + storageContainer + cDelimiter + path + cDelimiter + "folder.txt"); - string rootCheck = null; - - if (path == cDelimiter) { - rootCheck = String.Empty; - } - else { - rootCheck = cFolderMarker; - } - - - if (this.GetStorageObject(storageContainer + cDelimiter + path + cDelimiter + rootCheck) != null) - { - return true; - } - else - { - return false; - } - } -//====================================================================================================================== -/// -/// -/// -/// -//====================================================================================================================== - public StorageObjects GetStorageObjects (string storageContainer, string path) - { - HttpQueryString queryString = new HttpQueryString(); - - if (path == "") - { - queryString.Add("prefix", "" ); - queryString.Add("delimiter", "/"); - } - else - { - path = path.Replace(@"\", "/"); - queryString.Add("prefix", path); - queryString.Add("delimiter", "/"); - } \ No newline at end of file diff --git a/Openstack.Client.Powershell/bin/Release/Microsoft.ComponentModel.Composition.Diagnostics.dll b/Openstack.Client.Powershell/bin/Release/Microsoft.ComponentModel.Composition.Diagnostics.dll deleted file mode 100644 index 3503ee3..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Microsoft.ComponentModel.Composition.Diagnostics.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/MyPackage.1.0.0.nupkg b/Openstack.Client.Powershell/bin/Release/MyPackage.1.0.0.nupkg deleted file mode 100644 index 9ec0010..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/MyPackage.1.0.0.nupkg and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.dll b/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.dll deleted file mode 100644 index 1c16c11..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.xml b/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.xml deleted file mode 100644 index e91d694..0000000 --- a/Openstack.Client.Powershell/bin/Release/Newtonsoft.Json.xml +++ /dev/null @@ -1,7583 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Skips the children of the current token. - - - - - Sets the current token. - - The new token. - - - - Sets the current token and value. - - The new token. - The value. - - - - Sets the state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Gets the current reader state. - - The current reader state. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the reader is closed; otherwise false. The default is true. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets the type of the current JSON token. - - - - - Gets the text value of the current JSON token. - - - - - Gets The Common Language Runtime (CLR) type for the current JSON token. - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Specifies the state of the reader. - - - - - The Read method has not been called. - - - - - The end of the file has been reached successfully. - - - - - Reader is at a property. - - - - - Reader is at the start of an object. - - - - - Reader is in an object. - - - - - Reader is at the start of an array. - - - - - Reader is in an array. - - - - - The Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader in a constructor. - - - - - An error occurred that prevents the read operation from continuing. - - - - - The end of the file has been reached successfully. - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The reader. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - - A . This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. - - - true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. - - - - - Gets or sets a value indicating whether the root object will be read as a JSON array. - - - true if the root object will be read as a JSON array; otherwise, false. - - - - - Gets or sets the used when reading values from BSON. - - The used when reading values from BSON. - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the end of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the end of an array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end constructor. - - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes the end of the current Json object or array. - - - - - Writes the current token. - - The to read the token from. - - - - Writes the specified end token. - - The end token to write. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON without changing the writer's state. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the writer is closed; otherwise false. The default is true. - - - - - Gets the top. - - The top. - - - - Gets the state of the writer. - - - - - Gets the path of the writer. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON. - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes the beginning of a Json array. - - - - - Writes the beginning of a Json object. - - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Closes this stream and the underlying stream. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value that represents a BSON object id. - - - - - - Writes a BSON regex. - - The regex pattern. - The regex options. - - - - Gets or sets the used when writing values to BSON. - When set to no conversion will occur. - - The used when writing values to BSON. - - - - Represents a BSON Oid (object id). - - - - - Initializes a new instance of the class. - - The Oid value. - - - - Gets or sets the value of the Oid. - - The value of the Oid. - - - - Converts a binary value to and from a base 64 string value. - - - - - Converts an object to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets the of the JSON produced by the JsonConverter. - - The of the JSON produced by the JsonConverter. - - - - Gets a value indicating whether this can read JSON. - - true if this can read JSON; otherwise, false. - - - - Gets a value indicating whether this can write JSON. - - true if this can write JSON; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Create a custom object - - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Creates an object which will then be populated by the serializer. - - Type of the object. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Provides a base class for converting a to and from JSON. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an Entity Framework EntityKey to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an ExpandoObject to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from its name string value. - - - Converts an to and from its name string value. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - A cached representation of the Enum string representation to respect per Enum field name. - - The type of the Enum. - A map of enum field name to either the field name, or the configured enum member name (). - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets or sets a value indicating whether the written enum text should be camel case. - - true if the written enum text will be camel case; otherwise, false. - - - - Specifies how constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a paramatized constructor. - - - - - Converts a to and from a string (e.g. "1.2.3.4"). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Instructs the how to serialize the collection. - - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the id. - - The id. - - - - Gets or sets the title. - - The title. - - - - Gets or sets the description. - - The description. - - - - Gets the collection's items converter. - - The collection's items converter. - - - - Gets or sets a value that indicates whether to preserve object references. - - - true to keep object reference; otherwise, false. The default is false. - - - - - Gets or sets a value that indicates whether to preserve collection's items references. - - - true to keep collection's items object references; otherwise, false. The default is false. - - - - - Gets or sets the reference loop handling used when serializing the collection's items. - - The reference loop handling. - - - - Gets or sets the type name handling used when serializing the collection's items. - - The type name handling. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Specifies how dates are formatted when writing JSON text. - - - - - Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". - - - - - Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". - - - - - Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. - - - - - Date formatted strings are not parsed to a date type and are read as strings. - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Specifies how to treat the time value when converting between string and . - - - - - Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. - - - - - Treat as a UTC. If the object represents a local time, it is converted to a UTC. - - - - - Treat as a local time if a is being converted to a string. - If a string is being converted to , convert to a local time if a time zone is specified. - - - - - Time zone information should be preserved when converting. - - - - - Specifies formatting options for the . - - - - - No special formatting is applied. This is the default. - - - - - Causes child objects to be indented according to the and settings. - - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - Contract details for a used by the . - - - - - Contract details for a used by the . - - - - - Gets the underlying type for the contract. - - The underlying type for the contract. - - - - Gets or sets the type created during deserialization. - - The type created during deserialization. - - - - Gets or sets whether this type contract is serialized as a reference. - - Whether this type contract is serialized as a reference. - - - - Gets or sets the default for this contract. - - The converter. - - - - Gets or sets the method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the default creator method used to create the object. - - The default creator method used to create the object. - - - - Gets or sets a value indicating whether the default creator is non public. - - true if the default object creator is non-public; otherwise, false. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method called when an error is thrown during the serialization of the object. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the default collection items . - - The converter. - - - - Gets or sets a value indicating whether the collection items preserve object references. - - true if collection items preserve object references; otherwise, false. - - - - Gets or sets the collection item reference loop handling. - - The reference loop handling. - - - - Gets or sets the collection item type name handling. - - The type name handling. - - - - Represents a raw JSON string. - - - - - Represents a value in JSON (string, integer, date, etc). - - - - - Represents an abstract JSON token. - - - - - Represents a collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - Provides an interface to enable a class to return line and position information. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Compares the values of two tokens, including the values of all descendant tokens. - - The first to compare. - The second to compare. - true if the tokens are equal; otherwise false. - - - - Adds the specified content immediately after this token. - - A content object that contains simple content or a collection of content objects to be added after this token. - - - - Adds the specified content immediately before this token. - - A content object that contains simple content or a collection of content objects to be added before this token. - - - - Returns a collection of the ancestor tokens of this token. - - A collection of the ancestor tokens of this token. - - - - Returns a collection of the sibling tokens after this token, in document order. - - A collection of the sibling tokens after this tokens, in document order. - - - - Returns a collection of the sibling tokens before this token, in document order. - - A collection of the sibling tokens before this token, in document order. - - - - Gets the with the specified key converted to the specified type. - - The type to convert the token to. - The token key. - The converted token value. - - - - Returns a collection of the child tokens of this token, in document order. - - An of containing the child tokens of this , in document order. - - - - Returns a collection of the child tokens of this token, in document order, filtered by the specified type. - - The type to filter the child tokens on. - A containing the child tokens of this , in document order. - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - A containing the child values of this , in document order. - - - - Removes this token from its parent. - - - - - Replaces this token with the specified token. - - The value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Returns the indented JSON for this token. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of which will be used when writing the token. - The JSON for this token using the given formatting and converters. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Creates an for this token. - - An that can be used to read this token and its descendants. - - - - Creates a from an object. - - The object that will be used to create . - A with the value of the specified object - - - - Creates a from an object using the specified . - - The object that will be used to create . - The that will be used when reading the object. - A with the value of the specified object - - - - Creates the specified .NET type from the . - - The new object created from the JSON value. - - - - Creates the specified .NET type from the using the specified . - - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Selects the token that matches the object path. - - - The object path from the current to the - to be returned. This must be a string of property names or array indexes separated - by periods, such as Tables[0].DefaultView[0].Price in C# or - Tables(0).DefaultView(0).Price in Visual Basic. - - The that matches the object path or a null reference if no matching token is found. - - - - Selects the token that matches the object path. - - - The object path from the current to the - to be returned. This must be a string of property names or array indexes separated - by periods, such as Tables[0].DefaultView[0].Price in C# or - Tables(0).DefaultView(0).Price in Visual Basic. - - A flag to indicate whether an error should be thrown if no token is found. - The that matches the object path. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Creates a new instance of the . All child tokens are recursively cloned. - - A new instance of the . - - - - Gets a comparer that can compare two tokens for value equality. - - A that can compare two nodes for value equality. - - - - Gets or sets the parent. - - The parent. - - - - Gets the root of this . - - The root of this . - - - - Gets the node type for this . - - The type. - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the next sibling token of this node. - - The that contains the next sibling token. - - - - Gets the previous sibling token of this node. - - The that contains the previous sibling token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Get the first child token of this token. - - A containing the first child token of the . - - - - Get the last child token of this token. - - A containing the last child token of the . - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Creates a comment with the given value. - - The value. - A comment with the given value. - - - - Creates a string with the given value. - - The value. - A string with the given value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format provider. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - The format provider. - - A that represents this instance. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. - - An object to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: - Value - Meaning - Less than zero - This instance is less than . - Zero - This instance is equal to . - Greater than zero - This instance is greater than . - - - is not the same type as this instance. - - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the node type for this . - - The type. - - - - Gets or sets the underlying token value. - - The underlying token value. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The raw json. - - - - Creates an instance of with the content of the reader's current token. - - The reader. - An instance of with the content of the reader's current token. - - - - Indicating whether a property is required. - - - - - The property is not required. The default state. - - - - - The property must be defined in JSON but can be a null value. - - - - - The property must be defined in JSON and cannot be a null value. - - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the object's properties. - - The object's properties. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the ISerializable object constructor. - - The ISerializable object constructor. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Get and set values for a using dynamic methods. - - - - - Provides methods to get and set values. - - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides data for the Error event. - - - - - Initializes a new instance of the class. - - The current object. - The error context. - - - - Gets the current object the error event is being raised against. - - The current object the error event is being raised against. - - - - Gets the error context. - - The error context. - - - - Represents a view of a . - - - - - Initializes a new instance of the class. - - The name. - Type of the property. - - - - When overridden in a derived class, returns whether resetting an object changes its value. - - - true if resetting the component changes its value; otherwise, false. - - The component to test for reset capability. - - - - - When overridden in a derived class, gets the current value of the property on a component. - - - The value of a property for a given component. - - The component with the property for which to retrieve the value. - - - - - When overridden in a derived class, resets the value for this property of the component to the default value. - - The component with the property value that is to be reset to the default value. - - - - - When overridden in a derived class, sets the value of the component to a different value. - - The component with the property value that is to be set. - The new value. - - - - - When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. - - - true if the property should be persisted; otherwise, false. - - The component with the property to be examined for persistence. - - - - - When overridden in a derived class, gets the type of the component this property is bound to. - - - A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. - - - - - When overridden in a derived class, gets a value indicating whether this property is read-only. - - - true if the property is read-only; otherwise, false. - - - - - When overridden in a derived class, gets the type of the property. - - - A that represents the type of the property. - - - - - Gets the hash code for the name of the member. - - - - The hash code for the name of the member. - - - - - Used to resolve references when serializing and deserializing JSON by the . - - - - - Resolves a reference to its object. - - The serialization context. - The reference to resolve. - The object that - - - - Gets the reference for the sepecified object. - - The serialization context. - The object to get a reference for. - The reference to the object. - - - - Determines whether the specified object is referenced. - - The serialization context. - The object to test for a reference. - - true if the specified object is referenced; otherwise, false. - - - - - Adds a reference to the specified object. - - The serialization context. - The reference. - The object to reference. - - - - Specifies reference handling options for the . - - - - - Do not preserve references when serializing types. - - - - - Preserve references when serializing into a JSON object structure. - - - - - Preserve references when serializing into a JSON array structure. - - - - - Preserve references when serializing. - - - - - Instructs the how to serialize the collection. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a flag indicating whether the array can contain null items - - A flag indicating whether the array can contain null items. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets a value indicating whether null items are allowed in the collection. - - true if null items are allowed in the collection; otherwise, false. - - - - Specifies default value handling options for the . - - - - - Include members where the member value is the same as the member's default value when serializing objects. - Included members are written to JSON. Has no effect when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - so that is is not written to JSON, and ignores setting members when the JSON value equals the member's default value. - - - - - Members with a default value but no JSON will be set to their default value when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - and sets members to their default value when deserializing. - - - - - Instructs the to use the specified when serializing the member or class. - - - - - Initializes a new instance of the class. - - Type of the converter. - - - - Gets the type of the converter. - - The type of the converter. - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified member serialization. - - The member serialization. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the member serialization. - - The member serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Specifies the settings on a object. - - - - - Initializes a new instance of the class. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - Reference loop handling. - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - The default value handling. - - - - Gets or sets a collection that will be used during serialization. - - The converters. - - - - Gets or sets how object references are preserved by the serializer. - - The preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - The type name handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - The contract resolver. - - - - Gets or sets the used by the serializer when resolving references. - - The reference resolver. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the error handler called during serialization and deserialization. - - The error handler called during serialization and deserialization. - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - true if there will be a check for additional content after deserializing an object; otherwise, false. - - - - - Represents a reader that provides validation. - - - - - Initializes a new instance of the class that - validates the content returned from the given . - - The to read from while validating. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Sets an event handler for receiving schema validation errors. - - - - - Gets the text value of the current Json token. - - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - - Gets the type of the current Json token. - - - - - - Gets the Common Language Runtime (CLR) type for the current Json token. - - - - - - Gets or sets the schema. - - The schema. - - - - Gets the used to construct this . - - The specified in the constructor. - - - - Compares tokens to determine whether they are equal. - - - - - Determines whether the specified objects are equal. - - The first object of type to compare. - The second object of type to compare. - - true if the specified objects are equal; otherwise, false. - - - - - Returns a hash code for the specified object. - - The for which a hash code is to be returned. - A hash code for the specified object. - The type of is a reference type and is null. - - - - Specifies the member serialization options for the . - - - - - All public members are serialized by default. Members can be excluded using or . - This is the default member serialization mode. - - - - - Only members must be marked with or are serialized. - This member serialization mode can also be set by marking the class with . - - - - - All public and private fields are serialized. Members can be excluded using or . - This member serialization mode can also be set by marking the class with - and setting IgnoreSerializableAttribute on to false. - - - - - Specifies how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Gets or sets the date time styles used when converting a date to and from JSON. - - The date time styles used when converting a date to and from JSON. - - - - Gets or sets the date time format used when converting a date to and from JSON. - - The date time format used when converting a date to and from JSON. - - - - Gets or sets the culture used when converting a date to and from JSON. - - The culture used when converting a date to and from JSON. - - - - Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts XML to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The calling serializer. - The value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Checks if the attributeName is a namespace attribute. - - Attribute name to test. - The attribute name prefix if it has one, otherwise an empty string. - True if attribute name is for a namespace attribute, otherwise false. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - true if the array attibute is written to the XML; otherwise, false. - - - - Gets or sets a value indicating whether to write the root JSON object. - - true if the JSON root object is omitted; otherwise, false. - - - - Represents a reader that provides fast, non-cached, forward-only access to JSON text data. - - - - - Initializes a new instance of the class with the specified . - - The TextReader containing the XML data to read. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Instructs the to always serialize the member with the specified name. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - Name of the property. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets the null value handling used when serializing this property. - - The null value handling. - - - - Gets or sets the default value handling used when serializing this property. - - The default value handling. - - - - Gets or sets the reference loop handling used when serializing this property. - - The reference loop handling. - - - - Gets or sets the object creation handling used when deserializing this property. - - The object creation handling. - - - - Gets or sets the type name handling used when serializing this property. - - The type name handling. - - - - Gets or sets whether this property's value is serialized as a reference. - - Whether this property's value is serialized as a reference. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets a value indicating whether this property is required. - - - A value indicating whether this property is required. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the specified end token. - - The end token to write. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Represents a collection of . - - - - - Provides methods for converting between common language runtime types and JSON types. - - - - - Represents JavaScript's boolean value true as a string. This field is read-only. - - - - - Represents JavaScript's boolean value false as a string. This field is read-only. - - - - - Represents JavaScript's null as a string. This field is read-only. - - - - - Represents JavaScript's undefined as a string. This field is read-only. - - - - - Represents JavaScript's positive infinity as a string. This field is read-only. - - - - - Represents JavaScript's negative infinity as a string. This field is read-only. - - - - - Represents JavaScript's NaN as a string. This field is read-only. - - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - The time zone handling when the date is converted to a string. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Serializes the specified object to a JSON string. - - The object to serialize. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string. - - The object to serialize. - Indicates how the output is formatted. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - The deserialized object from the Json string. - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The of object being deserialized. - The deserialized object from the Json string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - The deserialized object from the Json string. - - - - Deserializes the JSON to the given anonymous type. - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be infered from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The object to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - - - Asynchronously populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous populate operation. - - - - - Serializes the XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - - A flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized XmlNode - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - - A flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized XNode - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Serializes and deserializes objects into and from the JSON format. - The enables you to control how objects are encoded into JSON. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance using the specified . - - The settings to be applied to the . - A new instance using the specified . - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Deserializes the Json structure contained by the specified . - - The that contains the JSON structure to deserialize. - The being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The type of the object to deserialize. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Occurs when the errors during serialization and deserialization. - - - - - Gets or sets the used by the serializer when resolving references. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets a collection that will be used during serialization. - - Collection that will be used during serialization. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - true if there will be a check for additional JSON content after deserializing an object; otherwise, false. - - - - - Contains the LINQ to JSON extension methods. - - - - - Returns a collection of tokens that contains the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the ancestors of every node in the source collection. - - - - Returns a collection of tokens that contains the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the descendants of every node in the source collection. - - - - Returns a collection of child properties of every object in the source collection. - - An of that contains the source collection. - An of that contains the properties of every object in the source collection. - - - - Returns a collection of child values of every object in the source collection with the given key. - - An of that contains the source collection. - The token key. - An of that contains the values of every node in the source collection with the given key. - - - - Returns a collection of child values of every object in the source collection. - - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child values of every object in the source collection with the given key. - - The type to convert the values to. - An of that contains the source collection. - The token key. - An that contains the converted values of every node in the source collection with the given key. - - - - Returns a collection of converted child values of every object in the source collection. - - The type to convert the values to. - An of that contains the source collection. - An that contains the converted values of every node in the source collection. - - - - Converts the value. - - The type to convert the value to. - A cast as a of . - A converted value. - - - - Converts the value. - - The source collection type. - The type to convert the value to. - A cast as a of . - A converted value. - - - - Returns a collection of child tokens of every array in the source collection. - - The source collection type. - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child tokens of every array in the source collection. - - An of that contains the source collection. - The type to convert the values to. - The source collection type. - An that contains the converted values of every node in the source collection. - - - - Returns the input typed as . - - An of that contains the source collection. - The input typed as . - - - - Returns the input typed as . - - The source collection type. - An of that contains the source collection. - The input typed as . - - - - Represents a JSON constructor. - - - - - Represents a token that can contain other tokens. - - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Returns a collection of the child tokens of this token, in document order. - - - An of containing the child tokens of this , in document order. - - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - - A containing the child values of this , in document order. - - - - - Returns a collection of the descendant tokens for this token in document order. - - An containing the descendant tokens of the . - - - - Adds the specified content as children of this . - - The content to be added. - - - - Adds the specified content as the first children of this . - - The content to be added. - - - - Creates an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children nodes of this token with the specified content. - - The content. - - - - Removes the child nodes from this token. - - - - - Occurs when the list changes or an item in the list changes. - - - - - Occurs before an item is added to the collection. - - - - - Occurs when the items list of the collection has changed, or the collection is reset. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Get the first child token of this token. - - - A containing the first child token of the . - - - - - Get the last child token of this token. - - - A containing the last child token of the . - - - - - Gets the count of child JSON tokens. - - The count of child JSON tokens - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name. - - The constructor name. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets or sets the name of this constructor. - - The constructor name. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Represents a collection of objects. - - The type of token - - - - An empty collection of objects. - - - - - Initializes a new instance of the struct. - - The enumerable. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Gets the with the specified key. - - - - - - Represents a JSON object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Gets an of this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An of this object's property values. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Adds the specified property name. - - Name of the property. - The value. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Returns the properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified property. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Occurs when a property value changes. - - - - - Occurs when a property value is changing. - - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the with the specified property name. - - - - - - Represents a JSON array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Determines the index of a specific item in the . - - The object to locate in the . - - The index of if found in the list; otherwise, -1. - - - - - Inserts an item to the at the specified index. - - The zero-based index at which should be inserted. - The object to insert into the . - - is not a valid index in the . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - - true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - - The is read-only. - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the at the specified index. - - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class. - - The token to read from. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Initializes a new instance of the class writing to the given . - - The container being written to. - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end. - - The token. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Gets the token being writen. - - The token being writen. - - - - Represents a JSON property. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the property name. - - The property name. - - - - Gets or sets the property value. - - The property value. - - - - Gets the node type for this . - - The type. - - - - Specifies the type of token. - - - - - No token type has been set. - - - - - A JSON object. - - - - - A JSON array. - - - - - A JSON constructor. - - - - - A JSON object property. - - - - - A comment. - - - - - An integer value. - - - - - A float value. - - - - - A string value. - - - - - A boolean value. - - - - - A null value. - - - - - An undefined value. - - - - - A date value. - - - - - A raw JSON value. - - - - - A collection of bytes value. - - - - - A Guid value. - - - - - A Uri value. - - - - - A TimeSpan value. - - - - - Contains the JSON schema extension methods. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - - true if the specified is valid; otherwise, false. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - When this method returns, contains any error messages generated while validating. - - true if the specified is valid; otherwise, false. - - - - - Validates the specified . - - The source to test. - The schema to test with. - - - - Validates the specified . - - The source to test. - The schema to test with. - The validation event handler. - - - - Returns detailed information about the schema exception. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Resolves from an id. - - - - - Initializes a new instance of the class. - - - - - Gets a for the specified id. - - The id. - A for the specified id. - - - - Gets or sets the loaded schemas. - - The loaded schemas. - - - - Specifies undefined schema Id handling options for the . - - - - - Do not infer a schema Id. - - - - - Use the .NET type name as the schema Id. - - - - - Use the assembly qualified .NET type name as the schema Id. - - - - - Returns detailed information related to the . - - - - - Gets the associated with the validation error. - - The JsonSchemaException associated with the validation error. - - - - Gets the path of the JSON location where the validation error occurred. - - The path of the JSON location where the validation error occurred. - - - - Gets the text description corresponding to the validation error. - - The text description. - - - - Represents the callback method that will handle JSON schema validation events and the . - - - - - Resolves member mappings for a type, camel casing property names. - - - - - Used by to resolves a for a given . - - - - - Used by to resolves a for a given . - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected - behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly - recommended to reuse instances with the . - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Gets the serializable members for the type. - - The type to get serializable members for. - The serializable members for the type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates the constructor parameters. - - The constructor to create properties for. - The type's member properties. - Properties for the given . - - - - Creates a for the given . - - The matching member property. - The constructor parameter. - A created for the given . - - - - Resolves the default for the contract. - - Type of the object. - - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Determines which contract type is created for the given type. - - Type of the object. - A for the given type. - - - - Creates properties for the given . - - The type to create properties for. - /// The member serialization mode for the type. - Properties for the given . - - - - Creates the used by the serializer to get and set values from a member. - - The member. - The used by the serializer to get and set values from a member. - - - - Creates a for the given . - - The member's parent . - The member to create a for. - A created for the given . - - - - Resolves the name of the property. - - Name of the property. - Name of the property. - - - - Gets the resolved name of the property. - - Name of the property. - Name of the property. - - - - Gets a value indicating whether members are being get and set using dynamic code generation. - This value is determined by the runtime permissions available. - - - true if using dynamic code generation; otherwise, false. - - - - - Gets or sets the default members search flags. - - The default members search flags. - - - - Gets or sets a value indicating whether compiler generated members should be serialized. - - - true if serialized compiler generated members; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. - - - true if the interface will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. - - - true if the attribute will be ignored when serializing and deserializing types; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Resolves the name of the property. - - Name of the property. - The property name camel cased. - - - - The default serialization binder used when resolving and loading classes from type names. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - The type of the object the formatter creates a new instance of. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Provides information surrounding an error. - - - - - Gets or sets the error. - - The error. - - - - Gets the original object that caused the error. - - The original object that caused the error. - - - - Gets the member that caused the error. - - The member that caused the error. - - - - Gets the path of the JSON location where the error occurred. - - The path of the JSON location where the error occurred. - - - - Gets or sets a value indicating whether this is handled. - - true if handled; otherwise, false. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the of the collection items. - - The of the collection items. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Gets the of the dictionary keys. - - The of the dictionary keys. - - - - Gets the of the dictionary values. - - The of the dictionary values. - - - - Maps a JSON property to a .NET member or constructor parameter. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the type that declared this property. - - The type that declared this property. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets the name of the underlying member or parameter. - - The name of the underlying member or parameter. - - - - Gets the that will get and set the during serialization. - - The that will get and set the during serialization. - - - - Gets or sets the type of the property. - - The type of the property. - - - - Gets or sets the for the property. - If set this converter takes presidence over the contract converter for the property type. - - The converter. - - - - Gets the member converter. - - The member converter. - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is readable. - - true if readable; otherwise, false. - - - - Gets a value indicating whether this is writable. - - true if writable; otherwise, false. - - - - Gets the default value. - - The default value. - - - - Gets a value indicating whether this is required. - - A value indicating whether this is required. - - - - Gets a value indicating whether this property preserves object references. - - - true if this instance is reference; otherwise, false. - - - - - Gets the property null value handling. - - The null value handling. - - - - Gets the property default value handling. - - The default value handling. - - - - Gets the property reference loop handling. - - The reference loop handling. - - - - Gets the property object creation handling. - - The object creation handling. - - - - Gets or sets the type name handling. - - The type name handling. - - - - Gets or sets a predicate used to determine whether the property should be serialize. - - A predicate used to determine whether the property should be serialize. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets an action used to set whether the property has been deserialized. - - An action used to set whether the property has been deserialized. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - A collection of objects. - - - - - Initializes a new instance of the class. - - The type. - - - - When implemented in a derived class, extracts the key from the specified element. - - The element from which to extract the key. - The key for the specified element. - - - - Adds a object. - - The property to add to the collection. - - - - Gets the closest matching object. - First attempts to get an exact case match of propertyName and then - a case insensitive match. - - Name of the property. - A matching property if found. - - - - Gets a property by property name. - - The name of the property to get. - Type property name string comparison. - A matching property if found. - - - - Specifies missing member handling options for the . - - - - - Ignore a missing member and do not attempt to deserialize it. - - - - - Throw a when a missing member is encountered during deserialization. - - - - - Specifies null value handling options for the . - - - - - Include null values when serializing and deserializing objects. - - - - - Ignore null values when serializing and deserializing objects. - - - - - Specifies reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - An in-memory representation of a JSON Schema. - - - - - Initializes a new instance of the class. - - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The object representing the JSON Schema. - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The to use when resolving schema references. - The object representing the JSON Schema. - - - - Load a from a string that contains schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - Writes this schema to a . - - A into which this method will write. - - - - Writes this schema to a using the specified . - - A into which this method will write. - The resolver used. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Gets or sets the id. - - - - - Gets or sets the title. - - - - - Gets or sets whether the object is required. - - - - - Gets or sets whether the object is read only. - - - - - Gets or sets whether the object is visible to users. - - - - - Gets or sets whether the object is transient. - - - - - Gets or sets the description of the object. - - - - - Gets or sets the types of values allowed by the object. - - The type. - - - - Gets or sets the pattern. - - The pattern. - - - - Gets or sets the minimum length. - - The minimum length. - - - - Gets or sets the maximum length. - - The maximum length. - - - - Gets or sets a number that the value should be divisble by. - - A number that the value should be divisble by. - - - - Gets or sets the minimum. - - The minimum. - - - - Gets or sets the maximum. - - The maximum. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - A flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - A flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - - - Gets or sets the minimum number of items. - - The minimum number of items. - - - - Gets or sets the maximum number of items. - - The maximum number of items. - - - - Gets or sets the of items. - - The of items. - - - - Gets or sets the of properties. - - The of properties. - - - - Gets or sets the of additional properties. - - The of additional properties. - - - - Gets or sets the pattern properties. - - The pattern properties. - - - - Gets or sets a value indicating whether additional properties are allowed. - - - true if additional properties are allowed; otherwise, false. - - - - - Gets or sets the required property if this property is present. - - The required property if this property is present. - - - - Gets or sets the identity. - - The identity. - - - - Gets or sets the a collection of valid enum values allowed. - - A collection of valid enum values allowed. - - - - Gets or sets a collection of options. - - A collection of options. - - - - Gets or sets disallowed types. - - The disallow types. - - - - Gets or sets the default value. - - The default value. - - - - Gets or sets the extend . - - The extended . - - - - Gets or sets the format. - - The format. - - - - Generates a from a specified . - - - - - Generate a from the specified type. - - The type to generate a from. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Gets or sets how undefined schemas are handled by the serializer. - - - - - Gets or sets the contract resolver. - - The contract resolver. - - - - The value types allowed by the . - - - - - No type specified. - - - - - String type. - - - - - Float type. - - - - - Integer type. - - - - - Boolean type. - - - - - Object type. - - - - - Array type. - - - - - Null type. - - - - - Any type. - - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Get and set values for a using reflection. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type - - - - - Represents a method that constructs an object. - - - - - Specifies type name handling options for the . - - - - - Do not include the .NET type name when serializing types. - - - - - Include the .NET type name when serializing into a JSON object structure. - - - - - Include the .NET type name when serializing into a JSON array structure. - - - - - Always include the .NET type name when serializing. - - - - - Include the .NET type name when the type of the object being serialized is not the same as its declared type. - - - - - Converts the value to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert the value to. - The converted type. - - - - Converts the value to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert the value to. - The converted value if the conversion was successful or the default value of T if it failed. - - true if initialValue was converted successfully; otherwise, false. - - - - - Converts the value to the specified type. If the value is unable to be converted, the - value is checked whether it assignable to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert or cast the value to. - - The converted type. If conversion was unsuccessful, the initial value - is returned if assignable to the target type. - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Specifies the type of Json token. - - - - - This is returned by the if a method has not been called. - - - - - An object start token. - - - - - An array start token. - - - - - A constructor start token. - - - - - An object property name. - - - - - A comment. - - - - - Raw JSON. - - - - - An integer. - - - - - A float. - - - - - A string. - - - - - A boolean. - - - - - A null token. - - - - - An undefined token. - - - - - An object end token. - - - - - An array end token. - - - - - A constructor end token. - - - - - A Date. - - - - - Byte data. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - Determines whether the collection is null or empty. - - The collection. - - true if the collection is null or empty; otherwise, false. - - - - - Adds the elements of the specified collection to the specified generic IList. - - The list to add to. - The collection of elements to add. - - - - Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer. - - The type of the elements of source. - A sequence in which to locate a value. - The object to locate in the sequence - An equality comparer to compare values. - The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. - - - - Gets the type of the typed collection's items. - - The type. - The type of the typed collection's items. - - - - Gets the member's underlying type. - - The member. - The underlying type of the member. - - - - Determines whether the member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - Determines whether the property is an indexed property. - - The property. - - true if the property is an indexed property; otherwise, false. - - - - - Gets the member's value on the object. - - The member. - The target object. - The member's value on the object. - - - - Sets the member's value on the target object. - - The member. - The target. - The value. - - - - Determines whether the specified MemberInfo can be read. - - The MemberInfo to determine whether can be read. - /// if set to true then allow the member to be gotten non-publicly. - - true if the specified MemberInfo can be read; otherwise, false. - - - - - Determines whether the specified MemberInfo can be set. - - The MemberInfo to determine whether can be set. - if set to true then allow the member to be set non-publicly. - if set to true then allow the member to be set if read-only. - - true if the specified MemberInfo can be set; otherwise, false. - - - - - Determines whether the string is all white space. Empty string will return false. - - The string to test whether it is all white space. - - true if the string is all white space; otherwise, false. - - - - - Nulls an empty string. - - The string. - Null if the string was null, otherwise the string unchanged. - - - - Specifies the state of the . - - - - - An exception has been thrown, which has left the in an invalid state. - You may call the method to put the in the Closed state. - Any other method calls results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll b/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll deleted file mode 100644 index cf9a9a5..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll-help.xml b/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll-help.xml index 5d1ee01..4592fe0 100644 --- a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll-help.xml +++ b/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll-help.xml @@ -847,7 +847,7 @@ Description ----------- - Resets the current session settings to those defined within the default config file (CLI.config) + Resets the current session settings to those defined within the default config file (Openstack.config) @@ -898,7 +898,7 @@ - When you issue this command the URI is also pasted to the Windows clipboard for your convenience. If you want to disable this behavior simply set the CLI.config option entitled PasteGetURIResultsToClipboard to false. + When you issue this command the URI is also pasted to the Windows clipboard for your convenience. If you want to disable this behavior simply set the Openstack.config option entitled PasteGetURIResultsToClipboard to false. diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll.config b/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll.config deleted file mode 100644 index 6193adb..0000000 --- a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.dll.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - -
- - - - - - C:\Projects\OS\Openstack.Client.Powershell\Openstack.Client.AsyncQueue\Openstack.Client.AsyncQueue\bin\Debug\Openstack.Client.AsyncQueue.exe - - - - diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.pdb b/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.pdb deleted file mode 100644 index fb724ee..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Client.Powershell.pdb and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Common.dll b/Openstack.Client.Powershell/bin/Release/Openstack.Common.dll deleted file mode 100644 index b59a9f0..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Common.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Common.pdb b/Openstack.Client.Powershell/bin/Release/Openstack.Common.pdb deleted file mode 100644 index 9053af2..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Common.pdb and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Objects.dll b/Openstack.Client.Powershell/bin/Release/Openstack.Objects.dll deleted file mode 100644 index d639536..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Objects.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.Objects.pdb b/Openstack.Client.Powershell/bin/Release/Openstack.Objects.pdb deleted file mode 100644 index 5dae925..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.Objects.pdb and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.dll b/Openstack.Client.Powershell/bin/Release/Openstack.dll deleted file mode 100644 index a04473f..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/Openstack.pdb b/Openstack.Client.Powershell/bin/Release/Openstack.pdb deleted file mode 100644 index 83b114e..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/Openstack.pdb and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/CLIManifest.psd1 b/Openstack.Client.Powershell/bin/Release/Openstack.psd1 similarity index 93% rename from Openstack.Client.Powershell/bin/Release/CLIManifest.psd1 rename to Openstack.Client.Powershell/bin/Release/Openstack.psd1 index 4e9bf61..13128c2 100644 --- a/Openstack.Client.Powershell/bin/Release/CLIManifest.psd1 +++ b/Openstack.Client.Powershell/bin/Release/Openstack.psd1 @@ -8,7 +8,7 @@ ModuleVersion="1.0.0.0" PowerShellVersion="2.0" CLRVersion="4.0.30319" FormatsToProcess="OpenstackShell.format.ps1xml" -FileList='CLI.config' +FileList='Openstack.config' RequiredAssemblies = 'Openstack.dll', 'Openstack.Common.dll' } diff --git a/Openstack.Client.Powershell/bin/Release/OpenstackShell.format.ps1xml b/Openstack.Client.Powershell/bin/Release/OpenstackShell.format.ps1xml index e9597e8..b88bb75 100644 --- a/Openstack.Client.Powershell/bin/Release/OpenstackShell.format.ps1xml +++ b/Openstack.Client.Powershell/bin/Release/OpenstackShell.format.ps1xml @@ -889,7 +889,7 @@ process4 - Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemModelView + Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemViewModel diff --git a/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.dll b/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.dll deleted file mode 100644 index 2dd77d3..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.dll and /dev/null differ diff --git a/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.xml b/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.xml deleted file mode 100644 index 65ead53..0000000 --- a/Openstack.Client.Powershell/bin/Release/System.Net.Http.Formatting.xml +++ /dev/null @@ -1,1489 +0,0 @@ - - - - System.Net.Http.Formatting - - - - Extension methods that aid in making formatted requests using . - - - Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and medai type string. Includes a cancellation token to cancel the request. - A task object representing the asynchronous operation. - The client used to make the request. - The URI the request is sent to. - The value to write into the entity body of the request. - The formatter used to serialize the value. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of object to serialize. - - - Represents the factory for creating new instance of . - - - Creates a new instance of the . - A new instance of the . - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Creates a new instance of the . - A new instance of the . - The inner handler which is responsible for processing the HTTP response messages. - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Creates a new instance of the which should be pipelined. - A new instance of the which should be pipelined. - The inner handler which is responsible for processing the HTTP response messages. - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Specifies extension methods to allow strongly typed objects to be read from HttpContent instances. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTyepFormatter instances to use. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTypeFormatter instances to use. - The IFormatterLogger to log events to. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type from the content instance. - A Task that will yield an object instance of the specified type. - The HttpContent instance from which to read. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. - An object instance of the specified type. - The HttpContent instance from which to read. - The type of the object to read. - The collection of MediaTypeFormatter instances to use. - - - Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. - An object instance of the specified type. - The HttpContent instance from which to read. - The type of the object to read. - The collection of MediaTypeFormatter instances to use. - The IFormatterLogger to log events to. - - - Extension methods to read HTML form URL-encoded datafrom instances. - - - Determines whether the specified content is HTML form URL-encoded data. - true if the specified content is HTML form URL-encoded data; otherwise, false. - The content. - - - Asynchronously reads HTML form URL-encoded from an instance and stores the results in a object. - A task object representing the asynchronous operation. - The content. - - - Provides extension methods to read and entities from instances. - - - Determines whether the specified content is HTTP request message content. - true if the specified content is HTTP message content; otherwise, false. - The content to check. - - - Determines whether the specified content is HTTP response message content. - true if the specified content is HTTP message content; otherwise, false. - The content to check. - - - Reads the as an . - The parsed instance. - The content to read. - - - Reads the as an . - The parsed instance. - The content to read. - The URI scheme to use for the request URI. - - - Reads the as an . - The parsed instance. - The content to read. - The URI scheme to use for the request URI. - The size of the buffer. - - - Reads the as an . - The parsed instance. - The content to read. - The URI scheme to use for the request URI. - The size of the buffer. - The maximum length of the HTTP header. - - - Reads the as an . - The parsed instance. - The content to read. - - - Reads the as an . - The parsed instance. - The content to read. - The size of the buffer. - - - Reads the as an . - The parsed instance. - The content to read. - The size of the buffer. - The maximum length of the HTTP header. - - - Extension methods to read MIME multipart entities from instances. - - - Determines whether the specified content is MIME multipart content. - true if the specified content is MIME multipart content; otherwise, false. - The content. - - - Determines whether the specified content is MIME multipart content with the specified subtype. - true if the specified content is MIME multipart content with the specified subtype; otherwise, false. - The content. - The MIME multipart subtype to match. - - - Reads all body parts within a MIME multipart message and produces a set of instances as a result. - A <see cref="T:System.Threading.Tasks.Task`1" /> representing the tasks of getting the collection of instances where each instance represents a body part. - An existing instance to use for the object's content. - - - Reads all body parts within a MIME multipart message and produces a set of instances as a result using the streamProvider instance to determine where the contents of each body part is written. - A representing the tasks of getting the collection of instances where each instance represents a body part. - An existing instance to use for the object's content. - A stream provider providing output streams for where to write body parts as they are parsed. - The type of the MIME multipart. - - - Reads all body parts within a MIME multipart message and produces a set of instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. - A representing the tasks of getting the collection of instances where each instance represents a body part. - An existing instance to use for the object's content. - A stream provider providing output streams for where to write body parts as they are parsed. - Size of the buffer used to read the contents. - The type of the MIME multipart. - - - Derived class which can encapsulate an or an as an entity with media type "application/http". - - - Initializes a new instance of the class encapsulating an . - The instance to encapsulate. - - - Initializes a new instance of the class encapsulating an . - The instance to encapsulate. - - - Releases unmanaged and - optionally - managed resources - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Gets the HTTP request message. - - - Gets the HTTP response message. - - - Asynchronously serializes the object's content to the given stream. - A instance that is asynchronously serializing the object's content. - The to which to write. - The associated . - - - Computes the length of the stream if possible. - true if the length has been computed; otherwise false. - The computed length of the stream. - - - Provides extension methods for the class. - - - Gets any cookie headers present in the request. - A collection of instances. - The request headers. - - - Gets any cookie headers present in the request that contain a cookie state whose name that matches the specified value. - A collection of instances. - The request headers. - The cookie state name to match. - - - - - Provides extension methods for the class. - - - Adds cookies to a response. Each Set-Cookie header is represented as one instance. A contains information about the domain, path, and other cookie information as well as one or more instances. Each instance contains a cookie name and whatever cookie state is associate with that name. The state is in the form of a which on the wire is encoded as HTML Form URL-encoded data. This representation allows for multiple related "cookies" to be carried within the same Cookie header while still providing separation between each cookie state. A sample Cookie header is shown below. In this example, there are two with names state1 and state2 respectively. Further, each cookie state contains two name/value pairs (name1/value1 and name2/value2) and (name3/value3 and name4/value4). <code> Set-Cookie: state1:name1=value1&amp;name2=value2; state2:name3=value3&amp;name4=value4; domain=domain1; path=path1; </code> - The response headers - The cookie values to add to the response. - - - Represents a multipart file data. - - - Initializes a new instance of the class. - The headers of the multipart file data. - The name of the local file for the multipart file data. - - - Gets or sets the headers of the multipart file data. - The headers of the multipart file data. - - - Gets or sets the name of the local file for the multipart file data. - The name of the local file for the multipart file data. - - - Represents an suited for writing each MIME body parts of the MIME multipart message to a file using a . - - - Initializes a new instance of the class. - The root path where the content of MIME multipart body parts are written to. - - - Initializes a new instance of the class. - The root path where the content of MIME multipart body parts are written to. - The number of bytes buffered for writes to the file. - - - Gets or sets the number of bytes buffered for writes to the file. - The number of bytes buffered for writes to the file. - - - Gets or sets the multipart file data. - The multipart file data. - - - Gets the name of the local file which will be combined with the root path to create an absolute file name where the contents of the current MIME body part will be stored. - A relative filename with no path component. - The headers for the current MIME body part. - - - Gets the stream instance where the message body part is written to. - The instance where the message body part is written to. - The content of HTTP. - The header fields describing the body part. - - - Gets or sets the root path where the content of MIME multipart body parts are written to. - The root path where the content of MIME multipart body parts are written to. - - - An suited for use with HTML file uploads for writing file content to a . The stream provider looks at the <b>Content-Disposition</b> header field and determines an output based on the presence of a <b>filename</b> parameter. If a <b>filename</b> parameter is present in the <b>Content-Disposition</b> header field then the body part is written to a , otherwise it is written to a . This makes it convenient to process MIME Multipart HTML Form data which is a combination of form data and file content. - - - Initializes a new instance of the class. - The root path where the content of MIME multipart body parts are written to. - - - Initializes a new instance of the class. - The root path where the content of MIME multipart body parts are written to. - The number of bytes buffered for writes to the file. - - - Reads the non-file contents as form data - A task that represents the asynchronous operation. - - - Gets a of form data passed as part of the multipart form data. - The of form data. - - - The instance where the message body part is written. - The HTTP content that contains this body part. - Header fields describing the body part. - - - Represents a multipart memory stream provider. - - - Initializes a new instance of the class. - - - Returns the for the . - The for the . - A object. - The HTTP content headers. - - - Represents the provider for the multipart related multistream. - - - Initializes a new instance of the class. - - - Gets the related stream for the provider. - The content headers. - The parent content. - The http content headers. - - - Gets the root content of the . - The root content of the . - - - Represents a stream provider that examines the headers provided by the MIME multipart parser as part of the MIME multipart extension methods (see ) and decides what kind of stream to return for the body part to be written to. - - - Initializes a new instance of the class. - - - Gets or sets the contents for this . - The contents for this . - - - Executes the post processing operation for this . - The asynchronous task for this operation. - - - Gets the stream where to write the body part to. This method is called when a MIME multipart body part has been parsed. - The instance where the message body part is written to. - The content of the HTTP. - The header fields describing the body part. - - - Contains a value as well as an associated that will be used to serialize the value when writing this content. - - - Initializes a new instance of the class. - The type of object this instance will contain. - The value of the object this instance will contain. - The formatter to use when serializing the value. - - - Initializes a new instance of the class. - The type of object this instance will contain. - The value of the object this instance will contain. - The formatter to use when serializing the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - - - Initializes a new instance of the class. - The type of object this instance will contain. - The value of the object this instance will contain. - The formatter to use when serializing the value. - The authoritative value of the Content-Type header. - - - Gets the media-type formatter associated with this content instance. - The . - - - Gets the type of object managed by this instance. - The object type. - - - Asynchronously serializes the object's content to the given stream. - The task object representing the asynchronous operation. - The stream to write to. - The associated . - - - Computes the length of the stream if possible. - true if the length has been computed; otherwise, false. - Receives the computed length of the stream. - - - Gets or sets the value of the content. - The content value. - - - Generic form of . - The type of object this class will contain. - - - Initializes a new instance of the class. - The value of the object this instance will contain. - The formatter to use when serializing the value. - - - Initializes a new instance of the <see cref="T:System.Net.Http.ObjectContent`1" /> class. - The value of the object this instance will contain. - The formatter to use when serializing the value. - The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. - - - Initializes a new instance of the class. - The value of the object this instance will contain. - The formatter to use when serializing the value. - The authoritative value of the Content-Type header. - - - Enables scenarios where a data producer wants to write directly (either synchronously or asynchronously) using a stream. - - - Initializes a new instance of the class. - An action that is called when an output stream is available, allowing the action to write to it directly. - - - Initializes a new instance of the class. - An action that is called when an output stream is available, allowing the action to write to it directly. - The media type. - - - Initializes a new instance of the class. - An action that is called when an output stream is available, allowing the action to write to it directly. - The media type. - - - Asynchronously serializes the push content into stream. - The serialized push content. - The stream where the push content will be serialized. - The context. - - - Determines whether the stream content has a valid length in bytes. - true if length is a valid length; otherwise, false. - The length in bytes of the stream content. - - - Contains extension methods to allow strongly typed objects to be read from the query component of instances. - - - Parses the query portion of the specified URI. - A that contains the query parameters. - The URI to parse. - - - Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. - true if the query component of the URI can be read as the specified type; otherwise, false. - The URI to read. - The type of object to read. - When this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized. - - - Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. - true if the query component of the URI can be read as the specified type; otherwise, false. - The URI to read. - When this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized. - The type of object to read. - - - Reads HTML form URL encoded data provided in the query component as a object. - true if the query component can be read as ; otherwise false. - The instance from which to read. - An object to be initialized with this instance or null if the conversion cannot be performed. - - - Represents a helper class to allow a synchronous formatter on top of the asynchronous formatter infrastructure. - - - Initializes a new instance of the class. - - - Gets or sets the suggested size of buffer to use with streams in bytes. - The suggested size of buffer to use with streams in bytes. - - - Reads synchronously from the buffered stream. - An object of the given . - The type of the object to deserialize. - The stream from which to read - The , if available. Can be null. - The to log events to. - - - Reads asynchronously from the buffered stream. - A task object representing the asynchronous operation. - The type of the object to deserialize. - The stream from which to read. - The , if available. Can be null. - The to log events to. - - - Writes synchronously to the buffered stream. - The type of the object to serialize. - The object value to write. Can be null. - The stream to which to write. - The , if available. Can be null. - - - Writes asynchronously to the buffered stream. - A task object representing the asynchronous operation. - The type of the object to serialize. - The object value to write. It may be null. - The stream to which to write. - The , if available. Can be null. - The transport context. - - - Represents the result of content negotiation performed using <see cref="M:System.Net.Http.Formatting.IContentNegotiator.Negotiate(System.Type,System.Net.Http.HttpRequestMessage,System.Collections.Generic.IEnumerable{System.Net.Http.Formatting.MediaTypeFormatter})" /> - - - Create the content negotiation result object. - The formatter. - The preferred media type. Can be null. - - - The formatter chosen for serialization. - - - The media type that is associated with the formatter chosen for serialization. Can be null. - - - The default implementation of , which is used to select a for an or . - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - true to exclude formatters that match only on the object type; otherwise, false. - - - Determines how well each formatter matches an HTTP request. - Returns a collection of objects that represent all of the matches. - The type to be serialized. - The request. - The set of objects from which to choose. - - - If true, exclude formatters that match only on the object type; otherwise, false. - Returns a . - - - Matches a set of Accept header fields against the media types that a formatter supports. - Returns a object that indicates the quality of the match, or null if there is no match. - A list of Accept header values, sorted in descending order of q factor. You can create this list by calling the method. - The formatter to match against. - - - Matches a request against the objects in a media-type formatter. - Returns a object that indicates the quality of the match, or null if there is no match. - The requrst. - The media-type formatter. - - - Match the content type of a request against the media types that a formatter supports. - Returns a object that indicates the quality of the match, or null if there is no match. - The request. - The formatter to match against. - - - Selects the first supported media type of a formatter. - Returns a with set to , or null if there is no match. - The type to match. - The formatter to match against. - - - Performs content negotiating by selecting the most appropriate out of the passed in for the given that can serialize an object of the given . - The result of the negotiation containing the most appropriate instance, or null if there is no appropriate formatter. - The type to be serialized. - The request. - The set of objects from which to choose. - - - Determines the best character encoding for writing the response. - Returns the that is the best match. - The request. - The selected media formatter. - - - Selects the best match among the candidate matches found. - Returns the object that represents the best match. - The collection of matches. - - - Sorts Accept header values in descending order of q factor. - Returns the sorted list of MediaTypeWithQualityHeaderValue objects. - A collection of MediaTypeWithQualityHeaderValue objects, representing the Accept header values. - - - Sorts a list of Accept-Charset, Accept-Encoding, Accept-Language or related header values in descending order or q factor. - Returns the sorted list of StringWithQualityHeaderValue objects. - A collection of StringWithQualityHeaderValue objects, representing the header fields. - - - Evaluates whether a match is better than the current match. - Returns whichever object is a better match. - The current match. - The match to evaluate against the current match. - - - Helper class to serialize <see cref="T:System.Collections.Generic.IEnumerable`1" /> types by delegating them through a concrete implementation."/&gt;. - The interface implementing to proxy. - - - Initialize a DelegatingEnumerable. This constructor is necessary for to work. - - - Initialize a DelegatingEnumerable with an <see cref="T:System.Collections.Generic.IEnumerable`1" />. This is a helper class to proxy <see cref="T:System.Collections.Generic.IEnumerable`1" /> interfaces for . - The <see cref="T:System.Collections.Generic.IEnumerable`1" /> instance to get the enumerator from. - - - This method is not implemented but is required method for serialization to work. Do not use. - The item to add. Unused. - - - Get the enumerator of the associated <see cref="T:System.Collections.Generic.IEnumerable`1" />. - The enumerator of the <see cref="T:System.Collections.Generic.IEnumerable`1" /> source. - - - Get the enumerator of the associated <see cref="T:System.Collections.Generic.IEnumerable`1" />. - The enumerator of the <see cref="T:System.Collections.Generic.IEnumerable`1" /> source. - - - Represent the collection of form data. - - - Initializes a new instance of class. - The pairs. - - - Initializes a new instance of class. - The query. - - - Initializes a new instance of class. - The URI - - - Gets the collection of form data. - The collection of form data. - The key. - - - Gets an enumerable that iterates through the collection. - The enumerable that iterates through the collection. - - - Gets the values of the collection of form data. - The values of the collection of form data. - The key. - - - Reads the collection of form data as a collection of name value. - The collection of form data as a collection of name value. - - - Gets an enumerable that iterates through the collection. - The enumerable that iterates through the collection. - - - - class for handling HTML form URL-ended data, also known as application/x-www-form-urlencoded. - - - Initializes a new instance of the class. - - - Queries whether the can deserializean object of the specified type. - true if the can deserialize the type; otherwise, false. - The type to deserialize. - - - Queries whether the can serializean object of the specified type. - true if the can serialize the type; otherwise, false. - The type to serialize. - - - Gets the default media type for HTML form-URL-encoded data, which is application/x-www-form-urlencoded. - The default media type for HTML form-URL-encoded data - - - Gets or sets the maximum depth allowed by this formatter. - The maximum depth. - - - Gets or sets the size of the buffer when reading the incoming stream. - The buffer size. - - - Asynchronously deserializes an object of the specified type. - A whose result will be the object instance that has been read. - The type of object to deserialize. - The to read. - The for the content being read. - The to log events to. - - - Performs content negotiation. This is the process of selecting a response writer (formatter) in compliance with header values in the request. - - - Performs content negotiating by selecting the most appropriate out of the passed in formatters for the given request that can serialize an object of the given type. - The result of the negotiation containing the most appropriate instance, or null if there is no appropriate formatter. - The type to be serialized. - Request message, which contains the header values used to perform negotiation. - The set of objects from which to choose. - - - Specifies a callback interface that a formatter can use to log errors while reading. - - - Logs an error. - The path to the member for which the error is being logged. - The error message. - - - Logs an error. - The path to the member for which the error is being logged. - The error message to be logged. - - - Defines method that determines whether a given member is required on deserialization. - - - Determines whether a given member is required on deserialization. - true if should be treated as a required member; otherwise false. - The to be deserialized. - - - Represents the class to handle JSON. - - - Initializes a new instance of the class. - - - Determines whether this can read objects of the specified . - true if objects of this can be read, otherwise false. - The type of object that will be read. - - - Determines whether this can write objects of the specified . - true if objects of this can be written, otherwise false. - The type of object that will be written. - - - Creates a JsonSerializerSettings instance with the default settings used by the . - A newly created JsonSerializerSettings instance with the default settings used by the . - - - Gets the default media type for JSON, namely "application/json". - The for JSON. - - - Gets or sets a value indicating whether to indent elements when writing data. - true if to indent elements when writing data; otherwise, false. - - - Gets or sets the maximum depth allowed by this formatter. - The maximum depth allowed by this formatter. - - - Reads an object of the specified from the specified . This method is called during deserialization. - Returns . - The type of object to read. - Thestream from which to read - The content being written. - The to log events to. - - - Gets or sets the JsonSerializerSettings used to configure the JsonSerializer. - The JsonSerializerSettings used to configure the JsonSerializer. - - - Gets or sets a value indicating whether to use by default. - true if to by default; otherwise, false. - - - Writes an object of the specified to the specified . This method is called during serialization. - A that will write the value to the stream. - The type of object to write. - The object to write. - The to which to write. - The where the content is being written. - The . - - - Base class to handle serializing and deserializing strongly-typed objects using . - - - Initializes a new instance of the class. - - - Queries whether this can deserializean object of the specified type. - true if the can deserialize the type; otherwise, false. - The type to deserialize. - - - Queries whether this can serializean object of the specified type. - true if the can serialize the type; otherwise, false. - The type to serialize. - - - Gets the default value for the specified type. - The default value. - The type for which to get the default value. - - - Returns a specialized instance of the that can format a response for the given parameters. - Returns . - The type to format. - The request. - The media type. - - - Gets or sets the maximum number of keys stored in a T: . - The maximum number of keys. - - - Gets the mutable collection of objects that match HTTP requests to media types. - The collection. - - - Asynchronously deserializes an object of the specified type. - A whose result will be an object of the given type. - The type of the object to deserialize. - The to read. - The , if available. It may be null. - The to log events to. - Derived types need to support reading. - - - Gets or sets the instance used to determine required members. - The instance. - - - Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers. - The encoding that is the best match. - The content headers. - - - Sets the default headers for content that will be formatted using this formatter. This method is called from the constructor. This implementation sets the Content-Type header to the value of mediaType if it is not null. If it is null it sets the Content-Type to the default media type of this formatter. If the Content-Type does not specify a charset it will set it using this formatters configured . - The type of the object being serialized. See . - The content headers that should be configured. - The authoritative media type. Can be null. - - - Gets the mutable collection of character encodings supported bythis . - The collection of objects. - - - Gets the mutable collection of media types supported bythis . - The collection of objects. - - - Asynchronously writes an object of the specified type. - A that will perform the write. - The type of the object to write. - The object value to write. It may be null. - The to which to write. - The if available. It may be null. - The if available. It may be null. - Derived types need to support writing. - - - Represents a collection class that contains instances. - - - Initializes a new instance of the class with default values. - - - Initializes a new instance of the class with the given . - A collection of instances to place in the collection. - - - Searches a collection for a formatter that can read the .NET in the given . - The that can read the type, or null if no formatter found. - The .NET type to read. - The media type to match on. - - - Searches a collection for a formatter that can write the .NET in the given . - The that can write the type, or null if no formatter found. - The .NET type to write. - The media type to match on. - - - Gets the to use for application/x-www-form-urlencoded data. - The to use for application/x-www-form-urlencoded data. - - - Determines whether the is one of those loosely defined types that should be excluded from validation. - true if the type should be excluded; otherwise, false. - The .NET to validate. - - - Gets the to use for JSON. - The to use for JSON. - - - Gets the to use for XML. - The to use for XML. - - - Updates the given set of formatter of elements so that it associates the mediaType with s containing a specific query parameter and value. - The to receive the new item. - The name of the query parameter. - The value assigned to that query parameter. - The to associate with a containing a query string matching queryStringParameterName and queryStringParameterValue. - - - Updates the given set of formatter of elements so that it associates the mediaType with s containing a specific query parameter and value. - The to receive the new item. - The name of the query parameter. - The value assigned to that query parameter. - The media type to associate with a containing a query string matching queryStringParameterName and queryStringParameterValue. - - - Updates the given set of formatter of elements so that it associates the mediaType with a specific HTTP request header field with a specific value. - The to receive the new item. - Name of the header to match. - The header value to match. - The to use when matching headerValue. - if set to true then headerValue is considered a match if it matches a substring of the actual header value. - The to associate with a entry with a name matching headerName and a value matching headerValue. - - - Updates the given set of formatter of elements so that it associates the mediaType with a specific HTTP request header field with a specific value. - The to receive the new item. - Name of the header to match. - The header value to match. - The to use when matching headerValue. - if set to true then headerValue is considered a match if it matches a substring of the actual header value. - The media type to associate with a entry with a name matching headerName and a value matching headerValue. - - - This class describes how well a particular matches a request. - - - Initializes a new instance of the class. - The matching formatter. - The media type. Can be null in which case the media type application/octet-stream is used. - The quality of the match. Can be null in which case it is considered a full match with a value of 1.0 - The kind of match. - - - Gets the media type formatter. - - - Gets the matched media type. - - - Gets the quality of the match - - - Gets the kind of match that occurred. - - - Contains information about the degree to which a matches the explicit or implicit preferences found in an incoming request. - - - No match was found - - - Matched on a type, meaning that the formatter is able to serialize the type. - - - Matched on an explicit literal accept header, such as “application/json”. - - - Matched on an explicit subtype range in an Accept header, such as “application/*”. - - - Matched on an explicit “*/*” range in the Accept header. - - - Matched on after having applied the various s. - - - Matched on the media type of the entity body in the HTTP request message. - - - An abstract base class used to create an association between or instances that have certain characteristics and a specific . - - - Initializes a new instance of a with the given mediaType value. - The that is associated with or instances that have the given characteristics of the . - - - Initializes a new instance of a with the given mediaType value. - The that is associated with or instances that have the given characteristics of the . - - - Gets the that is associated with or instances that have the given characteristics of the . - - - Returns the quality of the match of the associated with request. - The quality of the match. It must be between 0.0 and 1.0. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match. - The to evaluate for the characteristics associated with the of the . - - - Class that provides s from query strings. - - - Initializes a new instance of the class. - The name of the query string parameter to match, if present. - The value of the query string parameter specified by queryStringParameterName. - The to use if the query parameter specified by queryStringParameterName is present and assigned the value specified by queryStringParameterValue. - - - Initializes a new instance of the class. - The name of the query string parameter to match, if present. - The value of the query string parameter specified by queryStringParameterName. - The media type to use if the query parameter specified by queryStringParameterName is present and assigned the value specified by queryStringParameterValue. - - - Gets the query string parameter name. - - - Gets the query string parameter value. - - - Returns a value indicating whether the current instance can return a from request. - If this instance can produce a from request it returns 1.0 otherwise 0.0. - The to check. - - - This class provides a mapping from an arbitrary HTTP request header field to a used to select instances for handling the entity body of an or . <remarks>This class only checks header fields associated with for a match. It does not check header fields associated with or instances.</remarks> - - - Initializes a new instance of the class. - Name of the header to match. - The header value to match. - The to use when matching headerValue. - if set to true then headerValue is considered a match if it matches a substring of the actual header value. - The to use if headerName and headerValue is considered a match. - - - Initializes a new instance of the class. - Name of the header to match. - The header value to match. - The value comparison to use when matching headerValue. - if set to true then headerValue is considered a match if it matches a substring of the actual header value. - The media type to use if headerName and headerValue is considered a match. - - - Gets the name of the header to match. - - - Gets the header value to match. - - - Gets the to use when matching . - - - Gets a value indicating whether is a matched as a substring of the actual header value. this instance is value substring. - truefalse - - - Returns a value indicating whether the current instance can return a from request. - The quality of the match. It must be between 0.0 and 1.0. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match. - The to check. - - - A that maps the X-Requested-With http header field set by AJAX XmlHttpRequest (XHR) to the media type application/json if no explicit Accept header fields are present in the request. - - - Initializes a new instance of class - - - Returns a value indicating whether the current instance can return a from request. - The quality of the match. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match and that the request was made using XmlHttpRequest without an Accept header. - The to check. - - - - class to handle Xml. - - - Initializes a new instance of the class. - - - Queries whether the can deserializean object of the specified type. - true if the can deserialize the type; otherwise, false. - The type to deserialize. - - - Queries whether the can serializean object of the specified type. - true if the can serialize the type; otherwise, false. - The type to serialize. - - - Gets the default media type for the XML formatter. - The default media type, which is “application/xml”. - - - Gets or sets a value indicating whether to indent elements when writing data. - true to indent elements; otherwise, false. - - - Gets and sets the maximum nested node depth. - The maximum nested node depth. - - - Called during deserialization to read an object of the specified type from the specified readStream. - A whose result will be the object instance that has been read. - The type of object to read. - The from which to read. - The for the content being read. - The to log events to. - - - Unregisters the serializer currently associated with the given type. - true if a serializer was previously registered for the type; otherwise, false. - The type of object whose serializer should be removed. - - - Registers an to read or write objects of a specified type. - The instance. - The type of object that will be serialized or deserialized with. - - - Registers an to read or write objects of a specified type. - The type of object that will be serialized or deserialized with. - The instance. - - - Registers an to read or write objects of a specified type. - The type of object that will be serialized or deserialized with. - The instance. - - - Registers an to read or write objects of a specified type. - The instance. - The type of object that will be serialized or deserialized with. - - - Gets or sets a value indicating whether the XML formatter uses the as the default serializer, instead of using the . - If true, the formatter uses the by default; otherwise, it uses the by default. - - - Called during serialization to write an object of the specified type to the specified writeStream. - A that will write the value to the stream. - The type of object to write. - The object to write. - The to which to write. - The for the content being written. - The . - - - Represents the event arguments for the HTTP progress. - - - Initializes a new instance of the class. - The percentage of the progress. - The user token. - The number of bytes transferred. - The total number of bytes transferred. - - - Gets the number of bytes transferred in the HTTP progress. - The number of bytes transferred in the HTTP progress. - - - Gets the total number of bytes transferred by the HTTP progress. - The total number of bytes transferred by the HTTP progress. - - - Generates progress notification for both request entities being uploaded and response entities being downloaded. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The inner message handler. - - - Occurs when event entities are being downloaded. - - - Occurs when event entities are being uploaded. - - - Raises the event that handles the request of the progress. - The request. - The event handler for the request. - - - Raises the event that handles the response of the progress. - The request. - The event handler for the request. - - - Sends the specified progress message to an HTTP server for delivery. - The sent progress message. - The request. - The cancellation token. - - - Provides value for the cookie header. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The value of the name. - The values. - - - Initializes a new instance of the class. - The value of the name. - The value. - - - Creates a shallow copy of the cookie value. - A shallow copy of the cookie value. - - - Gets a collection of cookies sent by the client. - A collection object representing the client’s cookie variables. - - - Gets or sets the domain to associate the cookie with. - The name of the domain to associate the cookie with. - - - Gets or sets the expiration date and time for the cookie. - The time of day (on the client) at which the cookie expires. - - - Gets or sets a value that specifies whether a cookie is accessible by client-side script. - true if the cookie has the HttpOnly attribute and cannot be accessed through a client-side script; otherwise, false. - - - Gets a shortcut to the cookie property. - The cookie value. - - - Gets or sets the maximum age permitted for a resource. - The maximum age permitted for a resource. - - - Gets or sets the virtual path to transmit with the current cookie. - The virtual path to transmit with the cookie. - - - Gets or sets a value indicating whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only. - true to transmit the cookie over an SSL connection (HTTPS); otherwise, false. - - - Returns a string that represents the current object. - A string that represents the current object. - - - Indicates a value whether the string representation will be converted. - true if the string representation will be converted; otherwise, false. - The input value. - The parsed value to convert. - - - Contains cookie name and its associated cookie state. - - - Initializes a new instance of the class. - The name of the cookie. - - - Initializes a new instance of the class. - The name of the cookie. - The collection of name-value pair for the cookie. - - - Initializes a new instance of the class. - The name of the cookie. - The value of the cookie. - - - Returns a new object that is a copy of the current instance. - A new object that is a copy of the current instance. - - - Gets or sets the cookie value with the specified cookie name, if the cookie data is structured. - The cookie value with the specified cookie name. - - - Gets or sets the name of the cookie. - The name of the cookie. - - - Returns the string representation the current object. - The string representation the current object. - - - Gets or sets the cookie value, if cookie data is a simple string value. - The value of the cookie. - - - Gets or sets the collection of name-value pair, if the cookie data is structured. - The collection of name-value pair for the cookie. - - - \ No newline at end of file diff --git a/Openstack.Client.Powershell/bin/Release/mefx.exe b/Openstack.Client.Powershell/bin/Release/mefx.exe deleted file mode 100644 index 38fe687..0000000 Binary files a/Openstack.Client.Powershell/bin/Release/mefx.exe and /dev/null differ diff --git a/Openstack.Client.Powershell/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Openstack.Client.Powershell/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index 86ddd48..0000000 Binary files a/Openstack.Client.Powershell/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..0dc3e24 --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +Openstack Powershell CLI - Getting Set up to Contribute + +I - Pre-requisits + + Before we get started we need to make sure that our Development environment reflects what a machine looks like when we install the CLI. The following steps should get the job done. + + A. Set the Required Execution Policy + + To use the Openstack CLI Software for Windows PowerShell, you must make sure that your Powershell environment is capable of executing 3rd party modules. + Note: If you are performing a re-installation of the software package, you can skip this step. This step is applicable only for a fresh installation. + Open a PowerShell window as the administrator and issue the command set-executionpolicy -ExecutionPolicy Unrestricted: + + ------------------------------------------------------------------------------------------------------------------- + PS C:\Projects\Outgoing\OS> set-executionpolicy -ExecutionPolicy Unrestricted + + Execution policy change + + The execution policy helps protect you from scripts that you do not trust. Changing the execution policy + might expose you to the security risks described in the about_Execution_Policies help topic. Do you want to + change the execution policy? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + PS C:\Projects\Outgoing\OS> + ------------------------------------------------------------------------------------------------------------------- + Close the Powershell window and reopen as administrator for the policy changes to take effect. + + B. A Quick Setting in Visual Studio + + After Cloning the repo and loading the solution within Visual Studio, ensure that the "Enable Nuget Package Restore" option has been turned + on at the Solution level. This will retreive all of the neccessary external dependencies for the Solution to build properly. + +C. - Supplying your Credentials + +Our next step is to make sure that we supply the proper credentials when logging on to the system. If you ran the CLI after your initial +install, you'll have noticed that you were prompted for this information. The result is stored in the CLI.config file located within the Users Personal Data Folder +under the OS directory. With each Build we must update that file with the version in our solution. This is so that when new config file changes are introduced, you +have the CLI picking them up at runtime from the expected location (instead of residing in just your project directory). Complete these steps to supply this information. + +1. Navigate to the Openstack.Client.Powershell project and look into the Deployment folder. +2. Within that folder you will see a file called CLI.config.example +3. Copy the example file into the same folder but remove the .example on the filename. +4. Open up the CLI.config file that you just created. +5. Find the config section entitled "IdentityServices". +6. Within this section supply values for Username, Password, and Default Tenenat Id. All of this can be found within your account information on you providers portal. + +Each time that we build, this CLI.config file will be moved to the correct runtime location via Post-Build Scripts outlined in the next section. + +D. - Edit Post Build Scripts + +Within the Openstack.Client.Powershell projects Post-Build Event you'll notice that we call a PostBuild.bat file. This +batch file will move important run-time files required by the CLI to their proper locations if you decide to edit them. +Without this, all changes to important files (like CLI.config) would go unnoticed because they would sit in our project +folders on disk (rather than the location the CLI expects). To create tis batch file, follow these steps. + +1. Navigate to the Openstack.Client.Powershell project and look into the Deployment folder. +2. Within that folder you will see a file called PostBuild.example +3. Open up that file and copy the contents to the clipboard. +4. Within that same folder create a file called PostBuild.bat +5. Paste the script on the clipboard into that file. +6. Notice the Action Required section of the file. Modify the path you see there to reflect your development machine. +7. Save your Project and do a test build (Rebuild All). The Output Window will show any Echo results from the script and show any script errors that may break the build. + +E. - Modifying you Developer Profile + + When the Powershell runtime starts it looks for a file called Microsoft.PowerShell_profile.ps1. This script gets executed right after +Powershell loads. Here we can set up the look of the environment, issue some default commands (useful for testing!) +and loading Powershell Modules. The Powershell module is where all of our CLI code resides and must get loaded by this script. +The only problem here is that the path to that module is specific to your machine. To address this follow these steps + + 1. Open up the DevProfile.ps1.example file within the Solutions [Openstack.Client.Powershell]\Deployment folder. + 2. Copy the contents of this file into a new text file called DevProfile.ps1 + 3. Search this document for "ACTION REQUIRED" and follow the instructions given. + +II - Debugging + +Debugging the CLI is a bit more challenging than with say a normal executable. In this case the entry point or main process is the Powershell runtime itself. +This requires us to load our work into that environment and attach the VS debugger to the Powershell host at runtime. Follow these steps to get the debugger running. + + 1. Set your breakpoint. + 2. Compile the Solution. + 3. Load Powershell. With everything in place this should automatically Import the module you just compiled. + 3. From within VS select Debug\Attach To Process + 4. Attach to the Powershell.exe process. + 5. Issue a command in the CLI that triggers your breakpoint. + +A. Debugging Provider Code + +When Powershell modules get Imported, any providers found in that Module will be executed first. This leaves us with a problem in that +any code that we need to debug in the provider during startup needs to be paused until we have time to actually set a break point properly. +To do this complete the following actions. + + 1. Set you breakpoint in the providers InitializeDefaultDrives() method. This is the first stage in the Providers Life-Cycle. + 2. Open the DevProfile.ps1 file. + 3. Comment out the Import-Module statement (Copy it to the clipboard for your convience). + 2. Compile the Solution. + 3. Load Powershell. + 3. From within VS select Debug\Attach To Process + 4. Attach to the Powershell.exe process. + 5. From the command line paste the Import-Module statement into the CLI. This will trigger the breakpoint that you set in step 1. + +B. Getting to the Action - A Quick Tip + +Sometimes we're trying to debug something in the CLI and we need to get to a certain location quickly. For example if you are testing the +list view for Servers and your sick of typing this after you restart each time + + cd\ + cd Servers + ls + cd 1 + ls + +Just remember that this can be placed in your Devprofile.ps1 file and Powershell will issue those commands for you. This makes debugging a specific +section of the CLI much easier.. + +III. Testing + + Object Storage Integration Test Notes + + These unit test require a particular directory structure to be present on your machine to complete the test cases where we copy files and or folders to the server. + Make sure that you have something like the following on your machine. + + Folder1 (contains files) + -> Folder2 (contains files) + -> Folder3 (contains NO files) + + Note : Go to the Testing section in the CLI.Config file. Make sure that LocalTestDirectory + element points to the root of the test folder hierarchy (Folder1 in the example above). diff --git a/Rackspace.Client.Powershell/Cmdlets/HelloRackspaceCmdlet.cs b/Rackspace.Client.Powershell/Cmdlets/HelloRackspaceCmdlet.cs new file mode 100644 index 0000000..cb7c47d --- /dev/null +++ b/Rackspace.Client.Powershell/Cmdlets/HelloRackspaceCmdlet.cs @@ -0,0 +1,58 @@ +//* ============================================================================ +//Copyright 2014 Hewlett Packard + +//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. +//============================================================================ */ +using System; +using System.Management.Automation; +using OpenStack.Client.Powershell.Cmdlets.Common; +using OpenStack.Storage; + + +namespace Rackspace.Client.Powershell.Cmdlets +{ + [Cmdlet("Hello", "RS", SupportsShouldProcess = true)] + //[RequiredServiceIdentifierAttribute(OpenStack.Objects.Domain.Admin.Services.ObjectStorage)] + public class HelloRackspaceCmdlet : BasePSCmdlet + { + + //========================================================================================= + /// + /// + /// + //========================================================================================= + protected override void ProcessRecord() + { + Console.WriteLine("Hello World, from Rackspace!"); + if (this.CoreClient != null) + { + var client = this.CoreClient.CreateServiceClient(); + + + var connectTask = client.GetStorageAccount(); + connectTask.Wait(); + + StorageAccount account = connectTask.Result; + int h = 8; + + + Console.WriteLine(this.Context.Settings.LocalTestDirectory); + + + + } + + } + + } +} diff --git a/Openstack.Client.Powershell/bin/Release/Deployment/CLI.config b/Rackspace.Client.Powershell/Deployment/Rackspace.config similarity index 81% rename from Openstack.Client.Powershell/bin/Release/Deployment/CLI.config rename to Rackspace.Client.Powershell/Deployment/Rackspace.config index 5432181..19ae892 100644 --- a/Openstack.Client.Powershell/bin/Release/Deployment/CLI.config +++ b/Rackspace.Client.Powershell/Deployment/Rackspace.config @@ -13,7 +13,7 @@ - + @@ -31,11 +31,11 @@ - - - - - + + + + + diff --git a/Rackspace.Client.Powershell/Deployment/Rackspace.psd1 b/Rackspace.Client.Powershell/Deployment/Rackspace.psd1 new file mode 100644 index 0000000..330f49c --- /dev/null +++ b/Rackspace.Client.Powershell/Deployment/Rackspace.psd1 @@ -0,0 +1,19 @@ +@{ +ModuleToProcess = 'Rackspace.OpenStack.Client.Powershell.dll' +GUID="{847a28a4-6407-4aa6-8070-a4a51396db70}" +Author="Sam" +CompanyName="Rackspace Corporation" +Copyright="© Rackspace. All rights reserved." +ModuleVersion="1.0.0.0" +PowerShellVersion="2.0" +CLRVersion="4.0.30319" +FileList='' +RequiredAssemblies = 'OpenStack.dll', 'OpenStack.Common.dll' +} + + + + + + + diff --git a/Rackspace.Client.Powershell/Properties/AssemblyInfo.cs b/Rackspace.Client.Powershell/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f1aa065 --- /dev/null +++ b/Rackspace.Client.Powershell/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("Rackspace.Client.Powershell")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Rackspace.Client.Powershell")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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("514ed649-0f98-445b-af9c-9af000f1e720")] + +// 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/Rackspace.Client.Powershell/Rackspace.Openstack.Client.Powershell.csproj b/Rackspace.Client.Powershell/Rackspace.Openstack.Client.Powershell.csproj new file mode 100644 index 0000000..4b53047 --- /dev/null +++ b/Rackspace.Client.Powershell/Rackspace.Openstack.Client.Powershell.csproj @@ -0,0 +1,85 @@ + + + + + Debug + AnyCPU + {8E2903DF-9FB6-48F8-85BF-FD2422BE38AF} + Library + Properties + Rackspace.Client.Powershell + Rackspace.Openstack.Client.Powershell + v4.5 + 512 + ..\ + true + + + true + full + false + ..\..\..\..\Documents\WindowsPowerShell\Modules\Openstack\Rackspace\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + True + ..\packages\System.Management.Automation.6.1.7601.17515\lib\net45\System.Management.Automation.dll + + + + + + + + + + + + + + + Designer + Always + + + Always + + + + + + {b2c92371-b62b-45a2-adeb-edebefa3a75c} + Openstack + + + {32bac168-2ec8-4074-9e6d-8c13460dcfad} + Openstack.Client.Powershell + + + + + + copy .\Deployment\Rackspace.psd1 C:\Users\tplummer\Documents\WindowsPowerShell\Modules\Openstack\Rackspace + + + \ No newline at end of file diff --git a/Rackspace.Client.Powershell/Utility/RackspaceRegistrationManager.cs b/Rackspace.Client.Powershell/Utility/RackspaceRegistrationManager.cs new file mode 100644 index 0000000..4daca27 --- /dev/null +++ b/Rackspace.Client.Powershell/Utility/RackspaceRegistrationManager.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using System.Text; +using System.Threading.Tasks; +using OpenStack.Client.Powershell.Utility; +using OpenStack.Identity; + +namespace Rackspace.Client.Powershell.Utility +{ + + public class RackspaceRegistrationManager : RegistrationManager + { + public override RegistrationResponse Register(ServiceProvider serviceProvider) + { + this.ValidateCredentialElements(ref serviceProvider); + + string authenticationEndpoint = serviceProvider.CredentialElements.Where(ce => ce.Key == "AuthenticationServiceURI").Single().Value; + string userName = serviceProvider.CredentialElements.Where(ce => ce.Key == "Username").Single().Value; + string password = serviceProvider.CredentialElements.Where(ce => ce.Key == "Password").Single().Value; + string tenantId = serviceProvider.CredentialElements.Where(ce => ce.Key == "DefaultTenantId").Single().Value; + IOpenStackCredential credential = new OpenStackCredential(new Uri (authenticationEndpoint), userName, password, tenantId); + + return new RegistrationResponse(credential, serviceProvider); + } + + private SecureString GetSecureString(string password) + { + SecureString securePassword = new SecureString(); + password.ToCharArray().ToList().ForEach(securePassword.AppendChar); + return SecureStringHelper.ConvertToSecureString(password); + + } + } +} + diff --git a/Rackspace.Client.Powershell/bin/Debug/Deployment/Rackspace.psd1 b/Rackspace.Client.Powershell/bin/Debug/Deployment/Rackspace.psd1 new file mode 100644 index 0000000..06c9896 --- /dev/null +++ b/Rackspace.Client.Powershell/bin/Debug/Deployment/Rackspace.psd1 @@ -0,0 +1,20 @@ +@{ +ModuleToProcess = 'Rackspace.Openstack.Client.Powershell.dll' +GUID="{847a28a4-6407-4aa6-8070-a4a51396db70}" +Author="Sam" +CompanyName="Rackspace Corporation" +Copyright="© Rackspace. All rights reserved." +ModuleVersion="1.0.0.0" +PowerShellVersion="2.0" +CLRVersion="4.0.30319" +FormatsToProcess="" +FileList='' +RequiredAssemblies = 'Openstack.dll', 'Openstack.Common.dll' +} + + + + + + +