diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config
new file mode 100644
index 0000000..67f8ea0
--- /dev/null
+++ b/.nuget/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe
new file mode 100644
index 0000000..9cba6ed
Binary files /dev/null and b/.nuget/NuGet.exe differ
diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets
new file mode 100644
index 0000000..2c3545b
--- /dev/null
+++ b/.nuget/NuGet.targets
@@ -0,0 +1,151 @@
+
+
+
+ $(MSBuildProjectDirectory)\..\
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
+
+
+
+
+ $(SolutionDir).nuget
+
+
+
+ packages.$(MSBuildProjectName.Replace(' ', '_')).config
+
+
+
+
+
+ $(PackagesProjectConfig)
+
+
+
+
+ packages.config
+
+
+
+
+
+
+ $(NuGetToolsPath)\NuGet.exe
+ @(PackageSource)
+
+ "$(NuGetExePath)"
+ mono --runtime=v4.0.30319 $(NuGetExePath)
+
+ $(TargetDir.Trim('\\'))
+
+ -RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
+
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
+
+
+
+ RestorePackages;
+ $(BuildDependsOn);
+
+
+
+
+ $(BuildDependsOn);
+ BuildPackage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.nuget/packages.config b/.nuget/packages.config
new file mode 100644
index 0000000..3f66cf8
--- /dev/null
+++ b/.nuget/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln b/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln
new file mode 100644
index 0000000..00ccad7
--- /dev/null
+++ b/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.sln
@@ -0,0 +1,46 @@
+
+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
new file mode 100644
index 0000000..7666a01
--- /dev/null
+++ b/Openstack.Client.Powershell.Deployment/Openstack.Client.Powershell.Deployment.vdproj
@@ -0,0 +1,2113 @@
+"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
new file mode 100644
index 0000000..3d2567f
--- /dev/null
+++ b/Openstack.Client.Powershell/BaseNavigationCmdletProvider.cs
@@ -0,0 +1,242 @@
+/* ============================================================================
+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.Management.Automation.Provider;
+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 System.Reflection;
+using System.Xml.Linq;
+using System.Xml.XPath;
+using System.Threading;
+using Openstack.Client.Powershell.Utility;
+using Openstack.Storage;
+using System.Security;
+using System.Linq;
+using Openstack.Identity;
+
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class BaseNavigationCmdletProvider : NavigationCmdletProvider
+ {
+
+ OpenstackClient _client; // = new OpenstackClient(credential, CancellationToken.None);
+
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected OpenstackClient Client
+ {
+ get
+ {
+ return (OpenstackClient)this.SessionState.PSVariable.Get("Client").Value;
+ }
+ set
+ {
+ this.SessionState.PSVariable.Set(new PSVariable("Client", value));
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ protected Settings Settings
+ {
+ get
+ {
+ return this.Context.Settings;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ protected Context Context
+ {
+ get
+ {
+ return (Context)this.SessionState.PSVariable.GetValue("Context", null);
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsContextInitialized()
+ {
+ if (this.SessionState.PSVariable.GetValue("Context", null) == null) {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ protected string ConfigFilePath
+ {
+ get
+ {
+ try
+ {
+ return (string)this.SessionState.PSVariable.Get("ConfigPath").Value;
+ }
+ catch (Exception)
+ {
+ return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+ }
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private void SetZoneColor()
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement defaultZoneNode = doc.XPathSelectElement("//AvailabilityZone[@isDefault='True']");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), defaultZoneNode.Attribute("shellForegroundColor").Value);
+ this.Host.UI.RawUI.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), defaultZoneNode.Attribute("shellForegroundColor").Value);
+ this.Context.Forecolor = defaultZoneNode.Attribute("shellForegroundColor").Value;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ protected void InitializeSession()
+ {
+ CredentialManager manager = new CredentialManager(false);
+ IOpenstackCredential credential = manager.GetCredentials(false);
+
+ // 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..
+
+ Context context = new Context();
+ context.ServiceCatalog = credential.ServiceCatalog;
+ context.Settings = Settings.Default;
+ context.ProductName = "Openstack-WinCLI";
+ context.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+
+ this.SessionState.PSVariable.Set(new PSVariable("Context", context));
+ this.SessionState.PSVariable.Set(new PSVariable("Client", client));
+ this.SetZoneColor();
+ }
+ #region Implementation of DriveCmdletProvider
+//==================================================================================================
+///
+/// Removes an Item from the store..
+///
+///
+//==================================================================================================
+ protected override void ClearItem(string path)
+ {
+ base.ClearItem(path);
+ }
+//==================================================================================================
+///
+/// Called when the user decides to delete a KVSDrive.
+///
+///
+///
+//==================================================================================================
+ protected override PSDriveInfo RemoveDrive(PSDriveInfo drive)
+ {
+ if (drive == null)
+ {
+ WriteError(new ErrorRecord(new ArgumentNullException("drive"), "NullDrive", ErrorCategory.InvalidArgument, drive));
+ return null;
+ }
+ return drive;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override void GetChildNames(string path, ReturnContainers returnContainers)
+ {
+ WriteItemObject(path, path, true);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override string GetChildName(string path)
+ {
+ return base.GetChildName(path);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override bool ItemExists(string path)
+ {
+ return true;
+ }
+ #endregion
+
+//==================================================================================================
+///
+/// This test should not verify the existance of the item at the path.
+/// It should only perform syntactic and semantic validation of the
+/// path. For instance, for the file system provider, that path should
+/// be canonicalized, syntactically verified, and ensure that the path
+/// does not refer to a device.
+///
+///
+///
+//==================================================================================================
+ protected override bool IsValidPath(string path)
+ {
+ return true;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs
new file mode 100644
index 0000000..826e6be
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BasePSCmdlet.cs
@@ -0,0 +1,383 @@
+///* ============================================================================
+//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.Text;
+//using System.Management.Automation;
+//using Openstack.Objects.DataAccess;
+//using System.IO;
+//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 System.Linq;
+//using System.Collections.ObjectModel;
+//using System.Management.Automation.Host;
+
+//namespace Openstack.Client.Powershell.Cmdlets.Common
+//{
+// public class BasePSCmdlet : PSCmdlet
+// {
+// private Openstack.Objects.DataAccess.ResponseFormat _responseFormat = ResponseFormat.none;
+// private BaseRepositoryFactory _repositoryFactory;
+
+// #region Properties
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// protected BaseUIContainer CurrentContainer
+// {
+// get
+// {
+// CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+// if (tempDrive != null)
+// {
+// return tempDrive.CurrentContainer as BaseUIContainer;
+// }
+// else return null;
+// }
+// }
+////=========================================================================================
+/////
+///// Exposes the currently mapped Drive. Belongs in base class???
+/////
+////=========================================================================================
+// protected PSDriveInfo Drive
+// {
+// get
+// {
+// return this.SessionState.Drive.Current;
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// protected void WriteHeaderSection(string headerText)
+// {
+// WriteObject(" ");
+// Console.ForegroundColor = ConsoleColor.DarkGray;
+// WriteObject("==============================================================================================");
+// Console.ForegroundColor = ConsoleColor.Yellow;
+// WriteObject(headerText);
+// Console.ForegroundColor = ConsoleColor.DarkGray;
+// WriteObject("==============================================================================================");
+// Console.ForegroundColor = ConsoleColor.Green;
+// }
+////==================================================================================================
+/////
+/////
+/////
+////==================================================================================================
+// protected Context Context
+// {
+// get
+// {
+// return (Context)this.SessionState.PSVariable.GetValue("Context", null);
+// }
+// set
+// {
+// this.SessionState.PSVariable.Set(new PSVariable("Context", value));
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// protected BaseRepositoryFactory RepositoryFactory
+// {
+// get
+// {
+// if (_repositoryFactory == null)
+// {
+// try
+// {
+// _repositoryFactory = (BaseRepositoryFactory)this.SessionState.PSVariable.Get("BaseRepositoryFactory").Value;
+// }
+// catch (NullReferenceException ex)
+// {
+// throw new PSSecurityException("The Authentication process has failed for this session. Please ensure that proper credentials have been supplied before using any of these cmdlets.");
+// }
+// return _repositoryFactory;
+// }
+// else
+// {
+// return _repositoryFactory;
+// }
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// protected string ConfigFilePath
+// {
+// get
+// {
+// try
+// {
+// return (string)this.SessionState.PSVariable.Get("ConfigPath").Value;
+// }
+// catch (Exception)
+// {
+// return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+// }
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// protected Settings Settings
+// {
+// set
+// {
+// this.Context.Settings = value;
+// }
+// get
+// {
+// return this.Context.Settings;
+// }
+// }
+// #endregion
+// #region Methods
+////==================================================================================================
+/////
+/////
+/////
+/////
+/////
+////==================================================================================================
+// protected string TranslateQuickPickNumber(string path)
+// {
+// CommonDriveInfo drive = this.Drive as CommonDriveInfo;
+// if (drive != null)
+// {
+// BaseUIContainer result = null;
+// int number = 0;
+
+// if (Int32.TryParse(Path.GetFileName(path), out number))
+// {
+// if (path == "\\" + this.Drive.CurrentLocation)
+// {
+// return path.Replace(Path.GetFileName(path), drive.CurrentContainer.Entity.Id);
+// }
+// //else if (path.Length < this.Drive.CurrentLocation.Length)
+// //{
+// // result = drive.CurrentContainer.Parent;
+// //}
+// else
+// {
+// result = drive.CurrentContainer.Containers.Where(q => q.Entity.QuickPickNumber == number).FirstOrDefault();
+// }
+// }
+// else
+// {
+// return path;
+// }
+
+// if (result != null)
+// return path.Replace(Path.GetFileName(path), result.Id);
+// else return null;
+// }
+// else return null;
+// }
+////==================================================================================================
+/////
+/////
+/////
+////==================================================================================================
+// protected override void BeginProcessing()
+// {
+// if (this.Drive.Name != "OpenStack" && this.Drive.Provider.Name != "OS-Storage")
+// {
+// ErrorRecord err = new ErrorRecord(new InvalidOperationException("You must be attached to an ObjectStorage Container or the OpenStack drive to execute an OpenStack Cloud cmdlet."), "0" , ErrorCategory.InvalidOperation, this);
+// this.ThrowTerminatingError(err);
+// }
+
+// bool isAuthorized = false;
+// Type type = this.GetType();
+// object[] metadata = type.GetCustomAttributes(false);
+// bool foundattribute = false;
+
+// foreach (object attribute in metadata)
+// {
+// RequiredServiceIdentifierAttribute identifier = attribute as RequiredServiceIdentifierAttribute;
+
+// if (identifier != null)
+// {
+// if (this.Context.ServiceCatalog.GetService(identifier.Services) != null)
+// isAuthorized = true;
+// }
+// }
+
+// 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));
+// }
+////==================================================================================================
+/////
+///// Writes out the files represented as StorageObjects for the supplied path.
+/////
+////==================================================================================================
+// protected void WriteXML(T graph, string path)
+// {
+// XmlTextWriter xtw = null;
+// MemoryStream stream = new MemoryStream();
+// StringBuilder builder = new StringBuilder();
+// XmlDocument document = new XmlDocument();
+// StringWriter writer = null;
+// XmlSerializer serializer = new XmlSerializer(typeof(T));
+
+// try
+// {
+// serializer.Serialize(stream, graph);
+// stream.Position = 0;
+// document.Load(stream);
+
+// writer = new StringWriter(builder);
+// xtw = new XmlTextWriter(writer);
+// xtw.Formatting = Formatting.Indented;
+
+// document.WriteTo(xtw);
+// }
+// finally
+// {
+// xtw.Close();
+// }
+// WriteObject(builder.ToString());
+// WriteObject("");
+// }
+// #endregion
+// #region Methods
+////=========================================================================================
+/////
+/////
+/////
+/////
+/////
+////=========================================================================================
+// protected bool UserConfirmsDeleteAction(string entity)
+// {
+// Collection choices = new Collection();
+// choices.Add(new ChoiceDescription("Y", "Yes"));
+// choices.Add(new ChoiceDescription("N", "No"));
+
+// if (this.Host.UI.PromptForChoice("Confirm Action", "You are about to delete all " + entity + " in the current container. Are you sure about this?", choices, 0) == 0)
+// {
+// return true;
+// }
+// else
+// {
+// return false;
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// protected void UpdateCache(Context context)
+// {
+// CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+// if (tempDrive != null)
+// {
+// BaseUIContainer container = tempDrive.CurrentContainer as BaseUIContainer;
+// container.Context = context;
+
+// if (container != null)
+// {
+// try
+// {
+// container.Load();
+// }
+// catch (InvalidOperationException) { }
+// if (container.Parent != null)
+// container.Parent.Load();
+// }
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// protected void UpdateCache()
+// {
+// CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+// if (tempDrive != null)
+// {
+// BaseUIContainer container = tempDrive.CurrentContainer as BaseUIContainer;
+
+// if (container != null)
+// {
+// try
+// {
+// container.Load();
+// }
+// catch (InvalidOperationException) { }
+// if (container.Parent != null)
+// container.Parent.Load();
+// }
+// }
+// }
+////=========================================================================================
+/////
+///// Updates the cache if the current UIContainer manages the supplied type.
+/////
+////=========================================================================================
+// protected void UpdateCache() where T : BaseUIContainer
+// {
+// T container = ((CommonDriveInfo)this.Drive).CurrentContainer as T;
+
+// if (container != null)
+// {
+// container.Load();
+// }
+// else
+// {
+// T parentContainer = ((CommonDriveInfo)this.Drive).CurrentContainer.Parent as T;
+// if (parentContainer != null)
+// {
+// parentContainer.Load();
+// }
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// protected StoragePath CreateStoragePath(string path)
+// {
+// return ((OSDriveInfo)this.Drive).CreateStoragePath(path);
+// }
+// #endregion
+// }
+//}
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/AttachVolumeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/AttachVolumeCmdlet.cs
new file mode 100644
index 0000000..51a1b25
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/AttachVolumeCmdlet.cs
@@ -0,0 +1,97 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet("Attach", "Volume", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.BlockStorage)]
+ public class AttachVolumeCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _volumeId;
+ private string _device;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "AttachVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "AttachVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public string VolumeId
+ {
+ get { return _volumeId; }
+ set { _volumeId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "AttachVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Device
+ {
+ get { return _device; }
+ set { _device = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ VolumeAttachment attachment = new VolumeAttachment();
+ attachment.Device = this.Device;
+ attachment.VolumeId = this.VolumeId;
+ attachment.ServerId = this.ServerId;
+
+ this.RepositoryFactory.CreateVolumeRepository().AttachVolume(attachment, this.ServerId);
+ this.UpdateCache();
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/BackupVolumeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/BackupVolumeCmdlet.cs
new file mode 100644
index 0000000..d408dc0
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/BackupVolumeCmdlet.cs
@@ -0,0 +1,107 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet("Backup", "Volume", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.BlockStorage)]
+ public class BackupVolumeCmdlet : BasePSCmdlet
+ {
+ private NewVolumeBackup _newBackup = new NewVolumeBackup();
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, ParameterSetName = "BackupVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("c")]
+ [ValidateNotNullOrEmpty]
+ public string Container
+ {
+ get { return _newBackup.Container; }
+ set { _newBackup.Container = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "BackupVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Description
+ {
+ get { return _newBackup.Description; }
+ set { _newBackup.Container = value; }
+ }
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "BackupVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public string VolumeId
+ {
+ get { return _newBackup.VolumeId;}
+ set { _newBackup.VolumeId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "BackupVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _newBackup.Name; }
+ set { _newBackup.Name = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewVolumeBackup backup = new NewVolumeBackup();
+
+ backup.VolumeId = this.TranslateQuickPickNumber(_newBackup.VolumeId);
+
+ this.RepositoryFactory.CreateVolumeRepository().SaveVolumeBackup(backup);
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/DetachVolumeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/DetachVolumeCmdlet.cs
new file mode 100644
index 0000000..314c8f3
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/DetachVolumeCmdlet.cs
@@ -0,0 +1,78 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet("Detach", "Volume", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.BlockStorage)]
+ public class DetachVolumeCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _volumeId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DettachVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DettachVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public string VolumeId
+ {
+ get { return _volumeId; }
+ set { _volumeId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.RepositoryFactory.CreateVolumeRepository().DetachVolume(this.VolumeId, this.ServerId);
+ this.UpdateCache();
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewSnapshotCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewSnapshotCmdlet.cs
new file mode 100644
index 0000000..027486e
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewSnapshotCmdlet.cs
@@ -0,0 +1,132 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.Security;
+using System;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet(VerbsCommon.New, "Snapshot", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.BlockStorage)]
+ public class NewSnapshotCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private SwitchParameter _force = false;
+ private string _description;
+ private string _volumeId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewSnapshot", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewSnapshot", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Description
+ {
+ get { return _description; }
+ set { _description = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewSnapshot", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public string VolumeId
+ {
+ get { return _volumeId; }
+ set { _volumeId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 4, ParameterSetName = "NewSnapshot", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("f")]
+ public SwitchParameter Force
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private bool IsVolumeAvailable(string volumeId)
+ {
+ Volume volume = this.RepositoryFactory.CreateVolumeRepository().GetVolume(volumeId);
+ if (volume.Status == "in-use")
+ return false;
+ else
+ return true;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.IsVolumeAvailable(this.VolumeId))
+ {
+ NewSnapshot snapshot = new NewSnapshot();
+ snapshot.Description = this.Description;
+ snapshot.Name = this.Name;
+ snapshot.VolumeId = this.VolumeId;
+ snapshot.Force = this.Force;
+
+ this.RepositoryFactory.CreateSnapshotRepository().SaveSnapshot(snapshot);
+ this.UpdateCache();
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("The specified Volume is already in use.");
+ Console.WriteLine("");
+ }
+ }
+ #endregion
+ }
+}
+
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewVolumeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewVolumeCmdlet.cs
new file mode 100644
index 0000000..55c235f
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/NewVolumeCmdlet.cs
@@ -0,0 +1,153 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet(VerbsCommon.New, "Volume", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.BlockStorage)]
+ public class NewVolumeCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _size;
+ private string _description;
+ private string[] _metadata;
+ private NewVolume vol = new NewVolume();
+ private string _availabilityZone;
+ private string _sourceVolid;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 4, ParameterSetName = "NewVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("az")]
+ [ValidateNotNullOrEmpty]
+ public string AvailabilityZone
+ {
+ get { return _availabilityZone; }
+ set { _availabilityZone = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 5, ParameterSetName = "NewVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("svid")]
+ [ValidateNotNullOrEmpty]
+ public string SourceVolumeId
+ {
+ get { return _sourceVolid; }
+ set { _sourceVolid = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewVolume", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Description
+ {
+ get { return _description; }
+ set { _description = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string Size
+ {
+ get { return _size; }
+ set { _size = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, Mandatory = false, ParameterSetName = "NewVolume", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("md")]
+ [ValidateNotNullOrEmpty]
+ public string[] MetaData
+ {
+ get { return _metadata; }
+ set { _metadata = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewVolume volume = new NewVolume();
+ volume.Description = this.Description;
+ volume.Name = this.Name;
+ volume.SourceVolid = this.SourceVolumeId;
+ volume.AvailabilityZone = this.AvailabilityZone;
+
+ if (this.SourceVolumeId == null)
+ volume.Size = this.Size;
+ else
+ volume.Size = null;
+
+
+ if (_metadata != null && _metadata.Length > 0)
+ {
+ foreach (string kv in _metadata)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ volume.Metadata.Add(temp[0], temp[1]);
+ }
+ }
+
+ this.RepositoryFactory.CreateVolumeRepository().SaveVolume(volume);
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveSnapshotCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveSnapshotCmdlet.cs
new file mode 100644
index 0000000..d41c8fc
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveSnapshotCmdlet.cs
@@ -0,0 +1,62 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet(VerbsCommon.Remove, "Snapshot", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveSnapshotCmdlet : BasePSCmdlet
+ {
+ private string _snapshotId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RemoveSnapshot", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "a")]
+ [Alias("s")]
+ public string SnapshotId
+ {
+ get { return _snapshotId; }
+ set { _snapshotId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.UserConfirmsDeleteAction("Snapshots"))
+ {
+ this.RepositoryFactory.CreateSnapshotRepository().DeleteSnapshot(this.SnapshotId);
+ this.UpdateCache();
+ }
+ }
+ #endregion
+ }
+}
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeBackupCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeBackupCmdlet.cs
new file mode 100644
index 0000000..6cffa11
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeBackupCmdlet.cs
@@ -0,0 +1,26 @@
+/* ============================================================================
+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;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ class RemoveVolumeBackupCmdlet
+ {
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeCmdlet.cs
new file mode 100644
index 0000000..013aabd
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/BlockStorage/RemoveVolumeCmdlet.cs
@@ -0,0 +1,102 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain.BlockStorage;
+
+namespace Openstack.Client.Powershell.Cmdlets.BlockStorage
+{
+ [Cmdlet(VerbsCommon.Remove, "Volume", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveVolumeCmdlet : BasePSCmdlet
+ {
+ private string _volumeId;
+ private SwitchParameter _force = false;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "RemoveVolume2", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RemoveVolume", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "a")]
+ [Alias("v")]
+ public string VolumeId
+ {
+ get { return _volumeId; }
+ set { _volumeId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.VolumeId);
+
+ if (_force == true && this.UserConfirmsDeleteAction("Volumes")) {
+ this.RemoveAllVolumes();
+ }
+ else
+ {
+ this.RepositoryFactory.CreateVolumeRepository().DeleteVolume(id);
+ this.UpdateCache();
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllVolumes()
+ {
+ List volumes = this.RepositoryFactory.CreateVolumeRepository().GetVolumes();
+ Console.WriteLine("");
+
+ foreach (Volume volume in volumes)
+ {
+
+ Console.WriteLine("Removing Volume : " + volume.Name);
+ this.RepositoryFactory.CreateVolumeRepository().DeleteVolume(volume.Id);
+
+ }
+ Console.WriteLine("");
+ }
+ #endregion
+ }
+}
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Clipboard.cs b/Openstack.Client.Powershell/Cmdlets/Clipboard.cs
new file mode 100644
index 0000000..030021d
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Clipboard.cs
@@ -0,0 +1,39 @@
+/* ============================================================================
+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.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace Openstack.Client.Powershell.Cmdlets
+{
+ class OutClipboard
+ {
+ [STAThread]
+ public static void SetText(string text)
+ {
+ TextBox tb = new TextBox();
+ tb.Multiline = true;
+
+ tb.Text = text;
+ tb.SelectAll();
+ tb.Copy();
+
+ }
+ }
+}
+
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs
new file mode 100644
index 0000000..dd67a1f
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/BaseAuthenticationCmdlet.cs
@@ -0,0 +1,268 @@
+/* ============================================================================
+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.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;
+
+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);
+
+ 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();
+
+ 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);
+ }
+
+ Collection drives = new Collection();
+
+ // 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)
+ {
+
+ }
+
+ 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");
+ }
+ }
+////=======================================================================================================
+/////
+///// 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..
+
+ 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);
+
+ 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(" ");
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ 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("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs
new file mode 100644
index 0000000..2b6188c
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/BasePSCmdlet.cs
@@ -0,0 +1,310 @@
+/* ============================================================================
+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.Text;
+using System.Management.Automation;
+using Openstack.Client.Powershell.Utility;
+using System.IO;
+using Openstack.Common;
+using System.Xml;
+using System.Xml.Serialization;
+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
+{
+ public class BasePSCmdlet : PSCmdlet
+ {
+ #region Properties
+ ////=========================================================================================
+ /////
+ /////
+ /////
+ ////=========================================================================================
+ //protected BaseUIContainer CurrentContainer
+ //{
+ // get
+ // {
+ // CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+ // if (tempDrive != null)
+ // {
+ // return tempDrive.CurrentContainer as BaseUIContainer;
+ // }
+ // else return null;
+ // }
+ //}
+ //=========================================================================================
+ ///
+ /// Exposes the currently mapped Drive. Belongs in base class???
+ ///
+ //=========================================================================================
+ protected PSDriveInfo Drive
+ {
+ get
+ {
+ return this.SessionState.Drive.Current;
+ }
+ }
+ //=========================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================
+ protected void WriteHeaderSection(string headerText)
+ {
+ WriteObject(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteObject(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+ //==================================================================================================
+ ///
+ ///
+ ///
+ //==================================================================================================
+ protected IOpenstackClient Client
+ {
+ get
+ {
+ return (IOpenstackClient)this.SessionState.PSVariable.GetValue("Client", null);
+ }
+ set
+ {
+ this.SessionState.PSVariable.Set(new PSVariable("Client", value));
+ }
+ }
+ //==================================================================================================
+ ///
+ ///
+ ///
+ //==================================================================================================
+ protected Context Context
+ {
+ get
+ {
+ return (Context)this.SessionState.PSVariable.GetValue("Context", null);
+ }
+ set
+ {
+ this.SessionState.PSVariable.Set(new PSVariable("Context", value));
+ }
+ }
+ //=========================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================
+ protected string ConfigFilePath
+ {
+ get
+ {
+ return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+ }
+ }
+ #endregion
+ #region Methods
+ ////==================================================================================================
+ /////
+ /////
+ /////
+ /////
+ /////
+ ////==================================================================================================
+ //protected string TranslateQuickPickNumber(string path)
+ //{
+ // CommonDriveInfo drive = this.Drive as CommonDriveInfo;
+ // if (drive != null)
+ // {
+ // BaseUIContainer result = null;
+ // int number = 0;
+
+ // if (Int32.TryParse(Path.GetFileName(path), out number))
+ // {
+ // if (path == "\\" + this.Drive.CurrentLocation)
+ // {
+ // return path.Replace(Path.GetFileName(path), drive.CurrentContainer.Entity.Id);
+ // }
+ // //else if (path.Length < this.Drive.CurrentLocation.Length)
+ // //{
+ // // result = drive.CurrentContainer.Parent;
+ // //}
+ // else
+ // {
+ // result = drive.CurrentContainer.Containers.Where(q => q.Entity.QuickPickNumber == number).FirstOrDefault();
+ // }
+ // }
+ // else
+ // {
+ // return path;
+ // }
+
+ // if (result != null)
+ // return path.Replace(Path.GetFileName(path), result.Id);
+ // else return null;
+ // }
+ // else return null;
+ //}
+ //==================================================================================================
+ ///
+ ///
+ ///
+ //==================================================================================================
+ protected override void BeginProcessing()
+ {
+ //if (this.Drive.Name != "OpenStack" && this.Drive.Provider.Name != "OS-Storage")
+ //{
+ // ErrorRecord err = new ErrorRecord(new InvalidOperationException("You must be attached to an ObjectStorage Container or the OpenStack drive to execute an OpenStack Cloud cmdlet."), "0", ErrorCategory.InvalidOperation, this);
+ // this.ThrowTerminatingError(err);
+ //}
+
+ //bool isAuthorized = false;
+ //Type type = this.GetType();
+ //object[] metadata = type.GetCustomAttributes(false);
+ //bool foundattribute = false;
+
+ //foreach (object attribute in metadata)
+ //{
+ // RequiredServiceIdentifierAttribute identifier = attribute as RequiredServiceIdentifierAttribute;
+
+ // if (identifier != null)
+ // {
+ // if (this.Context.ServiceCatalog.Exists(identifier.Services) != null)
+ // isAuthorized = true;
+ // }
+ //}
+
+ //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));
+ }
+ #endregion
+ #region Methods
+ //=========================================================================================
+ ///
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================
+ protected bool UserConfirmsDeleteAction(string entity)
+ {
+ Collection choices = new Collection();
+ choices.Add(new ChoiceDescription("Y", "Yes"));
+ choices.Add(new ChoiceDescription("N", "No"));
+
+ if (this.Host.UI.PromptForChoice("Confirm Action", "You are about to delete all " + entity + " in the current container. Are you sure about this?", choices, 0) == 0)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //=========================================================================================
+ ///
+ ///
+ ///
+ //=========================================================================================
+ protected void UpdateCache(Context context)
+ {
+ //CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+ //if (tempDrive != null)
+ //{
+ // BaseUIContainer container = tempDrive.CurrentContainer as BaseUIContainer;
+ // container.Context = context;
+
+ // if (container != null)
+ // {
+ // try
+ // {
+ // container.Load();
+ // }
+ // catch (InvalidOperationException) { }
+ // if (container.Parent != null)
+ // container.Parent.Load();
+ // }
+ //}
+ }
+ //=========================================================================================
+ ///
+ ///
+ ///
+ //=========================================================================================
+ protected void UpdateCache()
+ {
+ //CommonDriveInfo tempDrive = this.Drive as CommonDriveInfo;
+ //if (tempDrive != null)
+ //{
+ // BaseUIContainer container = tempDrive.CurrentContainer as BaseUIContainer;
+
+ // if (container != null)
+ // {
+ // try
+ // {
+ // container.Load();
+ // }
+ // catch (InvalidOperationException) { }
+ // if (container.Parent != null)
+ // container.Parent.Load();
+ // }
+ //}
+ }
+ //=========================================================================================
+ ///
+ /// Updates the cache if the current UIContainer manages the supplied type.
+ ///
+ //=========================================================================================
+ //protected void UpdateCache() where T : BaseUIContainer
+ //{
+ // T container = ((CommonDriveInfo)this.Drive).CurrentContainer as T;
+
+ // if (container != null)
+ // {
+ // container.Load();
+ // }
+ // else
+ // {
+ // T parentContainer = ((CommonDriveInfo)this.Drive).CurrentContainer.Parent as T;
+ // if (parentContainer != null)
+ // {
+ // parentContainer.Load();
+ // }
+ // }
+ //}
+ //=========================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================
+ //protected StoragePath CreateStoragePath(string path)
+ //{
+ // return ((OSDriveInfo)this.Drive).CreateStoragePath(path);
+ //}
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/CopyIdCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/CopyIdCmdlet.cs
new file mode 100644
index 0000000..3728975
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/CopyIdCmdlet.cs
@@ -0,0 +1,61 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System.IO;
+using System.Xml;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Linq;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Copy, "Id", SupportsShouldProcess = true)]
+ public class CopyIdCmdlet : BasePSCmdlet
+ {
+ private int _quickPickNumber;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "CopyIdCmdlet", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("qp")]
+ public int QuickPickNumber
+ {
+ get { return _quickPickNumber; }
+ set { _quickPickNumber = value; }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ int number = 0;
+ CommonDriveInfo drive = this.Drive as CommonDriveInfo;
+ BaseUIContainer result = drive.CurrentContainer.Containers.Where(q => q.Entity.QuickPickNumber == _quickPickNumber).FirstOrDefault();
+
+ WriteObject("");
+ this.WriteObject("Id " + result.Entity.Id + " copied to clipboard.");
+ WriteObject("");
+ OutClipboard.SetText(result.Entity.Id);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs
new file mode 100644
index 0000000..9bf9519
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetCatalogCmdlet.cs
@@ -0,0 +1,152 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System.IO;
+using System.Xml;
+using Openstack.Objects.Domain.Admin;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Get, "Catalog", SupportsShouldProcess = true)]
+ public class GetCatalogCmdlet : BasePSCmdlet
+ {
+ private SwitchParameter _verbose = false;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ //[Parameter(Mandatory = false, ParameterSetName = "gc0", ValueFromPipelineByPropertyName = true, HelpMessage = "Prints information for the current service in use.")]
+ //[Alias("cs")]
+ //[ValidateNotNullOrEmpty]
+ //public SwitchParameter CurrentService
+ //{
+ // get { return _currentService; }
+ // set { _currentService = value; }
+ //}
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Mandatory = false, ParameterSetName = "gc0", ValueFromPipelineByPropertyName = true, HelpMessage = "Prints extended information for each service.")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter Verbose2
+ {
+ get { return _verbose; }
+ set { _verbose = value; }
+ }
+ #endregion
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void WriteSection(string headerText)
+ {
+ WriteObject(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteObject(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private void PrintEndpoint(Endpoint 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();
+ }
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private void PrintServiceVerbose(Service service)
+ {
+ Console.WriteLine("");
+ this.WriteSection ("Service : " + service.Name);
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("General");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("Name : " + service.Name);
+ Console.WriteLine("Type : " + service.Type);
+ // Console.WriteLine("Provider Name : " + service.ProviderName);
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("");
+ Console.WriteLine("Associated Endpoints");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+
+ foreach (Endpoint endpoint in service.Endpoints)
+ {
+ this.PrintEndpoint(endpoint);
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void PrintServiceCatalog()
+ {
+ WriteObject("");
+ this.WriteSection("You have access to the following Services ");
+ WriteObject("");
+
+ foreach (Service service in this.Context.ServiceCatalog)
+ {
+ if (!_verbose)
+ WriteObject(service);
+ else
+ PrintServiceVerbose(service);
+ }
+ WriteObject("");
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ this.PrintServiceCatalog();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs
new file mode 100644
index 0000000..0b94c1b
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetConfigCmdlet.cs
@@ -0,0 +1,77 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System.IO;
+using System.Xml;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Get, "Config", SupportsShouldProcess = true)]
+ public class GetConfigCmdlet : BasePSCmdlet
+ {
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void WriteSection(string headerText)
+ {
+ WriteObject(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteObject(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ string configFilePath = this.ConfigFilePath;
+
+ WriteObject("");
+ this.WriteSection("Current Session Settings are as follows. ");
+ WriteObject("");
+ this.WriteObject("Configuration File located at " + configFilePath);
+ WriteObject("");
+
+ foreach (DictionaryEntry setting in this.Settings)
+ {
+ if (((string)setting.Key) == "SecretKey" || ((string)setting.Key)== "AccessKey")
+ {
+ DictionaryEntry entry = new DictionaryEntry();
+ entry.Value = "***********";
+ entry.Key = setting.Key;
+ WriteObject(entry);
+ }
+ else
+ {
+ WriteObject(setting);
+ }
+ }
+ WriteObject("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetMetadataCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetMetadataCmdlet.cs
new file mode 100644
index 0000000..a3b8644
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetMetadataCmdlet.cs
@@ -0,0 +1,210 @@
+/* ============================================================================
+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.Generic;
+using System.Management.Automation;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.Admin;
+
+namespace Openstack.Client.Powershell.Cmdlets.Storage.CDN
+{
+ [Cmdlet(VerbsCommon.Get, "Metadata", SupportsShouldProcess = true)]
+ public class GetNMetadataCmdlet2 : BasePSCmdlet
+ {
+ private string _cdnContainerName;
+ private string _sourcePath;
+ private string _objectStorageContainerName;
+ private string _serverId;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "serverMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "containerMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("cn")]
+ [ValidateNotNullOrEmpty]
+ public string ObjectStorageContainerName
+ {
+ get { return _objectStorageContainerName; }
+ set { _objectStorageContainerName = value; }
+ }
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(Position = 0 , ParameterSetName = "objectMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("sp")]
+ [ValidateNotNullOrEmpty]
+ public string SourcePath
+ {
+ get { return _sourcePath; }
+ set { _sourcePath = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Mandatory = false, ParameterSetName = "cdnMetadata", ValueFromPipelineByPropertyName = true, HelpMessage = "The Name of the Container to enable for CDN access.")]
+ [Alias("cdn")]
+ [ValidateNotNullOrEmpty]
+ public string CDNContainerName
+ {
+ get { return _cdnContainerName; }
+ set { _cdnContainerName = value; }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void WriteSection(string headerText)
+ {
+ WriteObject(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteObject(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void WriteKVPs(List> kvps, string displayName)
+ {
+ if (kvps.Count > 0)
+ {
+ WriteObject("");
+ this.WriteSection("Meta-Data for " + displayName + " is as follows.");
+ WriteObject("");
+ foreach (KeyValuePair kvp in kvps)
+ {
+ WriteObject("Key = " + kvp.Key.Replace("X-", string.Empty));
+ WriteObject("Value = " + Convert.ToString(kvp.Value));
+ WriteObject("---------------------------------");
+ }
+ WriteObject("");
+ }
+ else
+ {
+ WriteObject("");
+ Console.WriteLine("No meta-data found for the supplied resource name.");
+ WriteObject("");
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessCDNMetadata()
+ {
+ if (this.Context.ServiceCatalog.DoesServiceExist(Services.CDN) == false) {
+ Console.WriteLine("You don't have access to CDN services under this account. For information on signing up for CDN access please go to http://Openstack.com/.");
+ }
+ WriteKVPs(RepositoryFactory.CreateCDNRepository().GetMetaData(this.CDNContainerName), this.CDNContainerName);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessObjectMetadata()
+ {
+ if (this.Drive.Provider.Name != "OS-Storage")
+ Console.WriteLine("You must be using the Object Storage Provider to use this cmdlet with the supplied parameters. To use this provider mount to a ObjectStorage container first. To see a list of available Containers issue the Get-PSDrive command.");
+ else
+ WriteKVPs(RepositoryFactory.CreateStorageObjectRepository().GetMetaData(this.CreateStoragePath(this.SourcePath).AbsoluteURI), this.SourcePath);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessContainerMetadata()
+ {
+ if (this.Drive.Provider.Name != "OS-Storage")
+ Console.WriteLine("You must be using the Object Storage Provider to use this cmdlet with the supplied parameters. To use this provider mount to a ObjectStorage container first. To see a list of available Containers issue the Get-PSDrive command.");
+ else
+ WriteKVPs(RepositoryFactory.CreateContainerRepository().GetMetaData(_objectStorageContainerName), _objectStorageContainerName);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessServerMetadata()
+ {
+ if (this.Context.ServiceCatalog.DoesServiceExist(Services.Compute) == false)
+ Console.WriteLine("You don't have access to Compute services under this account. For information on signing up for this please go to http://Openstack.com/.");
+ else
+ {
+ Server server = RepositoryFactory.CreateServerRepository().GetServer(this.ServerId);
+ //WriteKVPs(server.MetaData.ToKeypairs(), server.Name);
+ }
+ }
+//=========================================================================================
+///
+/// The main driver..
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ switch (this.ParameterSetName)
+ {
+ case ("serverMetadata"):
+ this.ProcessServerMetadata();
+ break;
+
+ case ("containerMetadata"):
+ this.ProcessContainerMetadata();
+ break;
+
+ case ("cdnMetadata"):
+
+ this.ProcessCDNMetadata();
+ break;
+
+ case ("objectMetadata"):
+ this.ProcessObjectMetadata();
+ break;
+ }
+ }
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetNotesCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetNotesCmdlet.cs
new file mode 100644
index 0000000..8313ae4
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetNotesCmdlet.cs
@@ -0,0 +1,148 @@
+/* ============================================================================
+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.Xml.Linq;
+using System.Linq;
+using System.Xml.XPath;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Get, "Notes", SupportsShouldProcess = true)]
+ public class GetNotesCmdlet : BasePSCmdlet
+ {
+ private bool _showAllNotes = false;
+ private string _version;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "sn", ValueFromPipelineByPropertyName = true, HelpMessage = "Show all release notes for this product.")]
+ [Alias("all")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter ShowAllNotes
+ {
+ get { return _showAllNotes; }
+ set { _showAllNotes = value; }
+ }
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "sn", Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Show release notes for a specific version of the CLI.")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public string Version
+ {
+ get { return _version; }
+ set { _version = value; }
+ }
+ #endregion
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private void PrintRelease (XElement releaseNode)
+ {
+ Console.WriteLine("-------------------------------------------------------- ");
+ Console.WriteLine("Version : " + releaseNode.Attribute(XName.Get("version")).Value);
+ Console.WriteLine("Notes :");
+
+ XElement notes = (from xml2 in releaseNode.Descendants()
+ select xml2).FirstOrDefault();
+ Console.WriteLine(notes.Value);
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ public void PrintVersionNotes(XDocument releaseNotes)
+ {
+ string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ XElement releaseNode = (from xml2 in releaseNotes.Descendants("Release")
+ where xml2.Attribute(XName.Get("version")).Value == _version
+ select xml2).FirstOrDefault();
+
+ this.PrintRelease(releaseNode);
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void PrintAllNotes(XDocument releaseNotes)
+ {
+ Console.WriteLine(" ");
+ foreach (XElement element in releaseNotes.Descendants("Release"))
+ {
+ this.PrintRelease(element);
+ }
+ Console.WriteLine(" ");
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void PrintCurrentRelease(XDocument releaseNotes)
+ {
+ string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ //XElement releaseNode = (from xml2 in releaseNotes.Descendants("Release")
+ // where xml2.Attribute(XName.Get("version")).Value == currentVersion
+ // select xml2).FirstOrDefault();
+
+ XElement notes = releaseNotes.XPathSelectElement("//Release[@version='" + currentVersion + "']");
+ if (notes != null)
+ this.PrintRelease(notes);
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("No release notes exist for the current version.");
+ Console.WriteLine("");
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ XDocument releaseNotes = XDocument.Load(this.Settings.ReleaseNotesURI);
+
+ if (_version == null && _showAllNotes == false)
+ {
+ this.PrintCurrentRelease(releaseNotes);
+ }
+ else if (_showAllNotes)
+ {
+ this.PrintAllNotes(releaseNotes);
+ }
+ else if (_version != null)
+ {
+ this.PrintVersionNotes(releaseNotes);
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs
new file mode 100644
index 0000000..6523797
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetServiceProvidersCmdlet.cs
@@ -0,0 +1,63 @@
+///* ============================================================================
+//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.Providers.Common;
+using System.Security.Cryptography;
+using System.Text;
+using System.Web;
+using Openstack;
+using System.Xml.Linq;
+using System.Collections.Generic;
+using Openstack.Client.Powershell.Utility;
+using System.Linq;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Get, "SP", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class GetServiceProvidersCmdlet : BasePSCmdlet
+ {
+ #region Parameters
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ 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);
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs
new file mode 100644
index 0000000..fafaac4
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetVersionCmdlet.cs
@@ -0,0 +1,41 @@
+/* ============================================================================
+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 System.Reflection;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.GroupManagement
+{
+ [Cmdlet(VerbsCommon.Get, "Version", SupportsShouldProcess = true)]
+ public class GetVersionCmdlet : BasePSCmdlet
+ {
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ Console.WriteLine(" ");
+ Console.WriteLine("Assembly Location : " + Assembly.GetExecutingAssembly().Location);
+ Console.WriteLine("Product Version : " + Assembly.GetExecutingAssembly().GetName().Version);
+ Console.WriteLine("CLR Version : " + Assembly.GetExecutingAssembly().ImageRuntimeVersion);
+ Console.WriteLine(" ");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs
new file mode 100644
index 0000000..8be0e06
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetZoneCmdlet.cs
@@ -0,0 +1,46 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Cmdlets.Common;
+using System.Management.Automation;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet("Get", "Zone", SupportsShouldProcess = true)]
+ public class GetZoneCmdlet : BasePSCmdlet
+ {
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement defaultZoneNode = doc.XPathSelectElement("//AvailabilityZone[@isDefault='True']");
+
+ Console.WriteLine("");
+ Console.WriteLine("Current Availability Zone is " + defaultZoneNode.Attribute("name").Value);
+ Console.WriteLine("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs
new file mode 100644
index 0000000..d53784b
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/GetZonesCmdlet.cs
@@ -0,0 +1,115 @@
+/* ============================================================================
+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 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
+{
+ [Cmdlet("Get", "Zones", SupportsShouldProcess = true)]
+ public class GetZonesCmdlet : BasePSCmdlet
+ {
+ private SwitchParameter _verbose = false;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Mandatory = false, ParameterSetName = "gc0", ValueFromPipelineByPropertyName = true, HelpMessage = "Prints extended information for each service.")]
+ [Alias("v")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter Verbose2
+ {
+ get { return _verbose; }
+ set { _verbose = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ShowVerboseOutput(IEnumerable zoneKeyNode)
+ {
+ foreach (XElement element in zoneKeyNode)
+ {
+ this.WriteHeaderSection("Zone : " + element.Attribute("name").Value);
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine("Zone Id : " + element.Attribute("id").Value);
+ Console.WriteLine("Zone Name : " + element.Attribute("name").Value);
+ Console.WriteLine("Shell Foreground Color : " + element.Attribute("shellForegroundColor").Value);
+ 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));
+ Console.WriteLine("");
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ 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;
+
+ if (element.Attribute("isDefault").Value == "True")
+ zone.IsDefault = true;
+ else
+ zone.IsDefault = false;
+
+ this.WriteObject(zone);
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string configFilePath = this.ConfigFilePath; ;
+ XDocument doc = XDocument.Load(configFilePath);
+ IEnumerable zoneKeyNode = doc.Descendants("AvailabilityZone");
+
+ if (_verbose)
+ {
+ this.ShowVerboseOutput(zoneKeyNode);
+ }
+ else
+ {
+ this.ShowNonVerboseOutput(zoneKeyNode);
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs b/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs
new file mode 100644
index 0000000..0bddfc2
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/NewServiceProvider.cs
@@ -0,0 +1,131 @@
+//* ============================================================================
+//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 System.Xml.Linq;
+using System.Collections.Generic;
+using Openstack.Client.Powershell.Utility;
+using System.Xml.XPath;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.New, "SP", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class NewServiceProvidersCmdlet : BasePSCmdlet
+ {
+
+ private string _name = "HP21";
+ private bool _isDefault = false;
+ private string _authenticationServiceURI = "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens";
+ private string _username = "travis.plummer@hp.com";
+ private string _password = "NoRemorseGlock27";
+ private string _defTenantId = "travis.plummer@hp.com";
+
+ #region Parameters
+
+ [Parameter(Position = 0, ParameterSetName = "NewSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ [Parameter(Position = 1, ParameterSetName = "NewSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("url")]
+ public string AuthenticationServiceURI
+ {
+ get { return _authenticationServiceURI; }
+ set { _authenticationServiceURI = value; }
+ }
+ [Parameter(Position = 2, ParameterSetName = "NewSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("un")]
+ public string Username
+ {
+ get { return _username; }
+ set { _username = value; }
+ }
+ [Parameter(Position = 3, ParameterSetName = "NewSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("p")]
+ public string Password
+ {
+ get { return _password; }
+ set { _password = value; }
+ }
+ [Parameter(Position = 4, ParameterSetName = "NewSP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("t")]
+ public string DefTenantId
+ {
+ get { return _defTenantId; }
+ set { _defTenantId = value; }
+ }
+ [Parameter(Position = 4, ParameterSetName = "NewSP", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter IsDefault
+ {
+ get { return _isDefault; }
+ set { _isDefault = value; }
+ }
+
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private XElement CreateAddElement(string name, string value)
+ {
+ XElement element = new XElement("add");
+ element.SetAttributeValue("key", name);
+ element.SetAttributeValue("value", value);
+ return element;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string isDef = "False";
+ if (IsDefault) {
+ isDef = "True";
+ }
+ else {
+ isDef = "False";
+ }
+
+ List serviceProviders = new List();
+ XDocument doc = XDocument.Load(this.ConfigFilePath);
+ XElement element = new XElement("ServiceProvider", new XAttribute("name", this.Name), new XAttribute("isDefault", isDef));
+
+ element.Add(this.CreateAddElement("AuthenticationServiceURI", this.AuthenticationServiceURI));
+ element.Add(this.CreateAddElement("Username", this.Username));
+ element.Add(this.CreateAddElement("Password", this.Password));
+ element.Add(this.CreateAddElement("DefaultTenantId", this.DefTenantId));
+
+ doc.XPathSelectElement("configuration/appSettings/IdentityServices").Add(element);
+ doc.Save(this.ConfigFilePath);
+ this.WriteObject("");
+ this.WriteObject("New Serviced Provider " + this.Name + " created!");
+ this.WriteObject("");
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/RefreshCacheCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/RefreshCacheCmdlet.cs
new file mode 100644
index 0000000..3051466
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/RefreshCacheCmdlet.cs
@@ -0,0 +1,40 @@
+/* ============================================================================
+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.Management.Automation;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet("Refresh", "Cache", SupportsShouldProcess = true)]
+ public class RefreshCacheCmdlet : BasePSCmdlet
+ {
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.UpdateCache();
+ Console.WriteLine("");
+ Console.WriteLine("Shell Cache Reloaded successfully.");
+ Console.WriteLine("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs
new file mode 100644
index 0000000..bd17be2
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/SetConfigCmdlet.cs
@@ -0,0 +1,197 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Xml.Linq;
+using Openstack.Common.Properties;
+using Openstack.Objects.Domain;
+using System.Xml.XPath;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Utility;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Set, "Config", SupportsShouldProcess = true)]
+ public class SetConfigCmdlet : BaseAuthenticationCmdlet
+ {
+ private string _key;
+ private string _value;
+ private string _configFilePath = null;
+ private SwitchParameter _reset = false;
+ private string _oldAccessKey;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [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")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ConfigFilePathKey
+ {
+ get { return _configFilePath; }
+ set { _configFilePath = 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; }
+ }
+ #endregion
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void LoadConfigFile()
+ {
+ this.InitializeSession(Settings.Default);
+
+ // 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 (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage"))
+ {
+ this.WriteContainers(_configFilePath);
+ }
+ }
+//======================================================================================================================
+///
+///
+///
+///
+///
+//======================================================================================================================
+ private string GetContainerName(string url)
+ {
+ string[] elements = url.Split('/');
+ return elements[elements.Length - 1];
+ }
+//======================================================================================================================
+///
+///
+///
+///
+///
+//======================================================================================================================
+ private string GetDNSPortion(string url)
+ {
+ string[] elements = url.Split('/');
+ return elements[2];
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ 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..
+
+ if (_oldAccessKey != this.Settings.Username)
+ {
+ this.InitializeSession(this.Settings);
+
+ // 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 (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage"))
+ {
+ this.WriteContainers(_configFilePath);
+ }
+
+ if (this.Drive.Name == "OpenStack")
+ {
+ this.SessionState.InvokeCommand.InvokeScript(@"cd\");
+ ((CommonDriveInfo)this.Drive).CurrentContainer.Load();
+ }
+
+ this.SessionState.PSVariable.Set(new PSVariable("ConfigPath", configFilePath));
+
+ //Context tempContext = (Context)this.SessionState.PSVariable.GetValue("Context", null);
+ //this.UpdateCache(tempContext);
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ 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;
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetCredentialsCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetCredentialsCmdlet.cs
new file mode 100644
index 0000000..adbdf76
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/SetCredentialsCmdlet.cs
@@ -0,0 +1,97 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Objects.Domain.Admin;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet(VerbsCommon.Set, "Credentials", SupportsShouldProcess = true)]
+ public class SetCredentialsCmdlet : BaseAuthenticationCmdlet
+ {
+ private string _accessKey;
+ private string _secretKey;
+ private string _tenantId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, Mandatory = true, ParameterSetName = "sc5", ValueFromPipelineByPropertyName = true, HelpMessage = "s")]
+ [Alias("ak")]
+ [ValidateNotNullOrEmpty]
+ public string AccessKey
+ {
+ get { return _accessKey; }
+ set { _accessKey = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ParameterSetName = "sc5", ValueFromPipelineByPropertyName = true, HelpMessage = "s")]
+ [Alias("sk")]
+ [ValidateNotNullOrEmpty]
+ public string SecretKey
+ {
+ get { return _secretKey; }
+ set { _secretKey = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, Mandatory = true, ParameterSetName = "sc5", ValueFromPipelineByPropertyName = true, HelpMessage = "s")]
+ [Alias("t")]
+ [ValidateNotNullOrEmpty]
+ public string TenantId
+ {
+ get { return _tenantId; }
+ set { _tenantId = value; }
+ }
+ #endregion
+ #region Methods
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ protected override void ProcessRecord()
+ {
+ AuthenticationRequest request = new AuthenticationRequest(new Credentials(_accessKey, _secretKey), _tenantId);
+ this.InitializeSession(request);
+
+ // 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 (this.Context.ServiceCatalog.DoesServiceExist("OS-Storage"))
+ {
+ //this.WriteContainers();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetMetadataCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetMetadataCmdlet.cs
new file mode 100644
index 0000000..f8cefe8
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/SetMetadataCmdlet.cs
@@ -0,0 +1,302 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using System;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.Admin;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Security;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Collections.Generic;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Storage.CDN
+{
+ [Cmdlet(VerbsCommon.Set, "Metadata", SupportsShouldProcess = true)]
+ public class SetMetadataCmdlet2 : BasePSCmdlet
+ {
+ private string _cdnContainerName;
+ private string _sourcePath;
+ private string _objectStorageContainerName;
+ private string _serverId;
+ private string[] _extendedProperties;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter( ParameterSetName = "containerMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("c")]
+ [ValidateNotNullOrEmpty]
+ public string ObjectStorageContainerName
+ {
+ get { return _objectStorageContainerName; }
+ set { _objectStorageContainerName = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("md")]
+ [ValidateNotNullOrEmpty]
+ public string[] ExtendedProperties
+ {
+ get { return _extendedProperties; }
+ set { _extendedProperties = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "serverMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "objectMetadata", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("sp")]
+ [ValidateNotNullOrEmpty]
+ public string SourcePath
+ {
+ get { return _sourcePath; }
+ set { _sourcePath = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Mandatory = false, ParameterSetName = "cdnMetadata", ValueFromPipelineByPropertyName = true, HelpMessage = "The Name of the Container to enable for CDN access.")]
+ [Alias("cdn")]
+ [ValidateNotNullOrEmpty]
+ public string CDNContainerName
+ {
+ get { return _cdnContainerName; }
+ set { _cdnContainerName = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessCDNMetadata()
+ {
+ if (this.Context.ServiceCatalog.DoesServiceExist(Services.CDN) == false)
+ Console.WriteLine("You don't have access to CDN services under this account. For information on signing up for CDN access please go to http://Openstack.com/.");
+ else
+ {
+ List> metadata = new List>();
+ if (this.ExtendedProperties != null && this.ExtendedProperties.Count() > 0)
+ {
+ foreach (string kv in this.ExtendedProperties)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ KeyValuePair element = new KeyValuePair(temp[0], temp[1]);
+
+ metadata.Add(element);
+ }
+ this.RepositoryFactory.CreateCDNRepository().SetMetaData(this.CDNContainerName, metadata);
+ }
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessObjectMetadata()
+ {
+ IStorageObjectRepository repository = this.RepositoryFactory.CreateStorageObjectRepository();
+ StoragePath storagePath = this.CreateStoragePath(_sourcePath);
+ StorageObject storageObject = new StorageObject();
+ storageObject.FileName = storagePath.FileName;
+
+ storageObject.ExtendedProperties.AddEntries(this.ExtendedProperties);
+ repository.SetMetaData(storagePath.AbsoluteURI, storageObject.ExtendedProperties);
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void AddElements(MetaData metadata)
+ {
+ IList elements = ((CommonDriveInfo)this.Drive).CurrentContainer.Entities;
+
+ foreach (KeyValuePair element in metadata)
+ {
+ MetaDataElement newElement = new MetaDataElement();
+ newElement.Key = element.Key;
+ newElement.Value = element.Value;
+
+ elements.Add(newElement);
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public MetaData ReformatMetadata(string[] keyValuePairs)
+ {
+ MetaData metadata = new MetaData();
+
+ if (keyValuePairs != null && keyValuePairs.Count() > 0)
+ {
+ foreach (string kv in keyValuePairs)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ MetaDataElement element = new MetaDataElement();
+ element.Key = temp[0];
+ element.Value = temp[1];
+
+ metadata.Add(temp[0], temp[1]);
+ }
+ return metadata;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ProcessServerMetadata()
+ {
+ if (this.Context.ServiceCatalog.DoesServiceExist(Services.Compute) == false)
+ Console.WriteLine("You don't have access to Compute services under this account. For information on signing up for this please go to http://Openstack.com/.");
+ else
+ {
+ MetaData md = null;
+ if (this.ServerId != null)
+ {
+ md = this.ReformatMetadata(this.ExtendedProperties);
+ this.RepositoryFactory.CreateServerRepository().SetMetadata(md, this.ServerId);
+ this.UpdateCache();
+ }
+ else
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+
+ if (serverContainer != null)
+ {
+ md = this.ReformatMetadata(this.ExtendedProperties);
+ this.RepositoryFactory.CreateServerRepository().SetMetadata(md, serverContainer.Entity.Id);
+ this.UpdateCache();
+ }
+ }
+ else
+ {
+ md = this.ReformatMetadata(this.ExtendedProperties);
+ this.RepositoryFactory.CreateServerRepository().SetMetadata(md, currentContainer.Entity.Id);
+ this.UpdateCache();
+ }
+ }
+ }
+ }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+ private void ProcessContainerMetadata()
+ {
+ if (this.Context.ServiceCatalog.DoesServiceExist(Services.ObjectStorage) == false)
+ Console.WriteLine("You don't have access to Object Storage services under this account. For information on signing up for this please go to http://Openstack.com/.");
+ else
+ {
+ MetaData md = null;
+ if (this.ObjectStorageContainerName != null)
+ {
+ List> exProps = new List>();
+ if (this.ExtendedProperties != null && this.ExtendedProperties.Count() > 0)
+ {
+ foreach (string kv in this.ExtendedProperties)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ exProps.AddEntry(temp[0], temp[1]);
+ }
+ }
+
+ md = this.ReformatMetadata(this.ExtendedProperties);
+ this.RepositoryFactory.CreateContainerRepository().SetMetaData(_objectStorageContainerName, exProps);
+ this.UpdateCache();
+ }
+ else
+ {
+
+ }
+ }
+ }
+//=========================================================================================
+///
+/// The main driver..
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ switch (this.ParameterSetName)
+ {
+ case ("serverMetadata"):
+ this.ProcessServerMetadata();
+ break;
+
+ case ("cdnMetadata"):
+
+ this.ProcessCDNMetadata();
+ break;
+
+ case ("objectMetadata"):
+ this.ProcessObjectMetadata();
+ break;
+
+ case ("containerMetadata"):
+ this.ProcessContainerMetadata();
+ break;
+
+ }
+ }
+
+
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetZoneCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetZoneCmdlet.cs
new file mode 100644
index 0000000..b0a3e71
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/SetZoneCmdlet.cs
@@ -0,0 +1,262 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Cmdlets.Common;
+using System.Management.Automation;
+using System.Xml.Linq;
+using System.Xml.XPath;
+using System.Collections.Generic;
+using Openstack.Objects.Domain;
+using Openstack.Client.Powershell.Providers.Storage;
+using System.Collections.ObjectModel;
+using Openstack.Common.Properties;
+using Openstack.Objects.DataAccess;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet("Set", "Zone", SupportsShouldProcess = true)]
+ public class SetZoneCmdlet : BasePSCmdlet
+ {
+ private string _Zone;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "SetZone", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("z")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet("1", "2", "3", "4", "5")]
+ public string Zone
+ {
+ get { return _Zone; }
+ set { _Zone = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.Drive.Provider.Name != "OS-Cloud" && this.Drive.Provider.Name != "OS-Storage")
+ {
+ ConsoleColor oldColor = Console.ForegroundColor;
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("");
+ Console.WriteLine("Setting the Availability Zone requires you to be connected to the OpenStack: drive or a valid Storage Container. Please map to one of these drive types and reissue the command.");
+ Console.WriteLine("");
+ Console.ForegroundColor = oldColor;
+ }
+ else
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement zoneKeyNode = doc.XPathSelectElement("//AvailabilityZone[@id='" + _Zone + "']");
+ XElement defaultZoneNode = doc.XPathSelectElement("//AvailabilityZone[@isDefault='True']");
+
+ defaultZoneNode.SetAttributeValue("isDefault", "False");
+ zoneKeyNode.SetAttributeValue("isDefault", "True");
+ doc.Save(configFilePath);
+ this.Settings.Load(configFilePath);
+
+ this.Context.Forecolor = zoneKeyNode.Attribute("shellForegroundColor").Value;
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), zoneKeyNode.Attribute("shellForegroundColor").Value);
+ Console.WriteLine("");
+ Console.WriteLine("New Availability Zone " + zoneKeyNode.Attribute("name").Value + " selected.");
+ Console.WriteLine("");
+
+
+ if (this.Drive.Name == "OpenStack")
+ this.SessionState.InvokeCommand.InvokeScript(@"cd\");
+ else
+ this.SessionState.InvokeCommand.InvokeScript("cd c:");
+
+
+ this.UpdateCache();
+ this.WriteServices(zoneKeyNode.Attribute("name").Value);
+ this.WriteContainers();
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void WriteServices(string availabilityZone)
+ {
+ this.WriteHeader("This Availability Zone has the following services available.");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ WriteObject(this.Context.ServiceCatalog.GetAZServices(availabilityZone));
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo)
+ {
+ List storageContainers = null;
+ OSDriveParameters parameters = new OSDriveParameters();
+
+ if (this.Settings != null)
+ {
+ parameters.Settings = this.Settings;
+ }
+ else
+ {
+ parameters.Settings = settings;
+ }
+
+ try
+ {
+ IContainerRepository storageContainerRepository = this.RepositoryFactory.CreateContainerRepository();
+ storageContainers = storageContainerRepository.GetStorageContainers();
+ }
+ 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
+ {
+ 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);
+ drives.Add(kvsDriveInfo);
+ }
+ }
+ 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;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void WriteHeader(string message)
+ {
+ // Write out the commands header information first..
+
+ WriteObject("");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("===================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteObject(message);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteObject("===================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ WriteObject(" ");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void WriteContainers()
+ {
+ List invalidDriveNames = new List();
+ OSDriveParameters parameters = new OSDriveParameters();
+ HPOSNavigationProvider provider = new HPOSNavigationProvider();
+ Collection drives = this.GetAvailableDrives(this.Settings, this.SessionState.Provider.GetOne("OS-Storage"));
+
+ if (drives != null)
+ {
+ this.WriteHeader("Storage Containers available in this Region include");
+
+ // 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");
+ }
+
+ foreach (PSDriveInfo drive in drives)
+ {
+ if (drive.Name != string.Empty)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ 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);
+ }
+
+ }
+ //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(" ");
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Common/SetZoneColorCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Common/SetZoneColorCmdlet.cs
new file mode 100644
index 0000000..d46e22a
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Common/SetZoneColorCmdlet.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;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System.Management.Automation;
+using System.Xml.Linq;
+using System.Xml.XPath;
+using System.Collections.Generic;
+
+namespace Openstack.Client.Powershell.Cmdlets.Common
+{
+ [Cmdlet("Set", "ZoneColor", SupportsShouldProcess = true)]
+ public class SetZoneColorCmdlet : BasePSCmdlet
+ {
+ private string _zone;
+ private string _color;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "SetZoneColor", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("c")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet("Black", "Blue", "Cyan", "DarkBlue", "DarkCyan", "DarkGray", "DarkGreen", "DarkMagenta", "DarkRed", "DarkYellow", "Gray", "Green", "Magenta", "Red", "White", "Yellow")]
+ public string Color
+ {
+ get { return _color; }
+ set { _color = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "SetZoneColor", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("z")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet("1", "2", "3", "4")]
+ public string Zone
+ {
+ get { return _zone; }
+ set { _zone = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement zoneKeyNode = doc.XPathSelectElement("//AvailabilityZone[@id='" + _zone + "']");
+
+ zoneKeyNode.SetAttributeValue("shellForegroundColor", _color);
+ doc.Save(configFilePath);
+
+ Console.WriteLine("");
+ Console.Write(zoneKeyNode.Attribute("name").Value + " now assigned to ");
+
+ ConsoleColor currentColor = Console.ForegroundColor;
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), zoneKeyNode.Attribute("shellForegroundColor").Value);
+
+ Console.Write(_color + ".");
+ Console.ForegroundColor = currentColor;
+ Console.WriteLine("");
+ Console.WriteLine("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetLimitsCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetLimitsCmdlet.cs
new file mode 100644
index 0000000..db7e3d4
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetLimitsCmdlet.cs
@@ -0,0 +1,59 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+using System;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Security;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.DataAccess.Compute;
+
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Security
+{
+ [Cmdlet("Get", "Limits", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class GetLimitsCmdlet : BasePSCmdlet
+ {
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ Limits limits = this.RepositoryFactory.CreateServerRepository().GetLimits();
+ Console.WriteLine("");
+ Console.WriteLine("The following Limits are in place for this account.");
+ Console.WriteLine("");
+ Console.WriteLine("Limit Category : Absolute");
+ Console.WriteLine("-------------------------------------------------");
+ Console.WriteLine("Max Server Metadata Elements : " + limits.limits.AbsoluteLimits.maxServerMeta);
+ Console.WriteLine("Max Personality : " + limits.limits.AbsoluteLimits.maxPersonality);
+ Console.WriteLine("Max Image Metadata Elements : " + limits.limits.AbsoluteLimits.maxImageMeta);
+ Console.WriteLine("Max Personality Size : " + limits.limits.AbsoluteLimits.maxPersonalitySize);
+ Console.WriteLine("Max Security Group Rules : " + limits.limits.AbsoluteLimits.maxSecurityGroupRules);
+ Console.WriteLine("Max Security Groups : " + limits.limits.AbsoluteLimits.maxSecurityGroups);
+ Console.WriteLine("Max Total Instances : " + limits.limits.AbsoluteLimits.maxTotalInstances);
+ Console.WriteLine("Max Total RAM Size : " + limits.limits.AbsoluteLimits.maxTotalRAMSize);
+ Console.WriteLine("");
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetPasswordCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetPasswordCmdlet.cs
new file mode 100644
index 0000000..2c7a3c1
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Security/GetPasswordCmdlet.cs
@@ -0,0 +1,129 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess.Security;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain.Compute.Servers.Actions;
+using System;
+using Openstack.Objects.DataAccess.Compute;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.Get, "Password", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class GetPasswordCmdlet : BasePSCmdlet
+ {
+ private string _administratorPassword;
+ private string _serverId;
+ private string _keyName;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "GetPassword", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("k")]
+ [ValidateNotNullOrEmpty]
+ public string KeyName
+ {
+ get { return _keyName; }
+ set { _keyName = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "GetPassword", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private string GetServerId()
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+ if (serverContainer != null)
+ return serverContainer.Entity.Id;
+ }
+ else
+ {
+ return currentContainer.Entity.Id;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.ServerId == null)
+ this.ServerId = this.GetServerId();
+
+ IServerRepository repository = this.RepositoryFactory.CreateServerRepository();
+ GetServerLogAction action = new GetServerLogAction();
+ action.ServerId = this.ServerId;
+ Log log = repository.GetServerLog(action);
+
+ if (log != null && log.Content.Length > 14)
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Log detected!");
+ string pw = log.ExtractAdminPassword(this.Settings.KeyStoragePath + @"\OS\" + _keyName + ".pem");
+ Console.WriteLine("Administrator Password : " + pw);
+ Console.WriteLine("");
+
+ if (this.Settings.EnableCredentialTracking == true)
+ {
+ CredentialListManager manager = new CredentialListManager(this.Settings);
+ manager.SetPassword(this.ServerId, pw);
+ }
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Unfortunately we couldn't retrieve the Instance Log. If this situation persist, we recommend that you delete and recreate the instance.");
+ Console.WriteLine("");
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Security/NewKeyPairCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Security/NewKeyPairCmdlet.cs
new file mode 100644
index 0000000..d42d3d7
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Security/NewKeyPairCmdlet.cs
@@ -0,0 +1,145 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Security;
+using System;
+using System.IO;
+using System.Text;
+using System.Diagnostics;
+using System.Threading;
+using Openstack.Objects.Domain.Server;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Network
+{
+ [Cmdlet(VerbsCommon.New, "KeyPair", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class NewKeyPairCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _filename = null;
+ private SwitchParameter _copyToClipboard = false;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ //[Parameter(Position = 2, ParameterSetName = "NewKeypair", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "a")]
+ //[Alias("c")]
+ //public SwitchParameter CopyToClipboard
+ //{
+ // get { return _copyToClipboard; }
+ // set { _copyToClipboard = value; }
+ //}
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewKeypair", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "a")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void StoreKey(string privateKey)
+ {
+
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ExportKey(string privateKey, string filename)
+ {
+ // Save the key locally first..
+
+ StringBuilder builder = new StringBuilder();
+ builder.AppendLine(privateKey);
+
+ using (StreamWriter outfile = new StreamWriter(this.Settings.KeyStoragePath + @"\OS\" + filename, false))
+ {
+ outfile.Write(builder.ToString());
+ }
+
+ // Now export with PuttyGen
+
+ //Process.Start(this.Settings.PuttuGenPath, this.Settings.KeyStoragePath + @"\TempKey.key -O private -o " + this.Settings.KeyStoragePath + "testKey.ppk" + "-q");
+ //int y = 9;
+
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewKeyPair nkp = new NewKeyPair();
+ nkp.Name = this.Name;
+ KeyPair keypair = this.RepositoryFactory.CreateKeyPairRepository().SaveKeyPair(nkp);
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("New keypair created.");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine("");
+ Console.WriteLine("User Id : " + keypair.UserId);
+ Console.WriteLine("Name : " + keypair.Name);
+ Console.WriteLine("Private Key : ");
+ Console.WriteLine("");
+ Console.WriteLine(keypair.PrivateKey);
+ Console.WriteLine("");
+ Console.WriteLine("Public Key : ");
+ Console.WriteLine("");
+ Console.WriteLine(keypair.PublicKey);
+ Console.WriteLine("");
+ Console.WriteLine("Fingerprint : " + keypair.Fingerprint);
+ Console.WriteLine("");
+
+ this.ExportKey(keypair.PrivateKey, keypair.Name + ".pem");
+
+ if (_copyToClipboard)
+ {
+ OutClipboard.SetText(keypair.PrivateKey);
+ }
+
+ Console.WriteLine("Exporting Private Key.");
+ Console.WriteLine("Storing Key.");
+ Console.WriteLine("Key Generation and storage complete.");
+ Console.WriteLine("");
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Security/RemoveKeyPairCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Security/RemoveKeyPairCmdlet.cs
new file mode 100644
index 0000000..f32d508
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Security/RemoveKeyPairCmdlet.cs
@@ -0,0 +1,72 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using System;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Network
+{
+ [Cmdlet(VerbsCommon.Remove, "KeyPair", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveKeyPairCmdlet : BasePSCmdlet
+ {
+ private string _name;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RemoveKeyPair", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "a")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ try
+ {
+ this.RepositoryFactory.CreateKeyPairRepository().DeleteKeyPair(this.Name);
+ Console.WriteLine("");
+ Console.WriteLine("Keypair " + this.Name + " removed.");
+ Console.WriteLine("");
+ this.UpdateCache();
+ }
+ catch (InvalidOperationException)
+ {
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("Error : Keypair " + this.Name + " not found.");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Security/ResetPasswordCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Security/ResetPasswordCmdlet.cs
new file mode 100644
index 0000000..8cc25ab
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Security/ResetPasswordCmdlet.cs
@@ -0,0 +1,159 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess.Security;
+using System;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.Reset, "Password", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class ResetPasswordCmdlet : BasePSCmdlet
+ {
+ private string _administratorPassword;
+ private string _serverId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "ResetPassword", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "ResetPassword", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("p")]
+ [ValidateNotNullOrEmpty]
+ public string AdministratorPassword
+ {
+ get { return _administratorPassword; }
+ set { _administratorPassword = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ChangeWindowsImagePW()
+ {
+ CredentialListManager manager = new CredentialListManager(this.Settings);
+ if (this.Settings.EnableCredentialTracking == true)
+ {
+ manager.SetPassword(this.ServerId, this.AdministratorPassword);
+ Console.WriteLine("");
+ Console.WriteLine("Password Updated.");
+ Console.WriteLine("");
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("You're attempting to update the password for a Windows Image but EnableCredentialTracking is currently turned off. To turn this on please use the Get-config and Set-config cmdlets. Operation failed.");
+ Console.WriteLine("");
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ChangeNonWindowsImagePW()
+ {
+ ChangePasswordAction action = new ChangePasswordAction();
+ action.AdministratorPassword = this.AdministratorPassword;
+ action.ServerId = this.ServerId;
+
+ this.RepositoryFactory.CreateServerRepository().ChangePassword(action);
+ Console.WriteLine("");
+ Console.WriteLine("Password Changed.");
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private string GetServerId()
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+ if (serverContainer != null)
+ return serverContainer.Entity.Id;
+ }
+ else
+ {
+ return currentContainer.Entity.Id;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsWindowsImage(string imageId)
+ {
+ Image image = this.RepositoryFactory.CreateImageRepository().GetImage(imageId);
+ return image.IsWindowsImage;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.ServerId == null)
+ this.ServerId = this.GetServerId();
+
+ Openstack.Objects.Domain.Compute.Server server = this.RepositoryFactory.CreateServerRepository().GetServer(this.ServerId);
+
+ if (this.IsWindowsImage(server.Image.Id)) {
+ ChangeWindowsImagePW();
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Invalid Server : The Server you supplied is not a based on a Windows image. We currently only support key based authentication for non-Windows images.");
+ Console.WriteLine("");
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/ConnectServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/ConnectServerCmdlet.cs
new file mode 100644
index 0000000..423762c
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/ConnectServerCmdlet.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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.DataAccess.Compute;
+using Openstack.Objects.DataAccess.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain.Compute.Servers.Actions;
+using Openstack.Objects.Domain.Compute.Servers;
+using System;
+using System.IO;
+using System.Xml.Linq;
+using System.Xml.XPath;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet("Connect", "Server", SupportsShouldProcess = true)]
+ public class ConnectServerCmdletd : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _keypairName = null;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "ConnectServerPS", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("s")]
+ public string ServerId
+ {
+ get
+ {
+ if (_serverId != null)
+ return _serverId;
+ else
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+ ServerUIContainer serverContainer = currentContainer as ServerUIContainer;
+
+ if (serverContainer != null) {
+ return serverContainer.Entity.Id;
+ }
+ }
+ return null;
+
+ }
+ set { _serverId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsWindowsImage(string imageId)
+ {
+ Image image = this.RepositoryFactory.CreateImageRepository().GetImage(imageId);
+ return image.IsWindowsImage;
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private string GetAdminPassword(string keyname)
+ {
+ GetServerLogAction action = new GetServerLogAction();
+ action.ServerId = this.ServerId;
+ Log log = this.RepositoryFactory.CreateServerRepository().GetServerLog(action);
+
+ if (log != null)
+ {
+ Console.WriteLine("");
+ string pw = log.ExtractAdminPassword(this.Settings.KeyStoragePath + keyname + ".pem");
+ Console.WriteLine("Administrator Password : " + pw);
+ return pw;
+ }
+ else
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ShowCredentialsNotFoundMsg()
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Credentials not found. You'll have to manually enter your Administrator credentials for this instance.");
+ Console.WriteLine("If you want to continue to use Automatic Credential Tracking for this instance make sure that you update");
+ Console.WriteLine("our records with the new password. To do this, use the Reset-Password cmdlet.");
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void WriteSection(string headerText)
+ {
+ ConsoleColor oldColor = Console.ForegroundColor;
+ Console.WriteLine(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("==============================================================================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("==============================================================================================================================================");
+ Console.ForegroundColor = oldColor;
+ }
+//=========================================================================================
+///
+///
+///
+//===================================================================================K=====
+ private void ShowKeyBasedLoginInstructions(string keyname)
+ {
+ if (keyname == null) keyname = "YourKeyfile";
+
+ this.WriteSection("Unable to find a suitable Putty key file!");
+ Console.WriteLine("1. Make sure that you have downloaded the latest version of Putty and PuttyGen for Windows.");
+ Console.WriteLine("2. Tell us where Putty.exe exist by setting the Config file entry SSHClientPath (use Set-Config)");
+ Console.WriteLine("3. Tell PuttyGen to Load an existing key file. This file will be located at " + this.Settings.KeyStoragePath + @"\OS\" + keyname + ".pem");
+ Console.WriteLine("4. Convert the .pem file to the .ppk format that Putty.exe understands by clicking the Save Private Key button.");
+ Console.WriteLine("5. Save the .ppk file as " + keyname + ".ppk");
+ Console.WriteLine("6. Launch the SSH session with the Connect-Server cmdlet");
+ Console.WriteLine("7. HINT : If you use the same keypair name for each Server you create you can skip steps 1-5 after the steps have been completed once.");
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private bool LaunchPasswordBasedSSHSession(Openstack.Objects.Domain.Compute.Server server)
+ {
+ CredentialListManager manager = new CredentialListManager(this.Settings);
+ SSHClient sshClient = new SSHClient(this.Settings);
+ sshClient.Username = "ubuntu";
+ sshClient.Address = server.Addresses.Private[1].Addr;
+ sshClient.Password = manager.GetPassword(server.Id);
+
+ if (sshClient.Password == null) {
+ return false;
+ }
+ else {
+ sshClient.LaunchClient();
+ return true;
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private bool IsSSHClientConfigured()
+ {
+ if (this.Settings.SSHClientPath == string.Empty)
+ return false;
+ else
+ return File.Exists(this.Settings.SSHClientPath);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private bool DoesPPKExist(string keyName)
+ {
+ return File.Exists(this.Settings.KeyStoragePath + @"\OS\" + keyName + ".ppk");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void SaveSSHClientLocation(string path)
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement clientPathNode = doc.XPathSelectElement("//add[@key='SSHClientPath']");
+
+ clientPathNode.SetAttributeValue("value", path);
+ doc.Save(configFilePath);
+ this.Settings.SSHClientPath = path;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ConfigureSSHClient()
+ {
+ Console.WriteLine("");
+ Console.WriteLine("You're trying to establish a remote session with a non-Windows based server. This requires a fully qualified path to the SSH client (putty.exe)");
+ Console.Write("SSH Client Path : ");
+ string path = Console.ReadLine();
+
+ if (File.Exists(path))
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Putty.exe found! Saving location for future sessions..");
+ Console.WriteLine("");
+ this.SaveSSHClientLocation(path);
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Putty.exe not found! Invalid path supplied.");
+ Console.WriteLine("");
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void LaunchSSHSession(Openstack.Objects.Domain.Compute.Server server)
+ {
+ if (!IsSSHClientConfigured()) {
+ this.ConfigureSSHClient();
+ }
+
+ if (server.KeyName != null && this.DoesPPKExist(server.KeyName))
+ {
+ SSHClient sshClient = new SSHClient(this.Settings);
+ sshClient.Username = "ubuntu";
+ sshClient.KeypairName = server.KeyName;
+ sshClient.Address = server.Addresses.Private[1].Addr;
+
+ sshClient.LaunchClient();
+ }
+ else
+ {
+ this.ShowKeyBasedLoginInstructions(server.KeyName);
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void LaunchWindowsSession(Openstack.Objects.Domain.Compute.Server server)
+ {
+ CredentialListManager manager = new CredentialListManager(this.Settings);
+ RDPClient client = new RDPClient();
+ client.Address = server.Addresses.Private[1].Addr;
+ client.Username = "Administrator";
+
+ if (this.Settings.EnableCredentialTracking == true)
+ {
+ client.Password = manager.GetPassword(server.Id);
+ if (client.Password == null)
+ {
+ this.ShowCredentialsNotFoundMsg();
+ return;
+ }
+ }
+ client.LaunchClient();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.ServerId);
+ if (id != null)
+ {
+ Openstack.Objects.Domain.Compute.Server server = this.RepositoryFactory.CreateServerRepository().GetServer(id);
+ if (server != null)
+ {
+ if (IsWindowsImage(server.Image.Id))
+ {
+ this.LaunchWindowsSession(server);
+ }
+ else
+ {
+ this.LaunchSSHSession(server);
+ }
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Server not found.");
+ Console.WriteLine("");
+ }
+ }
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewImageCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewImageCmdlet.cs
new file mode 100644
index 0000000..b86378e
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewImageCmdlet.cs
@@ -0,0 +1,176 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.New, "Image", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class NewImageCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string[] _metadata;
+ private string _serverId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "NewImage", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewImage", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "NewImage", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("md")]
+ [ValidateNotNullOrEmpty]
+ public string[] MetaData
+ {
+ get { return _metadata; }
+ set { _metadata = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public MetaData AddEntries(string[] keyValuePairs)
+ {
+ MetaData metadata = new MetaData();
+
+ if (keyValuePairs != null && keyValuePairs.Count() > 0)
+ {
+ foreach (string kv in keyValuePairs)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ MetaDataElement element = new MetaDataElement();
+ element.Key = temp[0];
+ element.Value = temp[1];
+
+ metadata.Add(temp[0], temp[1]);
+ }
+ return metadata;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public MetaData ReformatMetadata(string[] keyValuePairs)
+ {
+ MetaData metadata = new MetaData();
+
+ if (keyValuePairs != null && keyValuePairs.Count() > 0)
+ {
+ foreach (string kv in keyValuePairs)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ MetaDataElement element = new MetaDataElement();
+ element.Key = temp[0];
+ element.Value = temp[1];
+
+ metadata.Add(temp[0], temp[1]);
+ }
+ return metadata;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ MetaData md = null;
+ md = this.ReformatMetadata(this.MetaData);
+ NewImage image = new NewImage();
+ image.MetaData = md;
+ image.Name = this.Name;
+
+ if (this.ServerId != null)
+ {
+ image.ServerId = this.ServerId;
+ this.RepositoryFactory.CreateImageRepository().SaveImage(image);
+ this.UpdateCache();
+ }
+ else
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+
+ if (serverContainer != null)
+ {
+ image.ServerId = serverContainer.Entity.Id;
+ this.RepositoryFactory.CreateImageRepository().SaveImage(image);
+ this.UpdateCache();
+ }
+ }
+ else {
+
+ image.ServerId = currentContainer.Entity.Id;
+ this.RepositoryFactory.CreateImageRepository().SaveImage(image);
+ this.UpdateCache();
+ }
+ }
+ }
+ #endregion
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewServerCmdlet.cs
new file mode 100644
index 0000000..e4402ed
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/NewServerCmdlet.cs
@@ -0,0 +1,323 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Security;
+using System.Collections.Generic;
+using System;
+using Openstack.Objects.DataAccess.Compute;
+using System.Threading;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.New, "Server", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class NewServerCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _imageId;
+ private string _flavorId;
+ private string _password;
+ private string _accessIPv4;
+ private string _accessIPv6;
+ private string _keyName;
+ private string[] _metadata;
+ private string[] _securityGroups;
+ private bool _useWizard = false;
+ private string[] _networksIds;
+ private string _availabilityZone;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewServerPS", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewServerPS", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A valid reference to an Image.")]
+ [Alias("i")]
+ [ValidateNotNullOrEmpty]
+ public string ImageRef
+ {
+ get { return _imageId; }
+ set { _imageId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewServerPS", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A reference to a valid Flavor.Image")]
+ [Alias("f")]
+ [ValidateNotNullOrEmpty]
+ public string FlavorRef
+ {
+ get { return _flavorId; }
+ set { _flavorId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, ParameterSetName = "NewServerPS", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "ipv4 address for remote access.")]
+ [Alias("ip4")]
+ public string AccessIPv4
+ {
+ get { return _accessIPv4; }
+ set { _accessIPv4 = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 4, ParameterSetName = "NewServerPS", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "ipv6 address for remote access.")]
+ [Alias("ip6")]
+ public string AccessIPv6
+ {
+ get { return _accessIPv6; }
+ set { _accessIPv6 = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 5, Mandatory = false, ParameterSetName = "NewServerPS", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("md")]
+ [ValidateNotNullOrEmpty]
+ public string[] MetaData
+ {
+ get { return _metadata; }
+ set { _metadata = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 6, ParameterSetName = "NewServerPS", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("k")]
+ [ValidateNotNullOrEmpty]
+ public string KeyName
+ {
+ get { return _keyName; }
+ set { _keyName = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 7, Mandatory = false, ParameterSetName = "NewServerPS", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("sg")]
+ [ValidateNotNullOrEmpty]
+ public string[] SecurityGroups
+ {
+ get { return _securityGroups; }
+ set { _securityGroups = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 8, Mandatory = true, ParameterSetName = "NewServerPS", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("nid")]
+ [ValidateNotNullOrEmpty]
+ public string[] NetworksIds
+ {
+ get { return _networksIds; }
+ set { _networksIds = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 9, ParameterSetName = "NewServerPS", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("az")]
+ public string AvailabilityZone
+ {
+ get { return _availabilityZone; }
+ set { _availabilityZone = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public MetaData AddEntries(string[] keyValuePairs)
+ {
+ MetaData metadata = new MetaData();
+
+ if (keyValuePairs != null && keyValuePairs.Count() > 0)
+ {
+ foreach (string kv in keyValuePairs)
+ {
+ char[] seperator = { '|' };
+ string[] temp = kv.Split(seperator);
+ MetaDataElement element = new MetaDataElement();
+ element.Key = temp[0];
+ element.Value = temp[1];
+
+ metadata.Add(temp[0], temp[1]);
+ }
+ return metadata;
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private List GetSecurityGroups()
+ {
+ List assignments = new List();
+
+ if (_securityGroups != null)
+ {
+ foreach (string sg in _securityGroups)
+ {
+ assignments.Add(new SecurityGroupAssignment(sg));
+ }
+ }
+
+ return assignments;
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsWindowsImage(string imageId)
+ {
+ Image image = this.RepositoryFactory.CreateImageRepository().GetImage(imageId);
+ return image.IsWindowsImage;
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private List GetNetworkIDs()
+ {
+ if (this.NetworksIds != null)
+ {
+ List ids = new List();
+ foreach (string id in this.NetworksIds)
+ {
+ NetworkId uuid = new NetworkId(id);
+ ids.Add(uuid);
+ }
+ return ids;
+ }
+ else
+ {
+ return null;
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void SaveServer()
+ {
+ NewServer server = new NewServer();
+ server.Name = this.Name;
+ server.ImageRef = this.ImageRef;
+ server.FlavorRef = this.FlavorRef;
+ server.AccessIPv6 = this.AccessIPv6;
+ server.AccessIPv4 = this.AccessIPv4;
+ server.MetaData = this.AddEntries(this.MetaData);
+ server.KeyName = this.KeyName;
+ server.SecurityGroups = this.GetSecurityGroups();
+ server.Networks = this.GetNetworkIDs();
+ server.AvailabilityZone = this.AvailabilityZone;
+
+ if (IsWindowsImage(this.ImageRef))
+ {
+ WindowsInstanceBuilder builder = new WindowsInstanceBuilder(this.RepositoryFactory, this.Settings);
+ builder.Changed += new Openstack.Objects.DataAccess.Compute.WindowsInstanceBuilder.CreateInstanceEventHandler(BuilderEvent);
+ builder.CreateInstance(server);
+ builder.Changed -= new Openstack.Objects.DataAccess.Compute.WindowsInstanceBuilder.CreateInstanceEventHandler(BuilderEvent);
+ this.UpdateCache();
+ }
+ else
+ {
+ NonWindowsInstanceBuilder nonWIBuilder = new NonWindowsInstanceBuilder(this.RepositoryFactory, this.Settings);
+ nonWIBuilder.Changed += new Openstack.Objects.DataAccess.Compute.NonWindowsInstanceBuilder.CreateInstanceEventHandler(BuilderEvent);
+ nonWIBuilder.CreateInstance(server, _keyName);
+ nonWIBuilder.Changed -= new Openstack.Objects.DataAccess.Compute.NonWindowsInstanceBuilder.CreateInstanceEventHandler(BuilderEvent);
+ this.UpdateCache();
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void BuilderEvent(object sender, CreateInstanceEventArgs e)
+ {
+ Console.WriteLine(e.Message);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private NewServer ShowNewServerWizard()
+ {
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.SaveServer();
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/PingServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/PingServerCmdlet.cs
new file mode 100644
index 0000000..279c773
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/PingServerCmdlet.cs
@@ -0,0 +1,180 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using System;
+using System.Threading;
+using System.Net.NetworkInformation;
+using System.Text;
+using System.Collections.Generic;
+using Openstack.Objects.Domain.Networking;
+using Openstack.Objects.Domain.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet("Ping", "Server", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class PingServerCmdletd : BasePSCmdlet
+ {
+ private string _serverId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "PingwServerPS", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("s")]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void PingServer(string address)
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Pinging Server : " + address);
+ AutoResetEvent waiter = new AutoResetEvent(false);
+
+ Ping pingSender = new Ping();
+
+ // When the PingCompleted event is raised,
+ // the PingCompletedCallback method is called.
+ pingSender.PingCompleted += new PingCompletedEventHandler(PingCompletedCallback);
+
+ // Create a buffer of 32 bytes of data to be transmitted.
+ string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
+ byte[] buffer = Encoding.ASCII.GetBytes(data);
+
+ // Wait 12 seconds for a reply.
+ int timeout = 12000;
+
+ // Set options for transmission:
+ // The data can go through 64 gateways or routers
+ // before it is destroyed, and the data packet
+ // cannot be fragmented.
+ PingOptions options = new PingOptions(64, true);
+
+ Console.WriteLine("Time to live : {0}", options.Ttl);
+ Console.WriteLine("Don't fragment : {0}", options.DontFragment);
+
+ // Send the ping asynchronously.
+ // Use the waiter as the user token.
+ // When the callback completes, it can wake up this thread.
+ pingSender.SendAsync(address, timeout, buffer, options, waiter);
+
+ // Prevent this example application from ending.
+ // A real application should do something useful
+ // when possible.
+ waiter.WaitOne();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private IList GetServerIPAddresses(string serverId)
+ {
+ Openstack.Objects.Domain.Compute.Server server = this.RepositoryFactory.CreateServerRepository().GetServer(serverId);
+ return server.Addresses.Private;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ IList addresses = this.GetServerIPAddresses(this.ServerId);
+ Console.WriteLine("");
+ Console.WriteLine(addresses.Count + " assigned IP addresses found. Ping results are as follows.");
+ Console.WriteLine("");
+
+ foreach (IPAddress address in addresses)
+ {
+ this.PingServer(address.Addr);
+ Console.WriteLine("");
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private static void PingCompletedCallback(object sender, PingCompletedEventArgs e)
+ {
+ // If the operation was canceled, display a message to the user.
+ if (e.Cancelled)
+ {
+ Console.WriteLine("Ping canceled.");
+
+ // Let the main thread resume.
+ // UserToken is the AutoResetEvent object that the main thread
+ // is waiting for.
+ ((AutoResetEvent)e.UserState).Set();
+ }
+
+ // If an error occurred, display the exception to the user.
+ if (e.Error != null)
+ {
+ Console.WriteLine("Ping failed:");
+ Console.WriteLine(e.Error.ToString());
+
+ // Let the main thread resume.
+ ((AutoResetEvent)e.UserState).Set();
+ }
+
+ PingReply reply = e.Reply;
+
+ DisplayReply(reply);
+
+ // Let the main thread resume.
+ ((AutoResetEvent)e.UserState).Set();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ public static void DisplayReply(PingReply reply)
+ {
+ if (reply == null)
+ return;
+
+ Console.WriteLine("ping status : {0}", reply.Status);
+ if (reply.Status == IPStatus.Success)
+ {
+ Console.WriteLine("Address : {0}", reply.Address.ToString());
+ Console.WriteLine("RoundTrip time : {0}", reply.RoundtripTime);
+ Console.WriteLine("Time to live : {0}", reply.Options.Ttl);
+ Console.WriteLine("Don't fragment : {0}", reply.Options.DontFragment);
+ Console.WriteLine("Buffer size : {0}", reply.Buffer.Length);
+ }
+ }
+
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/RebootServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RebootServerCmdlet.cs
new file mode 100644
index 0000000..ab9e9a3
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RebootServerCmdlet.cs
@@ -0,0 +1,112 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects;
+using Openstack.Client.Powershell.Providers.Compute;
+using System;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet("Reboot", "Server", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RebootServerCmdlet : BasePSCmdlet
+ {
+ private ServerRebootType _type = ServerRebootType.SOFT;
+ private string _serverId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RebootServer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "RebootServer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [Alias("t")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet("SOFT", "HARD")]
+ public ServerRebootType Type
+ {
+ get { return _type; }
+ set { _type = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.ServerId);
+
+ RebootAction action = new RebootAction();
+ action.RebootType = this.Type;
+
+ if (this.ServerId != null)
+ {
+ action.ServerId = id;
+ Console.WriteLine("");
+ Console.WriteLine("Rebooting Server " + id);
+ Console.WriteLine("");
+ this.RepositoryFactory.CreateServerRepository().Reboot(action);
+ }
+ else
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+
+ if (serverContainer != null)
+ {
+ action.ServerId = serverContainer.Entity.Id;
+ this.RepositoryFactory.CreateServerRepository().Reboot(action);
+ }
+ }
+ else
+ {
+ ServerUIContainer serverContainer = currentContainer as ServerUIContainer;
+ if (serverContainer != null)
+ {
+ action.ServerId = serverContainer.Entity.Id;
+ this.RepositoryFactory.CreateServerRepository().Reboot(action);
+ this.UpdateCache();
+ }
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveMetadataCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveMetadataCmdlet.cs
new file mode 100644
index 0000000..ac75c80
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveMetadataCmdlet.cs
@@ -0,0 +1,117 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Collections;
+using System.Collections.Generic;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.Remove, "Metadata", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveMetadataCmdletd : BasePSCmdlet
+ {
+ private string _key;
+ private string _serverId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "RemoveMetadata", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, Mandatory = true, ParameterSetName = "RemoveMetadata", ValueFromPipelineByPropertyName = true, HelpMessage = "sdfgh")]
+ [Alias("k")]
+ [ValidateNotNullOrEmpty]
+ public string Key
+ {
+ get { return _key; }
+ set { _key = value; }
+ }
+ #endregion
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void RemoveElement(string key)
+ {
+ IList elements = ((CommonDriveInfo)this.Drive).CurrentContainer.Entities;
+ MetaDataElement mdElement = null;
+
+ foreach (MetaDataElement element in elements)
+ {
+ if (element.Key == this.Key)
+ {
+ mdElement = element;
+ }
+ }
+
+ elements.Remove(mdElement);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (this.ServerId != null)
+ {
+ this.RepositoryFactory.CreateServerRepository().DeleteMetadata(this.ServerId, this.Key);
+ this.RemoveElement(this.Key);
+ }
+ else
+ {
+ BaseUIContainer currentContainer = this.SessionState.PSVariable.Get("CurrentContainer").Value as BaseUIContainer;
+
+ if (currentContainer.Name == "Metadata")
+ {
+ ServerUIContainer serverContainer = currentContainer.Parent as ServerUIContainer;
+
+ if (serverContainer != null) {
+ this.RepositoryFactory.CreateServerRepository().DeleteMetadata(serverContainer.Entity.Id, this.Key);
+ this.RemoveElement(this.Key);
+ }
+ }
+ else {
+ this.RepositoryFactory.CreateServerRepository().DeleteMetadata(currentContainer.Entity.Id, this.Key);
+ this.RemoveElement(this.Key);
+ }
+ }
+ }
+ }
+
+ }
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveServerCmdlet.cs
new file mode 100644
index 0000000..de8a15a
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/RemoveServerCmdlet.cs
@@ -0,0 +1,120 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using System.Collections;
+using System.Threading;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Management.Automation.Host;
+using System;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet(VerbsCommon.Remove, "Server", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveServerCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private SwitchParameter _force = false;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "RemoveServer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RemoveServer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllServers()
+ {
+ List servers = this.RepositoryFactory.CreateServerRepository().GetServers();
+ Console.WriteLine("");
+
+ foreach(Openstack.Objects.Domain.Compute.Server server in servers)
+ {
+ if (server.Name != "RGWinLarge")
+ {
+ Console.WriteLine("Removing Server : " + server.Name);
+ this.RepositoryFactory.CreateServerRepository().DeleteServer(server.Id);
+ }
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.ServerId);
+
+ if (_force)
+ {
+ Collection choices = new Collection();
+ choices.Add(new ChoiceDescription("Y", "Yes"));
+ choices.Add(new ChoiceDescription("N", "No"));
+
+ Console.WriteLine("");
+ if (this.Host.UI.PromptForChoice("Confirm Action", "You are about to remove all active Server instances. Are you sure about this?", choices, 0) == 0)
+ this.RemoveAllServers();
+ }
+ else
+ {
+ if (this.ServerId != null)
+ {
+ this.RepositoryFactory.CreateServerRepository().DeleteServer(id);
+ this.UpdateCache();
+ }
+ }
+
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Compute/Server/UpdateServerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Compute/Server/UpdateServerCmdlet.cs
new file mode 100644
index 0000000..df17efa
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Compute/Server/UpdateServerCmdlet.cs
@@ -0,0 +1,96 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Server
+{
+ [Cmdlet("Update", "Server", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class UpdateServerCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _name;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdateServer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdateServer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void UpdateName(string name)
+ {
+ BaseUIContainer server = ((CommonDriveInfo)this.Drive).CurrentContainer;
+ server.Name = name;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ Openstack.Objects.Domain.Compute.Server server = new Openstack.Objects.Domain.Compute.Server();
+ if (this.ServerId != null)
+ {
+ server.Id = this.ServerId;
+ server.Name = this.Name;
+
+ this.RepositoryFactory.CreateServerRepository().UpdateServer(server);
+ this.UpdateName(this.Name);
+ this.UpdateCache();
+ }
+ }
+ #endregion
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/AssignIPCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/AssignIPCmdlet.cs
new file mode 100644
index 0000000..9c5e347
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/AssignIPCmdlet.cs
@@ -0,0 +1,93 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+using System;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Assign", "IP", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class AssignIPCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _ip;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("ip")]
+ [ValidateNotNullOrEmpty]
+ public string IpAddress
+ {
+ get { return _ip; }
+ set { _ip = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (!this.ServerId.Contains("."))
+ {
+ IFloatingIPRepository repository = new FloatingIPRepository(this.Context.GetRepositoryContext("compute"));
+
+ AssignIPAction assignment = new AssignIPAction();
+ assignment.ServerId = this.ServerId;
+ assignment.Ip = this.IpAddress;
+
+ repository.AssignIP(assignment);
+
+ Console.WriteLine("");
+ Console.WriteLine("Floating IP Address " + this.IpAddress + " now assigned to Server : " + assignment.ServerId);
+ Console.WriteLine("");
+ this.UpdateCache();
+ }
+ else
+ {
+ InvalidOperationException ex = new InvalidOperationException("Please check the supplied parameters. IP addresses are not allowed in place of Server IDs.", null);
+ WriteError(new ErrorRecord(ex, "0", ErrorCategory.InvalidArgument, null));
+ }
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeleteFloatingIPCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteFloatingIPCmdlet.cs
new file mode 100644
index 0000000..6b0354d
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteFloatingIPCmdlet.cs
@@ -0,0 +1,107 @@
+/* ============================================================================
+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.Collections.ObjectModel;
+using System.Linq;
+using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "FloatingIP", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class DeleteFloatingIPCmdlet : BasePSCmdlet
+ {
+ private string _floatingIPId;
+ private SwitchParameter _force = false;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeleteFloatingIP", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeleteFloatingIP2", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("id")]
+ public string FloatingIP
+ {
+ get { return _floatingIPId; }
+ set { _floatingIPId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllFloatingIPs()
+ {
+ IFloatingIPRepository repository = this.RepositoryFactory.CreateFloatingIPRepository();
+ Console.WriteLine("");
+
+ foreach (BaseEntity entity in this.CurrentContainer.Entities)
+ {
+ if (entity.Name != null)
+ Console.WriteLine("Removing Floating IP : " + entity.Name);
+ else
+ Console.WriteLine("Removing Floating IP : " + entity.Id);
+
+ repository.DeleteFloatingIP(entity.Id);
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (_force)
+ {
+ if (this.UserConfirmsDeleteAction("Floating IP Addresses"))
+ {
+ this.RemoveAllFloatingIPs();
+ this.UpdateCache();
+ }
+ }
+ else
+ {
+ string id = this.TranslateQuickPickNumber(this.FloatingIP);
+ this.RepositoryFactory.CreateFloatingIPRepository().DeleteFloatingIP(id);
+ this.UpdateCache();
+ }
+ }
+
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeleteNetworkCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteNetworkCmdlet.cs
new file mode 100644
index 0000000..13d827f
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteNetworkCmdlet.cs
@@ -0,0 +1,143 @@
+/* ============================================================================
+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.Collections.ObjectModel;
+using System.Linq;
+using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "Network", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.)]
+ public class DeleteNetworkCmdlet : BasePSCmdlet
+ {
+ private string _networkId;
+ private SwitchParameter _removeAll = false;
+ private SwitchParameter _force = true;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeleteNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("id")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeleteNetwork2", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _removeAll; }
+ set { _removeAll = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "DeleteNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("f")]
+ public SwitchParameter Force
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void BuilderEvent(object sender, CreateNetworkEventArgs e)
+ {
+ Console.WriteLine(e.Message);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllNetworks()
+ {
+ INetworkRepository repository = this.RepositoryFactory.CreateNetworkRepository();
+ List networks = repository.GetNetworks();
+
+ repository.Changed += new Openstack.Objects.DataAccess.Networking.NetworkRepository.CreateNetworkEventHandler(BuilderEvent);
+ foreach (BaseEntity entity in this.CurrentContainer.Entities)
+ {
+ if (entity.Name != "Ext-Net")
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Removing Network : " + entity.Name);
+ Console.WriteLine("");
+ repository.DeleteNetwork(entity.Id, _force);
+ }
+ }
+ Console.WriteLine("");
+ repository.Changed -= new Openstack.Objects.DataAccess.Networking.NetworkRepository.CreateNetworkEventHandler(BuilderEvent);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+
+ if (_networkId == null && _removeAll == false)
+ {
+ Console.WriteLine("Error : ");
+ }
+ else
+ {
+ if (_removeAll)
+ {
+ if (this.UserConfirmsDeleteAction("Networks"))
+ {
+ this.RemoveAllNetworks();
+ this.UpdateCache();
+ }
+ }
+ else
+ {
+ string id = this.TranslateQuickPickNumber(this.NetworkId);
+ this.RepositoryFactory.CreateNetworkRepository().DeleteNetwork(id, _force);
+ this.UpdateCache();
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeletePortCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeletePortCmdlet.cs
new file mode 100644
index 0000000..cfebca4
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeletePortCmdlet.cs
@@ -0,0 +1,107 @@
+/* ============================================================================
+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.Collections.ObjectModel;
+using System.Linq;
+using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "Port", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class DeletePortCmdlet : BasePSCmdlet
+ {
+ private string _floatingIPId;
+ private SwitchParameter _force = false;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeletePort", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("id")]
+ public string PortId
+ {
+ get { return _floatingIPId; }
+ set { _floatingIPId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeletePort2", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllPorts()
+ {
+ IPortRepository repository = this.RepositoryFactory.CreatePortRepository();
+ Console.WriteLine("");
+
+ foreach (BaseEntity entity in this.CurrentContainer.Entities)
+ {
+ if (entity.Name != null)
+ Console.WriteLine("Removing Port : " + entity.Name);
+ else
+ Console.WriteLine("Removing Port : " + entity.Id);
+
+ repository.DeletePort(entity.Id);
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.PortId);
+
+ if (_force)
+ {
+ if (this.UserConfirmsDeleteAction("Ports"))
+ {
+ this.RemoveAllPorts();
+ this.UpdateCache();
+ }
+ }
+ else
+ {
+ this.RepositoryFactory.CreatePortRepository().DeletePort(id);
+ this.UpdateCache();
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterCmdlet.cs
new file mode 100644
index 0000000..474566a
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterCmdlet.cs
@@ -0,0 +1,106 @@
+/* ============================================================================
+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.Collections.ObjectModel;
+using System.Linq;
+using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "Router", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class DeleteRouterCmdlet : BasePSCmdlet
+ {
+ private string _routerId;
+ private SwitchParameter _force = false;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeleteRouter", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("rid")]
+ public string RouterId
+ {
+ get { return _routerId; }
+ set { _routerId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeleteRouter2", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllRouters()
+ {
+ IRouterRepository repository = this.RepositoryFactory.CreateRouterRepository();
+ Console.WriteLine("");
+
+ foreach (BaseEntity entity in this.CurrentContainer.Entities)
+ {
+ if (entity.Name != null)
+ Console.WriteLine("Removing Router : " + entity.Name);
+ else
+ Console.WriteLine("Removing Router : " + entity.Id);
+
+ repository.DeleteRouter(entity.Id);
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.RouterId);
+
+ if (_force)
+ {
+ if (this.UserConfirmsDeleteAction("Routers"))
+ {
+ this.RemoveAllRouters();
+ this.UpdateCache();
+ }
+ }
+ else
+ {
+ this.RepositoryFactory.CreateRouterRepository().DeleteRouter(id);
+ this.UpdateCache();
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterInterfaceCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterInterfaceCmdlet.cs
new file mode 100644
index 0000000..9877c6d
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteRouterInterfaceCmdlet.cs
@@ -0,0 +1,69 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "RouterInterface", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class DeleteRouterInterfaceCmdlet : BasePSCmdlet
+ {
+ private string _routerId;
+ private string _subnetId;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeleteRouterInterface", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("id")]
+ public string RouterId
+ {
+ get { return _routerId; }
+ set { _routerId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeleteRouterInterface", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("sid")]
+ public string SubnetId
+ {
+ get { return _subnetId; }
+ set { _subnetId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.RepositoryFactory.CreateRouterRepository().DeleteInterfaceByRouter(this.RouterId, this.SubnetId);
+ this.UpdateCache();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/DeleteSubnetCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteSubnetCmdlet.cs
new file mode 100644
index 0000000..1396a6c
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/DeleteSubnetCmdlet.cs
@@ -0,0 +1,104 @@
+/* ============================================================================
+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.Collections.ObjectModel;
+using System.Linq;
+using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.Remove, "Subnet", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class DeleteSubnetCmdlet : BasePSCmdlet
+ {
+ private string _subnetId;
+ private SwitchParameter _force = false;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "DeleteSubnet", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("id")]
+ public string SubnetId
+ {
+ get { return _subnetId; }
+ set { _subnetId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "DeleteSubnet2", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("all")]
+ public SwitchParameter RemoveAll
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void RemoveAllSubnets()
+ {
+ ISubnetRepository repository = this.RepositoryFactory.CreateSubnetRepository();
+ Console.WriteLine("");
+
+ foreach (BaseEntity entity in this.CurrentContainer.Entities)
+ {
+ if (entity.Name != null)
+ Console.WriteLine("Removing Subnet : " + entity.Name);
+ else
+ Console.WriteLine("Removing Subnet : " + entity.Id);
+
+ repository.DeleteSubnet(entity.Id);
+ }
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.SubnetId);
+
+ if (_force && this.UserConfirmsDeleteAction("Subnets"))
+ {
+ this.RemoveAllSubnets();
+ this.UpdateCache();
+ }
+ else
+ {
+ this.RepositoryFactory.CreateSubnetRepository().DeleteSubnet(id);
+ this.UpdateCache();
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewFloatingIPCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewFloatingIPCmdlet.cs
new file mode 100644
index 0000000..462cc4a
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewFloatingIPCmdlet.cs
@@ -0,0 +1,71 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet(VerbsCommon.New, "FloatingIP", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class NewFloatingIPCmdlet : BasePSCmdlet
+ {
+ private string _networkId;
+ private string _portId;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewFloatingIP", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("pid")]
+ public string PortId
+ {
+ get { return _portId; }
+ set { _portId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewFloatingIP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Server.")]
+ [Alias("nid")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewFloatingIP newFloatingIP = new NewFloatingIP();
+ newFloatingIP.FloatingNetworkId = this.NetworkId;
+ newFloatingIP.PortId = this.PortId;
+
+ this.RepositoryFactory.CreateFloatingIPRepository().SaveFloatingIP(newFloatingIP);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewNetworkCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewNetworkCmdlet.cs
new file mode 100644
index 0000000..da11296
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewNetworkCmdlet.cs
@@ -0,0 +1,127 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("New", "Network", SupportsShouldProcess = true)]
+ public class NewNetworkCmdlet : BasePSCmdlet
+ {
+ private bool _adminStateUp = true;
+ private bool _force = true;
+ private string _name;
+ private string _cidr = "11.0.3.0/24";
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, ParameterSetName = "NewNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("cidr")]
+ public string CidrValue
+ {
+ get { return _cidr; }
+ set { _cidr = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("asu")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter AdminStateUp
+ {
+ get { return _adminStateUp; }
+ set { _adminStateUp = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewNetwork", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("f")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter Force
+ {
+ get { return _force; }
+ set { _force = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void BuilderEvent(object sender, CreateNetworkEventArgs e)
+ {
+ Console.WriteLine("- " + e.Message);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ Console.WriteLine("");
+ NewNetwork newNetwork = new NewNetwork();
+ newNetwork.AdminStateUp = _adminStateUp;
+ newNetwork.Name = _name;
+
+ if (this.CidrValue == null) {
+ newNetwork.Cidr = "11.0.3.0/24";
+ }
+ else{
+ newNetwork.Cidr = this.CidrValue;
+ }
+
+ INetworkRepository repository = this.RepositoryFactory.CreateNetworkRepository();
+ repository.Changed += new Openstack.Objects.DataAccess.Networking.NetworkRepository.CreateNetworkEventHandler(BuilderEvent);
+ repository.SaveNetwork(newNetwork, this.Force);
+ repository.Changed -= new Openstack.Objects.DataAccess.Networking.NetworkRepository.CreateNetworkEventHandler(BuilderEvent);
+ Console.WriteLine(" Network Build Complete!");
+ Console.WriteLine("");
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewPortCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewPortCmdlet.cs
new file mode 100644
index 0000000..064cf47
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewPortCmdlet.cs
@@ -0,0 +1,104 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("New", "Port", SupportsShouldProcess = true)]
+ public class NewPortCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private SwitchParameter _admin_state_up = true;
+ private string _networkId;
+ private string _deviceId;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewPort", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewPort", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("nid")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, ParameterSetName = "NewPort", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("asu")]
+
+ public SwitchParameter AdminStateUp
+ {
+ get { return _admin_state_up; }
+ set { _admin_state_up = value; }
+ }
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewPort", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("did")]
+ public string DeviceId
+ {
+ get { return _deviceId; }
+ set { _deviceId = value; }
+ }
+ #endregion
+ #region Methods
+//============================================================================
+///
+///
+///
+//============================================================================
+ protected override void ProcessRecord()
+ {
+ NewPort newPort = new NewPort();
+ newPort.AdminStateUp = this.AdminStateUp;
+ newPort.DeviceId = this.DeviceId;
+ newPort.Name = this.Name;
+ newPort.NetworkId = this.NetworkId;
+
+ this.RepositoryFactory.CreatePortRepository().SavePort(newPort);
+
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterCmdlet.cs
new file mode 100644
index 0000000..cec4dc5
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterCmdlet.cs
@@ -0,0 +1,93 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("New", "Router", SupportsShouldProcess = true)]
+ public class NewRouterCmdlet : BasePSCmdlet
+ {
+ private bool _adminStateUp = true;
+ private string _name;
+ private string _extGatewayNetworkId;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewRouter", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("egw")]
+ public string ExternalGateway
+ {
+ get { return _extGatewayNetworkId; }
+ set { _extGatewayNetworkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewRouter", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewRouter", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("asu")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter AdminStateUp
+ {
+ get { return _adminStateUp; }
+ set { _adminStateUp = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewRouter newRouter = new NewRouter();
+ newRouter.Name = this.Name;
+ newRouter.AdminStateUp = this.AdminStateUp;
+
+ if (this.ExternalGateway != null) {
+ newRouter.ExternalGateway.NetworkId = this.ExternalGateway;
+ }
+
+ this.RepositoryFactory.CreateRouterRepository().SaveRouter(newRouter);
+ }
+ #endregion
+
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterInterfaceCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterInterfaceCmdlet.cs
new file mode 100644
index 0000000..844499a
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewRouterInterfaceCmdlet.cs
@@ -0,0 +1,101 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("New", "RouterInterface", SupportsShouldProcess = true)]
+ public class NewRouterInterfaceCmdlet : BasePSCmdlet
+ {
+ private string _subnetId;
+ private string _portId;
+ private string _routerId;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewRouterInterface", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("rid")]
+ public string RouterId
+ {
+ get { return _routerId; }
+ set { _routerId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewRouterInterface", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("sid")]
+ public string SubnetId
+ {
+ get { return _subnetId; }
+ set { _subnetId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewRouterInterface", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("pid")]
+ public string PortId
+ {
+ get { return _portId; }
+ set { _portId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewRouterInterface newRouterInterface = new NewRouterInterface();
+ newRouterInterface.PortId = this.PortId;
+ newRouterInterface.SubnetId = this._subnetId;
+ newRouterInterface.RouterId = this.RouterId;
+
+ NewRouterInterface response = this.RepositoryFactory.CreateRouterRepository().SaveRouterInterface(newRouterInterface);
+ if (response.SubnetId != null)
+ {
+ Console.WriteLine("");
+ Console.WriteLine("New Router Interface created for Subnet Id " + response.SubnetId);
+ Console.WriteLine("");
+ }
+ else if (response.PortId != null)
+ {
+ Console.WriteLine("");
+ Console.WriteLine("New Router Interface created for Port Id " + response.PortId);
+ Console.WriteLine("");
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/NewSubnetCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/NewSubnetCmdlet.cs
new file mode 100644
index 0000000..70d6f0f
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/NewSubnetCmdlet.cs
@@ -0,0 +1,136 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("New", "Subnet", SupportsShouldProcess = true)]
+ public class NewSubnetCmdlet : BasePSCmdlet
+ {
+ private string _networkId;
+ private int _IPVersion;
+ private string _cidr;
+ private string[] _allocationPools;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewSubnet", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("nid")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "NewSubnet", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("ipv")]
+ public int IPVersion
+ {
+ get { return _IPVersion; }
+ set { _IPVersion = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "NewSubnet", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("c")]
+ public string Cidr
+ {
+ get { return _cidr; }
+ set { _cidr = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, Mandatory = false, ParameterSetName = "NewSubnet", ValueFromPipelineByPropertyName = true, HelpMessage = "Valid values include")]
+ [Alias("a")]
+ [ValidateNotNullOrEmpty]
+ public string[] AllocationPools
+ {
+ get { return _allocationPools; }
+ set { _allocationPools = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewSubnet newSubnet = new NewSubnet();
+ //newSubnet.AllocationPools = this.FormatAllocationPools();
+ newSubnet.Cidr = this.Cidr;
+ newSubnet.IPversion = this.IPVersion;
+ newSubnet.NetworkId = this.NetworkId;
+
+ Subnet subnet = this.RepositoryFactory.CreateSubnetRepository().SaveSubnet(newSubnet);
+ Console.WriteLine("");
+ Console.WriteLine("New Subnet " + subnet.Id + " created.");
+ Console.WriteLine("");
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public List FormatAllocationPools()
+ {
+ if (_allocationPools != null)
+ {
+ List allocationPools = new List();
+ char[] seperator = { '|' };
+
+ foreach (string ap in _allocationPools)
+ {
+ string[] temp = ap.Split(seperator);
+ AllocationPool allocationPool = new AllocationPool();
+ allocationPool.Start = temp[0];
+ allocationPool.End = temp[1];
+
+ allocationPools.Add(allocationPool);
+ }
+ return allocationPools;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UnAssignIPCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UnAssignIPCmdlet.cs
new file mode 100644
index 0000000..d487204
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UnAssignIPCmdlet.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.Management.Automation;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+using System;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Cmdlets.Compute.Security
+{
+ [Cmdlet("UnAssign", "IP", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class UnAssignIPCmdlet : BasePSCmdlet
+ {
+ private string _serverId;
+ private string _ip;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("ip")]
+ [ValidateNotNullOrEmpty]
+ public string IpAddress
+ {
+ get { return _ip; }
+ set { _ip = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("sid")]
+ [ValidateNotNullOrEmpty]
+ public string ServerId
+ {
+ get { return _serverId; }
+ set { _serverId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ IFloatingIPRepository repository = new FloatingIPRepository(this.Context.GetRepositoryContext("compute"));
+ UnAssignIPAction assignment = new UnAssignIPAction();
+ assignment.ServerId = this.ServerId;
+ assignment.Ip = this.IpAddress;
+
+ repository.UnAssignIP(assignment);
+
+ Console.WriteLine("");
+ Console.WriteLine("Floating IP Address " + this.IpAddress + " has been disassociated with Server : " + assignment.ServerId);
+ Console.WriteLine("");
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UpdateFloatingIPCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateFloatingIPCmdlet.cs
new file mode 100644
index 0000000..f9c79ba
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateFloatingIPCmdlet.cs
@@ -0,0 +1,70 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Update", "FloatingIP", SupportsShouldProcess = true)]
+ //[RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class UpdateFloatingIPCmdlet : BasePSCmdlet
+ {
+ private string _portId;
+ private string _floatingIPId;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdateFloatingIP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("fid")]
+ public string FloatingIPId
+ {
+ get { return _floatingIPId; }
+ set { _floatingIPId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdateFloatingIP", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("pid")]
+ public string PortId
+ {
+ get { return _portId; }
+ set { _portId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ UpdateFloatingIP updateIP = new UpdateFloatingIP();
+ updateIP.PortId = this.PortId;
+
+ this.RepositoryFactory.CreateFloatingIPRepository().UpdateFloatingIP(this.FloatingIPId, updateIP);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UpdateNetworkCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateNetworkCmdlet.cs
new file mode 100644
index 0000000..d919366
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateNetworkCmdlet.cs
@@ -0,0 +1,70 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Update", "Network", SupportsShouldProcess = true)]
+ public class UpdateNetworkCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _networkId;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdateNetwork", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("id")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdateNetwork", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.NetworkId);
+ UpdateNetwork updateNetwork = new UpdateNetwork();
+ updateNetwork.Name = this.Name;
+
+ this.RepositoryFactory.CreateNetworkRepository().UpdateNetwork(id, updateNetwork);
+ this.UpdateCache();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UpdatePortCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UpdatePortCmdlet.cs
new file mode 100644
index 0000000..e4dbd63
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UpdatePortCmdlet.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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Update", "Port", SupportsShouldProcess = true)]
+ public class UpdatePortCmdlet : BasePSCmdlet
+ {
+ private string _deviceId;
+ private string _portId;
+
+ #region Properties
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdatePort", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("id")]
+ public string PortId
+ {
+ get { return _portId; }
+ set { _portId = value; }
+ }
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdatePort", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("did")]
+ public string DeviceId
+ {
+ get { return _deviceId; }
+ set { _deviceId = value; }
+ }
+ #endregion
+ #region Methods
+//============================================================================
+///
+///
+///
+//============================================================================
+ protected override void ProcessRecord()
+ {
+ UpdatePort updatePort = new UpdatePort();
+ updatePort.DeviceId = this.DeviceId;
+
+ this.RepositoryFactory.CreatePortRepository().UpdatePort(this.PortId, updatePort);
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UpdateRouterCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateRouterCmdlet.cs
new file mode 100644
index 0000000..54b6518
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateRouterCmdlet.cs
@@ -0,0 +1,70 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Update", "Router", SupportsShouldProcess = true)]
+ public class UpdateRouterCmdlet : BasePSCmdlet
+ {
+ private string _networkId;
+ private string _routerId;
+
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdateRouter", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("id")]
+ public string RouterId
+ {
+ get { return _routerId; }
+ set { _routerId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdateRouter", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("nid")]
+ public string NetworkId
+ {
+ get { return _networkId; }
+ set { _networkId = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.RouterId);
+ UpdateRouter updateRouter = new UpdateRouter();
+ //updateRouter.ExternalGatewayInfo.NetworkId = this.NetworkId;
+
+ this.RepositoryFactory.CreateRouterRepository().UpdateRouter(id, updateRouter);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/UpdateSubnetCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateSubnetCmdlet.cs
new file mode 100644
index 0000000..de1399d
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/UpdateSubnetCmdlet.cs
@@ -0,0 +1,83 @@
+/* ============================================================================
+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.Management.Automation;
+using System.Text;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Cmdlets.Networking
+{
+ [Cmdlet("Update", "Subnet", SupportsShouldProcess = true)]
+ public class UpdateSubnetCmdlet : BasePSCmdlet
+ {
+ private string _gatewayIP;
+ private string _name;
+ private string _subnetId;
+
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 0, ParameterSetName = "UpdateSubnet", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("id")]
+ public string SubnetId
+ {
+ get { return _subnetId; }
+ set { _subnetId = value; }
+ }
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 2, ParameterSetName = "UpdateSubnet", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("egw")]
+ public string GatewayId
+ {
+ get { return _gatewayIP; }
+ set { _gatewayIP = value; }
+ }
+//============================================================================
+///
+///
+///
+//============================================================================
+ [Parameter(Position = 1, ParameterSetName = "UpdateSubnet", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the Server.")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//============================================================================
+///
+///
+///
+//============================================================================
+ protected override void ProcessRecord()
+ {
+ UpdateSubnet updateSubnet = new UpdateSubnet();
+ updateSubnet.Name = this.Name;
+ updateSubnet.GatewayIP = this.GatewayId;
+
+ this.RepositoryFactory.CreateSubnetRepository().UpdateSubnet(_subnetId, updateSubnet);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Networking/newclasses b/Openstack.Client.Powershell/Cmdlets/Networking/newclasses
new file mode 100644
index 0000000..dbafcf2
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Networking/newclasses
@@ -0,0 +1,31 @@
+ Volume in drive C has no label.
+ Volume Serial Number is EE3F-CECC
+
+ Directory of C:\Projects\HPCloud\CLI\HPCloud.Client.Powershell\Cmdlets\Networking
+
+08/23/2013 02:45 PM .
+08/23/2013 02:45 PM ..
+07/19/2013 04:04 PM 1,386 AllocateIPCmdlet.cs
+07/30/2013 08:06 PM 4,351 AssignIPCmdlet.cs
+07/19/2013 04:04 PM 2,484 DeallocateIPCmdlet.cs
+07/30/2013 08:06 PM 4,871 DeleteFloatingIPCmdlet.cs
+08/13/2013 11:01 AM 6,478 DeleteNetworkCmdlet.cs
+07/30/2013 08:06 PM 4,771 DeletePortCmdlet.cs
+07/30/2013 08:06 PM 4,786 DeleteRouterCmdlet.cs
+07/30/2013 08:06 PM 3,491 DeleteRouterInterfaceCmdlet.cs
+07/30/2013 08:06 PM 4,745 DeleteSubnetCmdlet.cs
+08/23/2013 02:45 PM 0 newclasses
+07/30/2013 08:06 PM 3,607 NewFloatingIPCmdlet.cs
+07/30/2013 08:06 PM 5,864 NewNetworkCmdlet.cs
+07/30/2013 08:06 PM 4,717 NewPortCmdlet.cs
+08/10/2013 07:02 PM 4,297 NewRouterCmdlet.cs
+07/30/2013 08:06 PM 4,797 NewRouterInterfaceCmdlet.cs
+07/30/2013 08:06 PM 6,609 NewSubnetCmdlet.cs
+07/30/2013 08:06 PM 4,043 UnAssignIPCmdlet.cs
+07/30/2013 08:06 PM 3,507 UpdateFloatingIPCmdlet.cs
+07/30/2013 08:06 PM 3,486 UpdateNetworkCmdlet.cs
+07/30/2013 08:06 PM 3,370 UpdatePortCmdlet.cs
+07/30/2013 08:06 PM 3,512 UpdateRouterCmdlet.cs
+07/30/2013 08:06 PM 3,879 UpdateSubnetCmdlet.cs
+ 22 File(s) 89,051 bytes
+ 2 Dir(s) 6,555,230,208 bytes free
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/GetCDNCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/GetCDNCmdlet.cs
new file mode 100644
index 0000000..dc9f3e9
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/GetCDNCmdlet.cs
@@ -0,0 +1,54 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Cmdlets.Common;
+using System.Management.Automation;
+using Openstack.Objects.Domain;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.Storage.CDN
+{
+ [Cmdlet(VerbsCommon.Get, "CDN", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.CDN)]
+ public class GetCDNCmdlet : BasePSCmdlet
+ {
+//=========================================================================================
+///
+/// The main driver..
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ List containers = this.RepositoryFactory.CreateCDNRepository().GetContainers();
+
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("The following Storage Containers are CDN enabled");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("==============================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("");
+
+
+ this.WriteObject(containers);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/NewCDNCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/NewCDNCmdlet.cs
new file mode 100644
index 0000000..aa02390
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/NewCDNCmdlet.cs
@@ -0,0 +1,89 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using System.IO;
+using Openstack.Client.Powershell.Providers.Storage;
+using System.Diagnostics;
+using Openstack.Common;
+using System.Diagnostics.Contracts;
+using System.Collections;
+using System.Linq;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.Storage.CDN
+{
+ [Cmdlet(VerbsCommon.New, "CDN", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.CDN)]
+ public class NewCDNCmdlet : BasePSCmdlet
+ {
+ private string _containerName;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, Mandatory = true, ParameterSetName = "EnableCDN", ValueFromPipelineByPropertyName = true, HelpMessage = "The Name of the Container to enable for CDN access.")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string ContainerName
+ {
+ get { return _containerName; }
+ set { _containerName = value; }
+ }
+//=========================================================================================
+///
+/// The main driver..
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ List containers = this.RepositoryFactory.CreateContainerRepository().GetStorageContainers();
+ if (!containers.Any(c => c.Name == this.ContainerName))
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("");
+ Console.WriteLine ("Storage Container not found. Please specify an existing Storage Container name to pair with this CDN entry.");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+ else
+ {
+ string url = this.RepositoryFactory.CreateCDNRepository().SaveContainer(this.ContainerName);
+ if (url != null)
+ {
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("================================================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("CDN entry created successfully. The URL below can be combined with object names to serve objects through the CDN.");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("================================================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("");
+ Console.WriteLine(url);
+ Console.WriteLine("");
+ }
+ }
+ }
+ }
+}
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/RemoveCDNCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/RemoveCDNCmdlet.cs
new file mode 100644
index 0000000..8756128
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/CDN/RemoveCDNCmdlet.cs
@@ -0,0 +1,62 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using System.IO;
+using Openstack.Client.Powershell.Providers.Storage;
+using System.Diagnostics;
+using Openstack.Common;
+using System.Diagnostics.Contracts;
+using System.Collections;
+using System.Linq;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.Storage.CDN
+{
+ [Cmdlet(VerbsCommon.Remove, "CDN", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.CDN)]
+ public class RemoveCDNCmdlet : BasePSCmdlet
+ {
+ private string _containerName;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Mandatory = true, ParameterSetName = "EnableCDN", ValueFromPipelineByPropertyName = true, HelpMessage = "The Name of the Container to enable for CDN access.")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string ContainerName
+ {
+ get { return _containerName; }
+ set { _containerName = value; }
+ }
+//=========================================================================================
+///
+/// The main driver..
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.RepositoryFactory.CreateCDNRepository().DeleteContainer(this.ContainerName);
+ }
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/MigrateDriveCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/MigrateDriveCmdlet.cs
new file mode 100644
index 0000000..4a3e6be
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/MigrateDriveCmdlet.cs
@@ -0,0 +1,265 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.DataAccess.Storage;
+using Openstack.Migrations;
+using System;
+using Openstack.Client.Powershell.Providers.Storage;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Cmdlets.Containers
+{
+ [Cmdlet("Migrate", "Drive", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class MigrateDriveCmdlet : BasePSCmdlet
+ {
+ private string _accessKeyID;
+ private string _secretAccessKeyID;
+ private long _bytesCopied = 0;
+ private int _filesCopied = 0;
+ private long _totalBytesCopied = 0;
+ private int _totalFilesCopied = 0;
+ private string[] _buckets;
+ private string _provider;
+
+ #region Parameters
+
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "localStore", Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = " ")]
+ [ValidateSet("Skydrive", "Dropbox", "S3")]
+ [Alias("p")]
+ [ValidateNotNullOrEmpty]
+ public string Provider
+ {
+ get { return _provider; }
+ set { _provider = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, Mandatory = false, ParameterSetName = "localStore", ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("ak")]
+ [ValidateNotNullOrEmpty]
+ public string AccessKeyId
+ {
+ get { return _accessKeyID; }
+ set { _accessKeyID = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, ParameterSetName = "localStore", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("sk")]
+ [ValidateNotNullOrEmpty]
+ public string SecretAccessKeyId
+ {
+ get { return _secretAccessKeyID; }
+ set { _secretAccessKeyID = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "localStore", ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("b")]
+ [ValidateNotNullOrEmpty]
+ public string[] Buckets
+ {
+ get { return _buckets; }
+ set { _buckets = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void PrintTotals()
+ {
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("");
+ Console.WriteLine("--------------------------------------");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("Operation Summary");
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("--------------------------------------");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("Total Files Copied : " + Convert.ToString(_totalFilesCopied));
+ Console.WriteLine("Total Bytes Copied : " + Convert.ToString(_totalBytesCopied));
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void MigrateS3Drive()
+ {
+ //AWSMigration migration = new AWSMigration("AKIAJ6SAONGOGCUKSONA", "0Hi00F7zlFwGi8a45qRhGfW2Btf+FAioZhfD+99K");
+ AWSMigration migration = new AWSMigration(_accessKeyID, _secretAccessKeyID);
+ if (_buckets == null) _buckets = migration.GetBuckets();
+
+ migration.Changed += new Openstack.Migrations.AWSMigration.CopyOperationEventHandler(ListChanged);
+ migration.ContainerCreated += new Openstack.Migrations.AWSMigration.CreateContainerOperationEventHandler(OnCreateContainer);
+
+ Console.WriteLine("");
+ foreach (string bucketName in _buckets)
+ {
+ _bytesCopied = 0;
+ _filesCopied = 0;
+
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("");
+ Console.WriteLine("--------------------------------------");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("Processing Bucket : " + bucketName);
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("--------------------------------------");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+ migration.MigrateBucket(bucketName);
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("Files Copied : " + Convert.ToString(_filesCopied));
+ Console.WriteLine("Bytes Copied : " + Convert.ToString(_bytesCopied));
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("");
+ }
+
+ this.PrintTotals();
+ migration.Changed -= new Openstack.Migrations.AWSMigration.CopyOperationEventHandler(ListChanged);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void MigrateLocalDrive()
+ {
+ LocalStoreMigration migration = new LocalStoreMigration();
+
+ migration.Changed += new Openstack.Migrations.LocalStoreMigration.CopyOperationEventHandler(ListChanged);
+ Console.WriteLine("");
+
+ _bytesCopied = 0;
+ _filesCopied = 0;
+
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("");
+ Console.WriteLine("--------------------------------------");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("Migrating local " + _provider + " store.");
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine("--------------------------------------");
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.Green;
+
+ if (_provider == "Dropbox")
+ migration.MigrateLocalStore(StorageProvider.DropBox);
+ else
+ migration.MigrateLocalStore(StorageProvider.SkyDrive);
+
+ this.PrintTotals();
+ migration.Changed -= new Openstack.Migrations.LocalStoreMigration.CopyOperationEventHandler(ListChanged);
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void OnCreateContainer(object sender, CreateContainerOperationInfoEventArgs e)
+ {
+ PSDriveInfo psDriveInfo = new PSDriveInfo(e.ContainerName, this.Drive.Provider, "/", "", null);
+ OSDriveParameters driveParameters = new OSDriveParameters();
+ driveParameters.Settings = this.Settings;
+ try
+ {
+ this.SessionState.Drive.New(new OSDriveInfo(psDriveInfo, driveParameters, this.Context), "local");
+ }
+ catch (SessionStateException ex) { }
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void ListChanged(object sender, CopyOperationInfoEventArgs e)
+ {
+ if (e.ExceptionMessage == null)
+ {
+ if (e.Filename != null || e.Filename != string.Empty)
+ {
+ Console.WriteLine("Copying file " + e.Filename);
+ _bytesCopied = _bytesCopied + e.BytesCopied;
+ ++_filesCopied;
+ _totalBytesCopied = _totalBytesCopied + e.BytesCopied;
+ ++_totalFilesCopied;
+ }
+ }
+ else
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("Error : " + e.ExceptionMessage);
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (_provider == "S3")
+ {
+ if (_accessKeyID == null || _secretAccessKeyID == null)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("Please supply both Secret key and Access key parameters to migrate your S3 Buckets.");
+ Console.ForegroundColor = ConsoleColor.Green;
+ this.MigrateS3Drive();
+ }
+ else
+ {
+ this.MigrateS3Drive();
+ }
+ }
+ else
+ {
+ this.MigrateLocalDrive();
+ }
+ }
+ #endregion
+ }
+ }
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/NewContainerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/NewContainerCmdlet.cs
new file mode 100644
index 0000000..28d46a3
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/NewContainerCmdlet.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.Management.Automation;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using Openstack.Client.Powershell.Providers.Storage;
+using System.Collections.ObjectModel;
+using System.Management.Automation.Host;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using System;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Xml.Linq;
+using System.IO;
+
+namespace Openstack.Client.Powershell.Cmdlets.Containers
+{
+ [Cmdlet(VerbsCommon.New, "Container", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class NewContainerCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _sharedContainerURL = null;
+ private bool _forceSave = false;
+ private bool _createCDN = false;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "SaveSharedStorageContainer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("url")]
+ [ValidateNotNullOrEmpty]
+ public string SharedContainerURL
+ {
+ get { return _sharedContainerURL; }
+ set { _sharedContainerURL = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "SavestorageContainer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "SavestorageContainer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("cdn")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter CreateCDN
+ {
+ get { return _createCDN; }
+ set { _createCDN = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, ParameterSetName = "SavestorageContainer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("f")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter Force
+ {
+ get { return _forceSave; }
+ set { _forceSave = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void CreateStorageContainer(StorageContainer storageContainer)
+ {
+ IContainerRepository repository = this.RepositoryFactory.CreateContainerRepository();
+ bool skipAdd = false;
+
+ // These should be transacted somehow..
+
+ repository.SaveContainer(storageContainer);
+
+ Collection drives = this.SessionState.Drive.GetAllForProvider("OS-Storage");
+ foreach (PSDriveInfo drive in drives)
+ {
+ if (drive.Name == storageContainer.Name)
+ {
+ skipAdd = true;
+ }
+ }
+ if (!skipAdd)
+ {
+ PSDriveInfo psDriveInfo = new PSDriveInfo(storageContainer.Name, this.GetStorageProvider(drives), "/", "", null);
+ OSDriveParameters driveParameters = new OSDriveParameters();
+ driveParameters.Settings = this.Settings;
+
+ this.SessionState.Drive.New(new OSDriveInfo(psDriveInfo, driveParameters, this.Context), "local");
+ }
+
+ this.WriteObject(" ");
+ this.WriteObject("Storage Container " + _name + " created successfully.");
+ this.WriteObject(" ");
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsDuplicateContainer(string container)
+ {
+ List containers = this.RepositoryFactory.CreateContainerRepository().GetStorageContainers();
+ return containers.Where(cn => cn.Name == container).Any();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void SaveNewContainer()
+ {
+ StorageContainer storageContainer = new StorageContainer();
+ storageContainer.Name = _name;
+
+ if (IsDuplicateContainer(this.Name))
+ {
+ this.WriteObject(" ");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine("Storage Container " + _name + " already exist.");
+ Console.WriteLine("");
+ return;
+ }
+
+ if (storageContainer.ValidateBasicRequirements() == false)
+ {
+ this.WriteObject(" ");
+ this.WriteObject("Storage Container " + _name + " has failed basic validation rules. Please ensure that the name doesn't include a forward slash, single or double quote character and is less than 255 characters in length.");
+ return;
+ }
+ else if (storageContainer.ValidateExtendedRequirements() == false)
+ {
+
+ // Check to see if the Container already exist.. Or not maybe it does z
+
+ if (_forceSave)
+ {
+ this.CreateStorageContainer(storageContainer);
+ if (_createCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().SaveContainer(_name);
+ }
+ }
+ else
+ {
+ Collection choices = new Collection();
+ choices.Add(new ChoiceDescription("Y", "Yes"));
+ choices.Add(new ChoiceDescription("N", "No"));
+
+ if (this.Host.UI.PromptForChoice("Confirm Action", "Specified Storage Container name is not a valid virtalhost name, continue anyway?", choices, 0) == 0)
+ {
+ this.CreateStorageContainer(storageContainer);
+ if (_createCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().SaveContainer(_name);
+ }
+ }
+ }
+ }
+ else
+ {
+ this.CreateStorageContainer(storageContainer);
+ if (_createCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().SaveContainer(_name);
+ }
+
+ }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void CreateSharedDrive(string drivePath)
+ {
+ string driveName = Path.GetFileName(drivePath);
+ Collection drives = this.SessionState.Drive.GetAllForProvider("OS-Storage");
+ PSDriveInfo psDriveInfo = new PSDriveInfo(driveName, this.GetStorageProvider(drives), "/", "", null);
+ OSDriveParameters driveParameters = new OSDriveParameters();
+ driveParameters.Settings = this.Settings;
+ OSDriveInfo newDrive = new OSDriveInfo(psDriveInfo, driveParameters, this.Context);
+ newDrive.SharePath = drivePath;
+
+ this.SessionState.Drive.New(newDrive, "local");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void SaveSharedContainer()
+ {
+ if (this.IsUrlValid(this.SharedContainerURL))
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement newDrive = new XElement("SharedContainer");
+ newDrive.Add(new XAttribute("url", this.SharedContainerURL));
+
+ doc.Element("configuration").Element("appSettings").Element("StorageManagement").Element("SharedContainers").Add(newDrive);
+ doc.Save(configFilePath);
+ this.CreateSharedDrive(this.SharedContainerURL);
+ }
+ else
+ {
+ Console.WriteLine("Invalid URL supplied");
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private ProviderInfo GetStorageProvider(Collection drives)
+ {
+ foreach (PSDriveInfo drive in drives)
+ {
+ if (drive.Provider.Name == "OS-Storage")
+ {
+ return drive.Provider;
+ }
+ }
+ return null;
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsUrlValid(string smtpHost)
+ {
+ return true;
+ bool br = false;
+ try
+ {
+ IPHostEntry ipHost = Dns.GetHostEntry(smtpHost);
+ br = true;
+ }
+ catch (SocketException se)
+ {
+ br = false;
+ }
+ return br;
+ }
+//=========================================================================================
+///
+/// qqqqqqqqqqq
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (_sharedContainerURL != null)
+ {
+ this.SaveSharedContainer();
+ }
+ else
+ {
+ this.SaveNewContainer();
+ }
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/RemoveContainerCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/RemoveContainerCmdlet.cs
new file mode 100644
index 0000000..1a2e78d
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/RemoveContainerCmdlet.cs
@@ -0,0 +1,274 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.DataAccess;
+using System.Collections.ObjectModel;
+using System.Management.Automation.Host;
+using Openstack.Common.Properties;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+namespace Openstack.Client.Powershell.Cmdlets.Containers
+{
+ [Cmdlet(VerbsCommon.Remove, "Container", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class RemoveContainerCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private SwitchParameter _forceDelete = false;
+ private SwitchParameter _reset = false;
+ private bool _removeCDN = false;
+
+ #region Properties
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "RemoveContainer", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("cdn")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter RemoveCDN
+ {
+ get { return _removeCDN; }
+ set { _removeCDN = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "RemoveContainer", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+ [Alias("n")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = false, ParameterSetName = "RemoveContainer", ValueFromPipelineByPropertyName = true, HelpMessage = "s")]
+ [Alias("fd")]
+ [ValidateNotNullOrEmpty]
+ public SwitchParameter ForceDelete
+ {
+ get { return _forceDelete; }
+ set { _forceDelete = value; }
+ }
+ #endregion
+ #region Methods
+//======================================================================================================================
+///
+///
+///
+/// Name of the Container to trash
+//======================================================================================================================
+ private bool DeleteContainerContents(StorageContainer storageContainer)
+ {
+ List containerItems = null;
+ IStorageObjectRepository repository = this.RepositoryFactory.CreateStorageObjectRepository();
+
+ try
+ {
+ containerItems = repository.GetStorageObjects(storageContainer.Name, true);
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+ // Define our Action delegate which will delete the element in the list..
+
+ if (containerItems != null)
+ {
+ Action deleteStorageObjectAction = delegate(StorageObject storageObject)
+ {
+ StoragePath targetPath = this.CreateStoragePath(storageObject.Key);
+ repository.DeleteStorageObject(targetPath.AbsoluteURI);
+ };
+
+ // Remove all Files contained within the storageContainer...
+
+ if (containerItems != null)
+ {
+ containerItems.ForEach(deleteStorageObjectAction);
+ return true;
+ }
+ }
+ return true;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void DeleteAllContainers()
+ {
+ IContainerRepository repository = this.RepositoryFactory.CreateContainerRepository();
+ List containers = repository.GetStorageContainers();
+
+ foreach (StorageContainer container in containers)
+ {
+ try
+ {
+ // repository.DeleteContainer(container);
+ }
+ catch (Exception) { }
+ }
+ }
+//======================================================================================================================
+///
+///
+///
+///
+///
+//======================================================================================================================
+ private string GetContainerName(string url)
+ {
+ string[] elements = url.Split('/');
+ return elements[elements.Length - 1];
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private bool RemoveSharedContainer()
+ {
+ bool entryRemoved = false;
+ List results = new List();
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ IEnumerable containers = doc.XPathSelectElements("//SharedContainer");
+
+ foreach (XElement element in containers)
+ {
+ string sharedPath = (string)element.Attribute("url");
+ if (this.GetContainerName(sharedPath) == this.Name)
+ {
+ element.Remove();
+ entryRemoved = true;
+ }
+ }
+ doc.Save(configFilePath);
+ this.SessionState.Drive.Remove(this.Name, true, "local");
+ if (this.Name == this.SessionState.Drive.Current.Name)
+ this.SessionState.InvokeCommand.InvokeScript("cd c:");
+
+ return entryRemoved;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ if (RemoveSharedContainer() == true) return;
+
+ Collection choices = new Collection();
+ choices.Add(new ChoiceDescription("Y", "Yes"));
+ choices.Add(new ChoiceDescription("N", "No"));
+
+ if (_forceDelete == false)
+ {
+ if (this.Host.UI.PromptForChoice("Confirm Action", "You are about to delete an entire Container. Are you sure about this?", choices, 0) == 0)
+ {
+ IContainerRepository repository = this.RepositoryFactory.CreateContainerRepository();
+ StorageContainer storageContainer = new StorageContainer();
+ storageContainer.Name = _name;
+
+ try
+ {
+ repository.DeleteContainer(storageContainer);
+ if (_removeCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().DeleteContainer(_name);
+ }
+ }
+ catch (Exception ex)
+ {
+ // The container has content and the operation is in conflict. Destroy all contents then retry (the User knows what's up).
+
+ if (ex.Message == "Unknown Repository Error")
+ {
+ if (DeleteContainerContents(storageContainer))
+ {
+ repository.DeleteContainer(storageContainer);
+ if (_removeCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().DeleteContainer(_name);
+ }
+ }
+ }
+ }
+ try
+ {
+ this.SessionState.Drive.Remove(storageContainer.Name, true, "local");
+ if (storageContainer.Name == this.SessionState.Drive.Current.Name)
+ this.SessionState.InvokeCommand.InvokeScript("cd c:");
+ }
+ catch (DriveNotFoundException ex) { }
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ IContainerRepository repository = this.RepositoryFactory.CreateContainerRepository();
+ StorageContainer storageContainer = new StorageContainer();
+ storageContainer.Name = _name;
+
+ try
+ {
+ repository.DeleteContainer(storageContainer);
+ }
+ catch (Exception ex)
+ {
+ // The container has content and the operation is in conflict. Destroy all contents then retry (the User knows what's up).
+
+ if (ex.Message == "Unknown Repository Error")
+ {
+ if (DeleteContainerContents(storageContainer))
+ {
+ repository.DeleteContainer(storageContainer);
+ if (_removeCDN)
+ {
+ this.RepositoryFactory.CreateCDNRepository().DeleteContainer(_name);
+ }
+ }
+ }
+
+ }
+ }
+ #endregion
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/SetScopeCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/SetScopeCmdlet.cs
new file mode 100644
index 0000000..7ddc553
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Containers/SetScopeCmdlet.cs
@@ -0,0 +1,191 @@
+/* ============================================================================
+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.Objects.DataAccess;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Domain;
+using System.IO;
+using Openstack.Client.Powershell.Providers.Storage;
+using Openstack.Common;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Storage;
+using System.Collections.Generic;
+
+namespace Openstack.Client.Powershell.Cmdlets.Containers
+{
+ [Cmdlet(VerbsCommon.Set, "Scope", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+ public class SetScopeCmdlet : BasePSCmdlet
+ {
+ private string _containerName;
+ private ContainerScope _scope;
+ private string _permission;
+ private string[] _users;
+
+ #region Parameters
+//=========================================================================================
+///
+/// The Container name.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "scp1", Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The Container name.")]
+ [Alias("cn")]
+ [ValidateNotNullOrEmpty]
+ public string ContainerName
+ {
+ get { return _containerName; }
+ set { _containerName = value; }
+ }
+//=========================================================================================
+///
+/// The Container name.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "scp2", Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The Container name.")]
+ [Alias("c")]
+ [ValidateNotNullOrEmpty]
+ public string Name
+ {
+ get { return _containerName; }
+ set { _containerName = value; }
+ }
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "scp2", Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Containers Scope.")]
+ [ValidateSet("Public", "Private")]
+ [Alias("s")]
+ [ValidateNotNullOrEmpty]
+ public ContainerScope Scope
+ {
+ get { return _scope; }
+ set { _scope = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "scp1", Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "c")]
+ [Alias("u")]
+ [ValidateNotNullOrEmpty]
+ public string[] Users
+ {
+ get { return _users; }
+ set { _users = value; }
+ }
+//=========================================================================================
+///
+/// The location of the file to set permissions on.
+///
+//=========================================================================================
+ [Parameter(ParameterSetName = "scp1", Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "v")]
+ [ValidateSet("Read", "Write", "ReadWrite")]
+ [Alias("p")]
+ [ValidateNotNullOrEmpty]
+ public string Permission
+ {
+ get { return _permission; }
+ set { _permission = value; }
+ }
+ #endregion
+ #region Methods
+//========================================================================================
+///
+///
+///
+///
+///
+//========================================================================================
+ private ContainerPermissions GetPermission(string permission)
+ {
+ switch (permission)
+ {
+ case ("Read") :
+ return ContainerPermissions.PublicRead;
+
+ case ("ReadWrite"):
+ return ContainerPermissions.PublicReadWrite;
+
+ case ("Write"):
+ return ContainerPermissions.PublicWrite;
+
+ default :
+ return ContainerPermissions.PublicRead;
+ }
+ }
+//========================================================================================
+///
+///
+///
+///
+///
+//========================================================================================
+ private List GetUsers(string[] users)
+ {
+ List userList = new List();
+ foreach (string user in users) {
+ userList.Add("*:" + user);
+ }
+ return userList;
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void ShowUrl()
+ {
+ StoragePath path = this.CreateStoragePath(String.Empty);
+ path.Volume = _containerName;
+ string uri = path.AbsoluteURI.Remove(path.AbsoluteURI.LastIndexOf('/'));
+
+ if (this.Settings.PasteGetURIResultsToClipboard)
+ OutClipboard.SetText(uri);
+
+ WriteObject("");
+ WriteObject("Shared Container located at : " + uri);
+ WriteObject("");
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ IContainerRepository repository = this.RepositoryFactory.CreateContainerRepository();
+
+ if (this.ParameterSetName == "scp2")
+ {
+ repository.SetScope(_containerName, _scope);
+ }
+ else
+ {
+ ContainerACL acl = new ContainerACL();
+ acl.Permission = this.GetPermission(_permission);
+ acl.Users = this.GetUsers(_users);
+ repository.SetScope(_containerName, acl);
+ this.ShowUrl();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs
new file mode 100644
index 0000000..13bbd70
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/CopyItemCmdlet.cs
@@ -0,0 +1,260 @@
+///* ============================================================================
+//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.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 System.IO;
+
+//namespace Openstack.Client.Powershell.Cmdlets.Common
+//{
+// [Cmdlet(VerbsCommon.Copy, "Item", SupportsShouldProcess = true)]
+// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+// public class CopyItemCmdlet : BasePSCmdlet
+// {
+// public const string cDelimiter = "/";
+// const string cFolderMarker = "folder.txt";
+// private string _sourcePath;
+// private string _targetPath;
+// private SwitchParameter _recursive;
+// private long _bytesCopied = 0;
+// private int _filesCopied = 0;
+// private long _totalBytesCopied = 0;
+// private int _totalFilesCopied = 0;
+
+// #region Ctors
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// public CopyItemCmdlet()
+// { }
+// #endregion
+// #region Parameters
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// [Parameter(Mandatory = false, ParameterSetName = "aa", ValueFromPipelineByPropertyName = true, HelpMessage = "oih")]
+// [Alias("recurse")]
+// [ValidateNotNullOrEmpty]
+// public SwitchParameter Recursive
+// {
+// get { return _recursive; }
+// set { _recursive = value; }
+// }
+////=========================================================================================
+/////
+///// The location of the file to copy.
+/////
+////=========================================================================================
+// [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "aa", ValueFromPipeline = true, HelpMessage = "Help Text")]
+// [ValidateNotNullOrEmpty]
+// public string SourcePath
+// {
+// get { return _sourcePath; }
+// set { _sourcePath = value; }
+// }
+////=========================================================================================
+/////
+///// The destination of the file to copy.
+/////
+////=========================================================================================
+// [Parameter(Position = 2, Mandatory = false, ValueFromPipeline = true, ParameterSetName = "aa", ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+// [ValidateNotNullOrEmpty]
+// public string TargetPath
+// {
+// get { return _targetPath; }
+// set
+// {
+// if (value.StartsWith(@"/") || value.StartsWith(@"\"))
+// {
+// _targetPath = value.Substring(1, _targetPath.Length - 1);
+// }
+// else
+// {
+// _targetPath = value;
+// }
+// }
+// }
+// #endregion
+// #region Properties
+////==================================================================================================
+/////
+/////
+/////
+////==================================================================================================
+// private string StorageServiceURL
+// {
+// get
+// {
+// if (((OSDriveInfo)this.Drive).SharePath == null)
+// return this.Context.ServiceCatalog.GetService("object-store").Url;
+// else
+// //return ((OSDriveInfo)this.Drive).SharePath;
+// return ((OSDriveInfo)this.Drive).SharePath.Replace(this.Drive.Name, string.Empty);
+// }
+// }
+// #endregion
+// #region Methods
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// private void PrintTotals()
+// {
+// Console.ForegroundColor = ConsoleColor.Gray;
+// Console.WriteLine("");
+// Console.WriteLine("--------------------------------------");
+// Console.ForegroundColor = ConsoleColor.Yellow;
+// Console.WriteLine("Operation Summary");
+// Console.ForegroundColor = ConsoleColor.Gray;
+// Console.WriteLine("--------------------------------------");
+// Console.WriteLine("");
+// Console.ForegroundColor = ConsoleColor.Yellow;
+// Console.WriteLine("Total Files Copied : " + Convert.ToString(_totalFilesCopied));
+// Console.WriteLine("Total Bytes Copied : " + Convert.ToString(_totalBytesCopied));
+// Console.WriteLine("");
+// Console.ForegroundColor = ConsoleColor.Green;
+
+// }
+////=================================================================================================
+/////
+/////
+/////
+/////
+/////
+////=================================================================================================
+// private bool IsFolderPath(string path)
+// {
+// if (path.EndsWith(@"\") || path.EndsWith("/"))
+// {
+// return true;
+// }
+// else
+// {
+// return false;
+// }
+// }
+////=================================================================================================
+/////
+/////
+/////
+/////
+/////
+/////
+////=================================================================================================
+// private StoragePath CreateValidTargetPath(StoragePath sourcePath, string targetPath)
+// {
+// if (targetPath == null && sourcePath != null)
+// {
+// // The user has supplied a source but no target at all (we should use the current folder)
+
+// return new StoragePath(this.StorageServiceURL + cDelimiter + this.Drive.Name + cDelimiter + this.Drive.CurrentLocation + cDelimiter + sourcePath.FileName);
+// }
+// else if (System.IO.Path.GetFileName(targetPath) == "" && this.IsFolderPath(targetPath) == true)
+// {
+// // The user supplied a target path but no filename (we will use the Source filename)
+
+// return this.CreateStoragePath(targetPath + sourcePath.FileName);
+// }
+// else
+// {
+// // The user has supplied a target path and target filename so create the StoragePath against that...
+
+// return this.CreateStoragePath(targetPath);
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+/////
+////=========================================================================================
+// private void ListChanged(object sender, CopyOperationInfoEventArgs e)
+// {
+// if (e.ExceptionMessage == null)
+// {
+// if (e.Filename != null || e.Filename != string.Empty)
+// {
+// Console.WriteLine("Copying file " + e.Filename);
+// _bytesCopied = _bytesCopied + e.BytesCopied;
+// ++_filesCopied;
+// _totalBytesCopied = _totalBytesCopied + e.BytesCopied;
+// ++_totalFilesCopied;
+// }
+// }
+// else
+// {
+// Console.ForegroundColor = ConsoleColor.Red;
+// Console.WriteLine("Error : " + e.ExceptionMessage);
+// Console.ForegroundColor = ConsoleColor.Green;
+// }
+// }
+////=================================================================================================
+/////
+///// Direct the operation based on the types of paths supplied for both target and source locations.
+/////
+////=================================================================================================
+// private void ProcessNonQueuedCopy()
+// {
+// StoragePath sourcePath = this.CreateStoragePath(this.SourcePath);
+// StoragePath targetPath = this.CreateValidTargetPath(sourcePath, this.TargetPath);
+// IStorageObjectRepository repository = this.RepositoryFactory.CreateStorageObjectRepository();
+
+
+// if (sourcePath.PathType == Openstack.Common.PathType.Local && targetPath.PathType == Openstack.Common.PathType.Remote)
+// {
+// long lastSegment = repository.GetLastSegmentId(targetPath);
+// if (lastSegment != 0)
+// {
+// Console.WriteLine("");
+// Console.WriteLine(" You've already uploaded a portion of this file.");
+// Console.WriteLine(" Would you like to resume your previous upload? [Y/N]");
+// ConsoleKeyInfo response = Console.ReadKey();
+// if (response.Key != ConsoleKey.Y)
+// {
+// repository.DeleteStorageObject(targetPath.AbsoluteURI + @"_temp\");
+// }
+// }
+// }
+
+// ((StorageObjectRepository)repository).Changed += new StorageObjectRepository.CopyOperationCompleteEventHandler(ListChanged);
+// Console.WriteLine("");
+// repository.Copy(sourcePath.AbsoluteURI, targetPath.AbsoluteURI, true);
+// this.PrintTotals();
+// ((StorageObjectRepository)repository).Changed -= new StorageObjectRepository.CopyOperationCompleteEventHandler(ListChanged);
+// }
+////=========================================================================================
+/////
+///// The main driver..
+/////
+////=========================================================================================
+// protected override void ProcessRecord()
+// {
+// OSDriveInfo drive = this.SessionState.Drive.Current as OSDriveInfo;
+// this.ProcessNonQueuedCopy();
+// }
+// #endregion
+// }
+//}
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs
new file mode 100644
index 0000000..39bd779
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/GetURICmdlet.cs
@@ -0,0 +1,194 @@
+///* ============================================================================
+//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.Providers.Common;
+//using System.Security.Cryptography;
+//using System.Text;
+//using System.Web;
+//using Openstack.Objects.Domain;
+
+//namespace Openstack.Client.Powershell.Cmdlets.Common
+//{
+// [Cmdlet(VerbsCommon.Get, "URI", SupportsShouldProcess = true)]
+// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+// public class GetURICmdlet : BasePSCmdlet
+// {
+// private string _sourcePath;
+// private int _daysValid = 0;
+// private int _secondsValid = 0;
+
+// #region Parameters
+////=========================================================================================
+/////
+///// The location of the file to set permissions on.
+/////
+////=========================================================================================
+// [Parameter(Position = 0, ParameterSetName = "qA", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text is here")]
+// [Alias("s")]
+// [ValidateNotNullOrEmpty]
+// public string SourcePath
+// {
+// get { return _sourcePath; }
+// set { _sourcePath = value; }
+// }
+////=========================================================================================
+/////
+///// The location of the file to set permissions on.
+/////
+////=========================================================================================
+// [Parameter(Position = 1, ParameterSetName = "qA", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text is here")]
+// [Alias("dv")]
+// [ValidateNotNullOrEmpty]
+// public int DaysValid
+// {
+// get { return _daysValid; }
+// set { _daysValid = value; }
+// }
+////=========================================================================================
+/////
+///// The location of the file to set permissions on.
+/////
+////=========================================================================================
+// [Parameter(Position = 2, ParameterSetName = "qA", Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text is here")]
+// [Alias("sv")]
+// [ValidateNotNullOrEmpty]
+// public int SecondsValid
+// {
+// get { return _secondsValid; }
+// set { _secondsValid = value; }
+// }
+// #endregion
+// #region Methods
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// private string ConvertSignatureToHex(string signature)
+// {
+// string hexaHash = "";
+// foreach (byte b in signature)
+// {
+// hexaHash += String.Format("{0:x2}", b);
+// }
+// return hexaHash;
+// }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// private string GenerateTempUrl(string signatureString)
+// {
+// var hmac = new HMACSHA1(Encoding.UTF8.GetBytes(this.Settings.Username));
+// var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(signatureString));
+// return BitConverter.ToString(hash).Replace("-", "").ToLower();
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// private string GetFormattedUri(StoragePath path)
+// {
+// string[] elements = this.CreateStoragePath(this.SourcePath).ToString().Split('/');
+// return String.Join("/", elements).Replace(elements[0] + "/" + elements[1] + "/" + elements[2], string.Empty);
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// public long GetEpochTime()
+// {
+// long baseTicks = 621355968000000000;
+// long tickResolution = 10000000;
+// long epoch = (DateTime.Now.ToUniversalTime().Ticks - baseTicks) / tickResolution;
+
+// return epoch;
+// }
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+// private long GetExpirationInSeconds()
+// {
+// if (_daysValid != 0)
+// {
+// return GetEpochTime() + (86400 * _daysValid);
+// }
+// else if (_secondsValid != 0)
+// {
+// return GetEpochTime() + _secondsValid;
+// }
+// return 0;
+// }
+
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// private void GetTempUrl()
+// {
+// string uri = null;
+// long expiration = this.GetExpirationInSeconds();
+// string totalSeconds = Convert.ToString(expiration);
+// StoragePath fullPath = this.CreateStoragePath(this.SourcePath);
+// uri = this.GetFormattedUri(fullPath);
+// string signedString = this.GenerateTempUrl("GET" + "\n" + totalSeconds + "\n" + uri);
+// string signature = HttpUtility.UrlEncode(this.Settings.DefaultTenantId + ":" + this.Settings.Username + ":" + signedString);
+// string tempUrl = fullPath.BasePath + "?temp_url_sig=" + signature + "&temp_url_expires=" + totalSeconds;
+
+// WriteObject("");
+// WriteObject("Object located at : " + tempUrl);
+// WriteObject("Url Expiration Date : " + DateTime.Now.AddDays(_daysValid).ToShortDateString() + ". [" + _daysValid + @" day(s) \ " + expiration + " seconds.]");
+// WriteObject("");
+
+// if (this.Settings.PasteGetURIResultsToClipboard)
+// OutClipboard.SetText(tempUrl);
+// }
+////=========================================================================================
+/////
+///// 1347472640
+/////
+////=========================================================================================
+// protected override void ProcessRecord()
+// {
+// if (_daysValid != 0 || _secondsValid != 0)
+// {
+// this.GetTempUrl();
+// }
+// else
+// {
+// string uri = this.CreateStoragePath(this.SourcePath).ToString();
+
+// if (this.Settings.PasteGetURIResultsToClipboard)
+// OutClipboard.SetText(uri);
+
+// WriteObject("");
+// WriteObject("Object located at : " + uri);
+// WriteObject("");
+// }
+// }
+// #endregion
+// }
+//}
diff --git a/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs
new file mode 100644
index 0000000..193f4db
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/ObjectStorage/Objects/RemoveItemCmdlet.cs
@@ -0,0 +1,133 @@
+///* ============================================================================
+//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.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;
+
+//namespace Openstack.Client.Powershell.Cmdlets.Common
+//{
+// [Cmdlet(VerbsCommon.Remove, "Item", SupportsShouldProcess = true)]
+// [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.ObjectStorage)]
+// public class RemoveItemCmdlet : BasePSCmdlet
+// {
+// public const string cDelimiter = "/";
+// private string _targetPath;
+
+// #region Parameters
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Help Text")]
+// [ValidateNotNullOrEmpty]
+// [Alias("t")]
+// public string TargetPath
+// {
+// get { return _targetPath; }
+// set { _targetPath = value; }
+// }
+// #endregion
+// #region Methods
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// private void DeleteFolder(StoragePath targetPath, bool recurse)
+// {
+// Contract.Requires(targetPath.IsFolderPathOnly);
+
+// string confirmationMsg;
+// IStorageObjectRepository repository = null;
+// OSDriveInfo kvsDrive = null;
+// Collection choices;
+
+// #if (DEBUG)
+
+// // We can't prompt for confirmation as this jacks up the unit test..
+
+// repository = this.RepositoryFactory.CreateStorageObjectRepository();
+// repository.DeleteFolder(targetPath.AbsoluteURI + "/");
+// kvsDrive = (OSDriveInfo)this.SessionState.Drive.Current;
+
+// if (kvsDrive.PathCache.Exists(p => p == targetPath.Path))
+// {
+// kvsDrive.PathCache.Remove(targetPath.Path);
+// }
+// return;
+
+// #endif
+
+// choices = new Collection();
+// choices.Add(new ChoiceDescription("Y", "Yes"));
+// choices.Add(new ChoiceDescription("N", "No"));
+
+// if (recurse) confirmationMsg = "You are about to delete an entire folder and all of its decendant folders. Are you sure about this?";
+// else confirmationMsg = "You are about to delete a folder and its Storage Objects Are you sure about this?";
+
+// if (this.Host.UI.PromptForChoice("Confirmation Required." , confirmationMsg, choices, 0) == 0)
+// {
+// repository = this.RepositoryFactory.CreateStorageObjectRepository();
+// repository.DeleteFolder(targetPath.AbsoluteURI);
+
+// kvsDrive = (OSDriveInfo)this.SessionState.Drive.Current;
+
+// if (kvsDrive.PathCache.Exists(p => p == targetPath.Path))
+// {
+// kvsDrive.PathCache.Remove(targetPath.Path);
+// }
+// }
+// }
+////=========================================================================================
+/////
+/////
+/////
+////=========================================================================================
+// protected override void ProcessRecord()
+// {
+// Contract.Requires(this.Drive != null);
+// StoragePath targetPath = this.CreateStoragePath(this.TargetPath);
+
+// if (targetPath.IsFolderPathOnly)
+// {
+// this.DeleteFolder(targetPath, true);
+// }
+// else
+// {
+// try
+// {
+// this.RepositoryFactory.CreateStorageObjectRepository().DeleteStorageObject(targetPath.AbsoluteURI);
+// }
+// catch (Exception ex)
+// {
+// Console.WriteLine("");
+// Console.WriteLine(ex.Message);
+// Console.WriteLine("");
+// }
+// }
+// }
+// }
+// #endregion
+// }
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Security/AddRuleCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Security/AddRuleCmdlet.cs
new file mode 100644
index 0000000..0da434e
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Security/AddRuleCmdlet.cs
@@ -0,0 +1,176 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Collections;
+using Openstack.Objects.Domain.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.Security
+{
+ [Cmdlet(VerbsCommon.Add, "Rule", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class AddRuleCmdlet : BasePSCmdlet
+ {
+ private string _direction;
+ private string _etherType;
+ private string _portRangeMax;
+ private string _portRangeMin;
+ private string _protocol;
+ private string _remoteGroupId;
+ private string _remoteIPPrefix;
+ private string _securityGroupId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+//add-rule -ipr "iprTest" -IP "100.0.0.0" -tp "80" -fp "81" -sg "2302"
+///
+//=========================================================================================
+ [Parameter(Position = 5, Mandatory = true, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Direction
+ {
+ get { return _direction; }
+ set { _direction = value; }
+ }
+//=========================================================================================
+///
+///
+// add-rule -ipr "iprTest" -IP "tcp" -tp "81" -fp "80"
+///
+//=========================================================================================
+ [Parameter(Position = 4, Mandatory = false, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("et")]
+ [ValidateNotNullOrEmpty]
+ public string EtherType
+ {
+ get { return _etherType; }
+ set { _etherType = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 2, Mandatory = true, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("max")]
+ [ValidateNotNullOrEmpty]
+ public string PortRangeMax
+ {
+ get { return _portRangeMax; }
+ set { _portRangeMax = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("min")]
+ [ValidateNotNullOrEmpty]
+ public string PortRangeMin
+ {
+ get { return _portRangeMin; }
+ set { _portRangeMin = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 3, Mandatory = true, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("p")]
+ [ValidateNotNullOrEmpty]
+ public string Protocol
+ {
+ get { return _protocol; }
+ set { _protocol = value; }
+ }
+//=========================================================================================
+///
+///
+//add-rule -ipr "iprTest" -IP "100.0.0.0" -tp "80" -fp "81" -sg "2302"
+///
+//=========================================================================================
+ [Parameter(Position = 5, Mandatory = true, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("sid")]
+ [ValidateNotNullOrEmpty]
+ public string SecurityGroupId
+ {
+ get { return _securityGroupId; }
+ set { _securityGroupId = value; }
+ }
+//=========================================================================================
+///
+///
+//add-rule -ipr "iprTest" -IP "100.0.0.0" -tp "80" -fp "81" -sg "2302"
+///
+//=========================================================================================
+ [Parameter(Position = 5, Mandatory = false, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("rgid")]
+ [ValidateNotNullOrEmpty]
+ public string RemoteGroupId
+ {
+ get { return _remoteGroupId; }
+ set { _remoteGroupId = value; }
+ }
+//=========================================================================================
+///
+///
+//add-rule -ipr "iprTest" -IP "100.0.0.0" -tp "80" -fp "81" -sg "2302"
+///
+//=========================================================================================
+ [Parameter(Position = 5, Mandatory = false, ParameterSetName = "AddRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("ripp")]
+ [ValidateNotNullOrEmpty]
+ public string RemoteIPPrefix
+ {
+ get { return _remoteIPPrefix; }
+ set { _remoteIPPrefix = value; }
+ }
+
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewSecurityGroupRule rule = new NewSecurityGroupRule();
+ rule.PortRangeMin = this.PortRangeMin;
+ rule.PortRangeMax = this.PortRangeMax;
+ rule.Protocol = this.Protocol;
+ rule.SecurityGroupId = this.SecurityGroupId;
+ rule.RemoteGroupId = this.RemoteGroupId;
+ rule.RemoteIPPrefix = this.RemoteIPPrefix;
+ rule.EtherType = this.EtherType;
+ rule.Direction = this.Direction;
+
+ SecurityGroupRule result = this.RepositoryFactory.CreateSecurityRepository().SaveSecurityRule(rule);
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Security/NewSecurityGroupCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Security/NewSecurityGroupCmdlet.cs
new file mode 100644
index 0000000..239c8a1
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Security/NewSecurityGroupCmdlet.cs
@@ -0,0 +1,80 @@
+/* ============================================================================
+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.Management.Automation;
+using Openstack.Client.Powershell.Cmdlets.Common;
+using Openstack.Objects.Domain.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.Security
+{
+ [Cmdlet(VerbsCommon.New, "SecurityGroup", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class NewSecurityGroupCmdlet : BasePSCmdlet
+ {
+ private string _name;
+ private string _description;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ParameterSetName = "NewSecurityGroup", ValueFromPipelineByPropertyName = true, HelpMessage = "ww")]
+ [Alias("d")]
+ [ValidateNotNullOrEmpty]
+ public string Description
+ {
+ get { return _description; }
+ set { _description = value; }
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 0, ParameterSetName = "NewSecurityGroup", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "www")]
+ [Alias("n")]
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ NewSecurityGroup newGroup = new NewSecurityGroup();
+ newGroup.Description = this.Description;
+ newGroup.Name = this.Name;
+
+ SecurityGroup securityGroup = this.RepositoryFactory.CreateSecurityRepository().SaveSecurityGroup(newGroup);
+ this.UpdateCache();
+ }
+ #endregion
+ }
+
+}
diff --git a/Openstack.Client.Powershell/Cmdlets/Security/RemoveRuleCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Security/RemoveRuleCmdlet.cs
new file mode 100644
index 0000000..6812352
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Security/RemoveRuleCmdlet.cs
@@ -0,0 +1,62 @@
+/* ============================================================================
+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.Cmdlets.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using System.Collections;
+using Openstack.Objects.Domain.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.Security
+{
+ [Cmdlet(VerbsCommon.Remove, "Rule", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveRuleCmdlet : BasePSCmdlet
+ {
+ private string _securityGroupRuleId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ParameterSetName = "RemoveRule", ValueFromPipelineByPropertyName = true, HelpMessage = "cfgn")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string SecurityGroupRuleId
+ {
+ get { return _securityGroupRuleId; }
+ set { _securityGroupRuleId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ this.RepositoryFactory.CreateSecurityRepository().DeleteSecurityRule(this.SecurityGroupRuleId);
+ this.UpdateCache();
+ }
+ #endregion
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Cmdlets/Security/RemoveSecurityGroupCmdlet.cs b/Openstack.Client.Powershell/Cmdlets/Security/RemoveSecurityGroupCmdlet.cs
new file mode 100644
index 0000000..952ac85
--- /dev/null
+++ b/Openstack.Client.Powershell/Cmdlets/Security/RemoveSecurityGroupCmdlet.cs
@@ -0,0 +1,76 @@
+/* ============================================================================
+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.Objects.Domain.Security;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.DataAccess.Security;
+
+namespace Openstack.Client.Powershell.Cmdlets.Security
+{
+ [Cmdlet(VerbsCommon.Remove, "SecurityGroup", SupportsShouldProcess = true)]
+ [RequiredServiceIdentifierAttribute(Openstack.Objects.Domain.Admin.Services.Compute)]
+ public class RemoveSecurityGroupCmdlet : BasePSCmdlet
+ {
+ private string _securityGroupId;
+
+ #region Parameters
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ [Parameter(Position = 1, Mandatory = true, ParameterSetName = "RemoveSecurityGroup", ValueFromPipelineByPropertyName = true, HelpMessage = "ww")]
+ [Alias("id")]
+ [ValidateNotNullOrEmpty]
+ public string SecurityGroupId
+ {
+ get { return _securityGroupId; }
+ set { _securityGroupId = value; }
+ }
+ #endregion
+ #region Methods
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected override void ProcessRecord()
+ {
+ string id = this.TranslateQuickPickNumber(this.SecurityGroupId);
+ ISecurityRepository repository = this.RepositoryFactory.CreateSecurityRepository();
+
+ SecurityGroup group = repository.GetSecurityGroup(id);
+
+ if (group.Name != "default")
+ {
+ repository.DeleteSecurityGroup(id);
+ this.UpdateCache();
+ }
+ else
+ {
+ Console.WriteLine("");
+ Console.WriteLine("Invalid SecurityGroupId : Unable to delete the Default Security Group.");
+ Console.WriteLine("");
+ }
+ }
+ #endregion
+ }
+
+}
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.Http.Extensions.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.Http.Extensions.dll
new file mode 100644
index 0000000..265a4b5
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.Http.Extensions.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.Http.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.Http.dll
new file mode 100644
index 0000000..fd6942b
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.Http.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.QueryComposition.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.QueryComposition.dll
new file mode 100644
index 0000000..d86913b
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.QueryComposition.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.UnitTest.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.UnitTest.dll
new file mode 100644
index 0000000..d8180ba
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.UnitTest.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.dll
new file mode 100644
index 0000000..ee05901
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Client.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Test.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Test.dll
new file mode 100644
index 0000000..100b457
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.Test.dll differ
diff --git a/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.dll b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.dll
new file mode 100644
index 0000000..4896128
Binary files /dev/null and b/Openstack.Client.Powershell/Dependencies/Microsoft.ServiceModel.Http.dll differ
diff --git a/Openstack.Client.Powershell/Deployment/Aliases.txt b/Openstack.Client.Powershell/Deployment/Aliases.txt
new file mode 100644
index 0000000..87e8b52
Binary files /dev/null and b/Openstack.Client.Powershell/Deployment/Aliases.txt differ
diff --git a/Openstack.Client.Powershell/Deployment/ApacheLicense.rtf b/Openstack.Client.Powershell/Deployment/ApacheLicense.rtf
new file mode 100644
index 0000000..9114d6b
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ApacheLicense.rtf
@@ -0,0 +1,170 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f39\fbidi \fmodern\fcharset0\fprq1{\*\panose 020b0609020204030204}Consolas;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
+{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f410\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f411\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\f413\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f414\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f417\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f418\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\f430\fbidi \fmodern\fcharset238\fprq1 Consolas CE;}{\f431\fbidi \fmodern\fcharset204\fprq1 Consolas Cyr;}{\f433\fbidi \fmodern\fcharset161\fprq1 Consolas Greek;}{\f434\fbidi \fmodern\fcharset162\fprq1 Consolas Tur;}
+{\f437\fbidi \fmodern\fcharset186\fprq1 Consolas Baltic;}{\f438\fbidi \fmodern\fcharset163\fprq1 Consolas (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
+{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
+{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
+\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap
+\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1
+\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{
+\s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs21\alang1025 \ltrch\fcs0 \f39\fs21\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 \slink16 \sunhideused Plain Text;}
+{\*\cs16 \additive \rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f39\fs21 \sbasedon10 \slink15 \slocked Plain Text Char;}}{\*\rsidtbl \rsid8006177\rsid10242273\rsid13443570}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1
+\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author tplummer}{\operator tplummer}{\creatim\yr2012\mo9\dy6\hr10\min42}{\revtim\yr2012\mo9\dy6\hr10\min42}{\version2}{\edmins1}{\nofpages1}{\nofwords86}{\nofchars494}{\nofcharsws579}{\vern49273}}
+{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1501\margr1502\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1501\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale210\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot13443570\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid1316550\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid8006177 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8006177 Copyright }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8006177 2012 Hewlett-Packard}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8006177
+\par Licensed under the Apache License, Version 2.0 (the "License");
+\par you may not use this file except in compliance with the License.
+\par You may obtain a copy of the License at
+\par http://www.apache.org/licenses/LICENSE-2.0
+\par Unless required by applicable law or agreed to in writing, software
+\par distributed under the License is distributed on an "AS IS" BASIS,
+\par WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+\par See the License for the specific language governing permissions and
+\par limitations under the License.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid10242273\charrsid8006177
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
+7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
+615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
+79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
+5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
+999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
+699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
+8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
+0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
+9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
+15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
+3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
+32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
+f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
+e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
+fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
+ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
+a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
+399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
+4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
+0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
+c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
+689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
+5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
+aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
+316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
+545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
+c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
+0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
+8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
+d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
+1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
+bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
+a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
+0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
+0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
+00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
+\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
+\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
+4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000090e7
+0a31468ccd01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}}
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/ApacheLicense.txt b/Openstack.Client.Powershell/Deployment/ApacheLicense.txt
new file mode 100644
index 0000000..62a1964
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ApacheLicense.txt
@@ -0,0 +1,15 @@
+ Copyright 2012 Hewlett-Packard
+
+ The Migrate-Drive cmdlet is licensed under the following agreement
+
+ 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.
diff --git a/Openstack.Client.Powershell/Deployment/CLI.config b/Openstack.Client.Powershell/Deployment/CLI.config
new file mode 100644
index 0000000..a884916
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/CLI.config
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/CLI.config.example b/Openstack.Client.Powershell/Deployment/CLI.config.example
new file mode 100644
index 0000000..8445b81
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/CLI.config.example
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/CLIManifest.psd1 b/Openstack.Client.Powershell/Deployment/CLIManifest.psd1
new file mode 100644
index 0000000..4e9bf61
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/CLIManifest.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="OpenstackShell.format.ps1xml"
+FileList='CLI.config'
+RequiredAssemblies = 'Openstack.dll', 'Openstack.Common.dll'
+
+}
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/CredentialList.xml b/Openstack.Client.Powershell/Deployment/CredentialList.xml
new file mode 100644
index 0000000..778162c
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/CredentialList.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/DevProfile.ps1 b/Openstack.Client.Powershell/Deployment/DevProfile.ps1
new file mode 100644
index 0000000..2f7e147
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/DevProfile.ps1
@@ -0,0 +1,79 @@
+# ---------------------------------------------------------------
+# Set up the default windows size and color....
+# ---------------------------------------------------------------
+#$DebugPreference=$VerbosePreference="Continue"
+#$DebugPreference = "Continue"
+$a = (Get-Host).UI.RawUI
+$b = $a.WindowSize
+$b.Width = 109
+$b.Height = 61
+$a.WindowSize = $b
+cls
+# -----------------------------------------------------------------
+# Register known providers, write out welcome and status messages..
+# -----------------------------------------------------------------
+$a.BackgroundColor = "black"
+Echo ''
+$a.ForegroundColor = "gray"
+Echo '========================================================================================'
+$a.ForegroundColor = "yellow"
+Echo 'Welcome to the OpenStack Powershell Environment.333'
+$a.ForegroundColor = "gray"
+Echo '========================================================================================'
+Echo ''
+$a.ForegroundColor = "green"
+echo ' ==> Registering Providers...'
+
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+# ACTION REQUIRED! ==> Substitute the example CD commands path below to match your setup. This should be the final output of the Solution as dictated by the
+# $(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
+cd Builds:
+cd 1-3-4-5
+
+
+#cd OpenStack:
+#cd Networks
+#get-sp
+
+# ---------------------------------------------------------------
+# Let the User know what's going on..
+# ---------------------------------------------------------------
+
+echo ' ==> Applying Command Aliases...'
+echo ' ==> Registering Views...'
+echo ''
+
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+# Issue any startup commands you would like to execute after everything loads.
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+#cd BlockStorage
+#cd Volumes
+#ls
+
+# ---------------------------------------------------------------
+# Reset Shell to default colors..
+# ---------------------------------------------------------------
+#$a.ForegroundColor = "yellow"
+echo 'Ready..'
+#$a.ForegroundColor = "green"
+echo ''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/DevProfile.ps1.example b/Openstack.Client.Powershell/Deployment/DevProfile.ps1.example
new file mode 100644
index 0000000..dde1b36
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/DevProfile.ps1.example
@@ -0,0 +1,73 @@
+# ---------------------------------------------------------------
+# Set up the default windows size and color....
+# ---------------------------------------------------------------
+ #$DebugPreference=$VerbosePreference="Continue"
+ #$DebugPreference = "Continue"
+ $a = (Get-Host).UI.RawUI
+ $b = $a.WindowSize
+ $b.Width = 109
+ $b.Height = 61
+ $a.WindowSize = $b
+ cls
+# -----------------------------------------------------------------
+# Register known providers, write out welcome and status messages..
+# -----------------------------------------------------------------
+ $a.BackgroundColor = "black"
+ Echo ''
+ $a.ForegroundColor = "gray"
+ Echo '========================================================================================'
+ $a.ForegroundColor = "yellow"
+ Echo 'Welcome to the OpenStack Powershell Environment.'
+ $a.ForegroundColor = "gray"
+ Echo '========================================================================================'
+ Echo ''
+ $a.ForegroundColor = "green"
+ echo ' ==> Registering Providers...'
+
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+# ACTION REQUIRED! ==> Substitute the example CD commands path below to match your setup. This should be the final output of the Solution as dictated by the
+# $(TargetDir) macro in the Post-Build Script.
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ # cd 'Your Target Directory Here!'...
+
+ import-module .\CLIManifest.psd1 -DisableNameChecking
+ cd OpenStack:
+
+# ---------------------------------------------------------------
+# Let the User know what's going on..
+# ---------------------------------------------------------------
+
+ echo ' ==> Applying Command Aliases...'
+ echo ' ==> Registering Views...'
+ echo ''
+
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+# Issue any startup commands you would like to execute after everything loads.
+# -----------------------------------------------------------------------------------------------------------------------------------------------------------
+ #cd BlockStorage
+ #cd Volumes
+ #ls
+
+# ---------------------------------------------------------------
+# Reset Shell to default colors..
+# ---------------------------------------------------------------
+ #$a.ForegroundColor = "yellow"
+ echo 'Ready..'
+ #$a.ForegroundColor = "green"
+ echo ''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/License.rtf b/Openstack.Client.Powershell/Deployment/License.rtf
new file mode 100644
index 0000000..b51380c
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/License.rtf
@@ -0,0 +1,217 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}
+{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}
+{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f60\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f61\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
+{\f63\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f64\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f65\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f66\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
+{\f67\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f68\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f410\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f411\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\f413\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f414\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f417\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f418\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}
+{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}
+{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025
+\ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}}{\*\pgptbl {\pgp
+\ipgp5\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp2\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp3\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp4\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid11606679\rsid12599557\rsid15035048}{\mmathPr\mmathFont34\mbrkBin0
+\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Travis Plummer}{\operator Travis Plummer}{\creatim\yr2014\mo2\dy11\hr13\min24}{\revtim\yr2014\mo2\dy11\hr13\min25}{\version1}{\edmins1}
+{\nofpages1}{\nofwords82}{\nofchars469}{\nofcharsws550}{\vern57435}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot11606679\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
+{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
+\pard\plain \ltrpar\ql \li0\ri0\widctlpar\tx916\tx1832\tx2748\tx3664\tx4580\tx5496\tx6412\tx7328\tx8244\tx9160\tx10076\tx10992\tx11908\tx12824\tx13740\tx14656\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11606679 \rtlch\fcs1
+\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang9\langfe1033\langnp9\insrsid11606679\charrsid11606679 Copyright }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\lang9\langfe1033\langnp9\insrsid11606679 2014 Openstack}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\lang9\langfe1033\langnp9\insrsid11606679\charrsid11606679
+\par
+\par Licensed under the Apache License, Version 2.0 (the "License");
+\par you may not use this file except in compliance with the License.
+\par You may obtain a copy of the License at
+\par
+\par http://www.apache.org/licenses/LICENSE-2.0
+\par
+\par Unless required by applicable law or agreed to in writing, software
+\par distributed under the License is distributed on an "AS IS" BASIS,
+\par WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+\par See the License for the specific language governing permissions and
+\par limitations under the License.
+\par }\pard \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid12599557
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100aa5225dfc60600008b1a0000160000007468656d652f7468656d652f
+7468656d65312e786d6cec595d8bdb46147d2ff43f08bd3bfe92fcb1c41b6cd9ceb6d94d42eca4e4716c8fadc98e344633de8d0981923c160aa569e943037deb
+43691b48a02fe9afd936a54d217fa17746b63c638fbb9b2585a5640d8b343af7ce997bafce1d4997afdc8fa87384134e58dc708b970aae83e3211b9178d2706f
+f7bbb99aeb7081e211a22cc60d778eb97b65f7c30f2ea31d11e2083b601ff31dd4704321a63bf93c1fc230e297d814c7706dcc920809384d26f951828ec16f44
+f3a542a1928f10895d274611b8bd311e932176fad2a5bbbb74dea1701a0b2e078634e949d7d8b050d8d1615122f89c0734718e106db830cf881df7f17de13a14
+7101171a6e41fdb9f9ddcb79b4b330a2628bad66d7557f0bbb85c1e8b0a4e64c26836c52cff3bd4a33f3af00546ce23ad54ea553c9fc29001a0e61a52917dda7
+dfaab7dafe02ab81d2438bef76b55d2e1a78cd7f798373d3973f03af40a97f6f03dfed06104503af4029dedfc07b5eb51478065e81527c65035f2d34db5ed5c0
+2b5048497cb8812ef89572b05c6d061933ba6785d77daf5b2d2d9caf50500d5975c929c62c16db6a2d42f758d2058004522448ec88f9148fd110aa3840940c12
+e2ec93490885374531e3305c2815ba8532fc973f4f1da988a01d8c346bc90b98f08d21c9c7e1c3844c45c3fd18bcba1ae4cdcb1fdfbc7cee9c3c7a71f2e89793
+c78f4f1efd9c3a32acf6503cd1ad5e7fffc5df4f3f75fe7afeddeb275fd9f15cc7fffed367bffdfaa51d082b5d85e0d5d7cffe78f1ecd5379ffff9c3130bbc99
+a0810eef930873e73a3e766eb10816a6426032c783e4ed2cfa2122ba45339e701423398bc57f478406fafa1c5164c1b5b019c13b09488c0d787576cf20dc0b93
+9920168fd7c2c8001e30465b2cb146e19a9c4b0b737f164fec9327331d770ba123dbdc018a8dfc766653d05662731984d8a07993a258a0098eb170e4357688b1
+6575770931e27a408609e36c2c9cbbc46921620d499f0c8c6a5a19ed9108f232b711847c1bb139b8e3b418b5adba8d8f4c24dc15885ac8f73135c27815cd048a
+6c2efb28a27ac0f791086d247bf364a8e33a5c40a6279832a733c29cdb6c6e24b05e2de9d7405eec693fa0f3c84426821cda7cee23c674649b1d06218aa6366c
+8fc4a18efd881f428922e7261336f80133ef10790e7940f1d674df21d848f7e96a701b9455a7b42a107965965872791533a37e7b733a4658490d08bfa1e71189
+4f15f73559f7ff5b5907217df5ed53cbaa2eaaa0371362bda3f6d6647c1b6e5dbc03968cc8c5d7ee369ac53731dc2e9b0decbd74bf976ef77f2fdddbeee7772f
+d82b8d06f9965bc574abae36eed1d67dfb9850da13738af7b9daba73e84ca32e0c4a3bf5cc8ab3e7b8690887f24e86090cdc2441cac64998f88488b017a229ec
+ef8bae7432e10bd713ee4c19876dbf1ab6fa96783a8b0ed8287d5c2d16e5a3692a1e1c89d578c1cfc6e15143a4e84a75f50896b9576c27ea51794940dabe0d09
+6d329344d942a2ba1c9441520fe610340b09b5b277c2a26e615193ee97a9da6001d4b2acc0d6c9810d57c3f53d30012378a242148f649ed2542fb3ab92f92e33
+bd2d984605c03e625901ab4cd725d7adcb93ab4b4bed0c99364868e566925091513d8c87688417d52947cf42e36d735d5fa5d4a02743a1e683d25ad1a8d6fe8d
+c579730d76ebda40635d2968ec1c37dc4ad9879219a269c31dc3633f1c4653a81d2eb7bc884ee0ddd95024e90d7f1e6599265cb4110fd3802bd149d520220227
+0e2551c395cbcfd24063a5218a5bb104827061c9d541562e1a3948ba99643c1ee3a1d0d3ae8dc848a7a7a0f0a95658af2af3f383a5259b41ba7be1e8d819d059
+720b4189f9d5a20ce0887078fb534ca33922f03a3313b255fdad35a685eceaef13550da5e3884e43b4e828ba98a77025e5191d7596c5403b5bac1902aa8564d1
+080713d960f5a01add34eb1a2987ad5df7742319394d34573dd35015d935ed2a66ccb06c036bb13c5f93d7582d430c9aa677f854bad725b7bed4bab57d42d625
+20e059fc2c5df70c0d41a3b69acca026196fcab0d4ecc5a8d93b960b3c85da599a84a6fa95a5dbb5b8653dc23a1d0c9eabf383dd7ad5c2d078b9af549156df3d
+f44f136c700fc4a30d2f81675470954af8f09020d810f5d49e24950db845ee8bc5ad0147ce2c210df741c16f7a41c90f72859adfc97965af90abf9cd72aee9fb
+e562c72f16daadd243682c228c8a7efacda50bafa2e87cf1e5458d6f7c7d89966fdb2e0d599467eaeb4a5e11575f5f8aa5ed5f5f1c02a2f3a052ead6cbf55625
+572f37bb39afddaae5ea41a5956b57826abbdb0efc5abdfbd0758e14d86b9603afd2a9e52ac520c8799582a45fabe7aa5ea9d4f4aacd5ac76b3e5c6c6360e5a9
+7c2c6201e155bc76ff010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f
+7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be
+9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980
+ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5b
+babac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e
+745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f
+2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f74
+68656d654d616e616765722e786d6c504b01022d0014000600080000002100aa5225dfc60600008b1a00001600000000000000000000000000d6020000746865
+6d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000d00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000cb0a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax371\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
+\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text;
+\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;
+\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;
+\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;
+\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;
+\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;
+\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;
+\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;
+\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;
+\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;
+\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;
+\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
+\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
+\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
+\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
+\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
+\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
+\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
+\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
+\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;}}{\*\datastore 010500000200000018000000
+4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000000c4
+b60a5f27cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}}
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1 b/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1
new file mode 100644
index 0000000..cb8fbd2
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/Microsoft.PowerShell_profile.ps1
@@ -0,0 +1,81 @@
+# ---------------------------------------------------------------
+# Set up support methods first..
+# ---------------------------------------------------------------
+
+ function is64bit() {
+ return ([IntPtr]::Size -eq 8)
+ }
+
+ function get-programfilesdir() {
+ if (is64bit -eq $true) {
+ (Get-Item "Env:ProgramFiles(x86)").Value
+ }
+ else {
+ (Get-Item "Env:ProgramFiles").Value
+ }
+ }
+# ---------------------------------------------------------------
+# Set up the default windows size and color....
+# ---------------------------------------------------------------
+
+ #$DebugPreference=$VerbosePreference="Continue"
+ #$DebugPreference = "Continue"
+ $a = (Get-Host).UI.RawUI
+ $b = $a.WindowSize
+ $b.Width = 109
+ $b.Height = 61
+ $a.WindowSize = $b
+ $a.BackgroundColor = "black"
+ $a.ForegroundColor = "green"
+
+ cls
+# ---------------------------------------------------------------
+# Register known providers, write out welcome and status messages..
+# -----------------------------------------------------------------
+
+ $a.BackgroundColor = "black"
+ Echo ''
+ $a.ForegroundColor = "gray"
+ Echo '========================================================================================'
+ $a.ForegroundColor = "yellow"
+ Echo 'Welcome to the OpenStack Powershell Environment.'
+ $a.ForegroundColor = "gray"
+ Echo '========================================================================================'
+ Echo ''
+ $a.ForegroundColor = "green"
+ echo ' ==> Registering Providers...'
+
+ $tempvar = get-programfilesdir
+ $tempvar = $tempvar + "\Openstack\OpenStack-Powershell"
+ cd $tempvar
+ import-module .\CLIManifest.psd1 -DisableNameChecking
+
+ echo ' ==> Applying Command Aliases...'
+ echo ' ==> Registering Views...'
+ echo ''
+
+# ---------------------------------------------------------------
+# Reset Shell to default colors..
+# ---------------------------------------------------------------
+
+ $a.ForegroundColor = "yellow"
+ echo 'Ready..'
+ $a.ForegroundColor = "green"
+ echo ''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml b/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml
new file mode 100644
index 0000000..5d1ee01
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/Openstack.Client.Powershell.dll-Help.xml
@@ -0,0 +1,9685 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copy-Id
+
+
+ This Cmdlet will copy a records Id column to the clipboard given a QuickPick Number.
+
+
+
+
+ Copy
+ Id
+
+
+
+
+ This Cmdlet will copy a records Id column to the clipboard given a QuickPick Number.
+
+
+
+
+
+
+
+
+
+
+
+
+ qp
+
+
+ The QuickPick Number of the row
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # copy-id 2
+
+
+ Description
+ -----------
+
+ This command will copy the Id of the record represented by QuickPickNumber 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Config
+
+
+ This Cmdlet will print out what config file entries the current session is running under.
+
+
+
+
+ Get
+ Config
+
+
+
+
+ This Cmdlet will print out what config file entries the current session is running under.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourstorageContainer:\>
+
+
+ # Get-Config
+
+
+ Description
+ -----------
+
+ Prints out settings for the current session.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Map-Drive
+
+
+ This Cmdlet will map a Container that someone else owns to your list of available drives.
+
+
+
+
+ Map
+ Drive
+
+
+
+
+ This Cmdlet will map a Container that someone else owns to your list of available drives.
+
+
+
+
+
+
+
+
+ s
+
+
+ The full Container path
+
+
+ string
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # map-drive https://objects.werr.net:443/v1/9153476658759/rgtest2
+
+
+ Description
+ -----------
+
+ Maps the rgtest2 Container to the list of available drives for the user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Drive
+
+
+ This Cmdlet will remove an existing mapped drive.
+
+
+
+
+ Map
+ Drive
+
+
+
+
+ This Cmdlet will remove an existing mapped drive.
+
+
+
+
+
+
+
+
+ s
+
+
+ The Container name
+
+
+ string
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # remove-drive rgtest
+
+
+ Description
+ -----------
+
+ removes the rgtest2 Container from the list of available drives.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Migrate-Drive
+
+
+ This Cmdlet is used migrate existing stores of data from external sources like S3, Dropbox and Skydrive to a target Container within OpenStack Object Storage.
+
+
+
+
+ Set
+ Config
+
+
+
+
+ This Cmdlet is used migrate existing stores of data from external sources like S3, Dropbox and Skydrive to a target Container within OpenStack Object Storage.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Migrate-Drive -p "S3" -sk "aa78676dhhh100" -ak "jhjhgu64332" -b "testb1", "testb2"
+
+
+ Description
+ -----------
+
+ Copies the testb1 and testb2 S3 Buckets to OpenStack Object Storage Containers of the same name. -sk = SecretKey -ak = AccessKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+ PS yourContainer:\>
+
+
+ # Migrate-Drive -p "S3" -sk "aa78676dhhh100" -ak "jhjhgu64332"
+
+
+ Description
+ -----------
+
+ This example omits the Buckets (-b) parameter which forces the cmdlet to migrate all S3 Buckets to OpenStack Object Storage Containers of the same name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 3
+
+
+ PS yourContainer:\>
+
+
+ # Migrate-Drive -p "Skydrive"
+
+
+ Description
+ -----------
+
+ Migrates the local Skydrive store over to a Container called "Skydrive"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 4
+
+
+ PS yourContainer:\>
+
+
+ # Migrate-Drive -p "Dropbox"
+
+
+ Description
+ -----------
+
+ Migrates the local Dropbox store over to a Container called "Dropbox"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-Config
+
+
+ This Cmdlet is used to change specific settings on a per session basis. In addition to this, all settings may be changed at once by supplying the path to a completely different config file.
+
+
+
+
+ Set
+ Config
+
+
+
+
+ This Cmdlet is used to change specific settings on a per session basis. In addition to this, all settings may be changed at once by supplying the path to a completely different config file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Set-Config -k "HttpTimeOut" -v "100"
+
+
+ Description
+ -----------
+
+ Changes the HttpTimeout setting to 100 miliseconds
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+ PS yourContainer:\>
+
+
+ # Set-Config -s "c:\testconfig.config"
+
+
+ Description
+ -----------
+
+ Replaces all current session settings with those defined within the testconfig.config file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 3
+
+
+ PS yourContainer:\>
+
+
+ # Set-Config -resercfg"
+
+
+ Description
+ -----------
+
+ Resets the current session settings to those defined within the default config file (CLI.config)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Uri
+
+
+ This cmdlet will print out the fully qualified URI of the resource that you supply with optional parameters which constrain the URIs validity to a timepsan..
+
+
+
+
+ Get
+ URI
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+ s
+
+
+ The Source Path to the StorageObject.
+
+
+ string
+
+
+ dv
+
+
+ The number of days the URI is considered valid (optional)
+
+
+ string
+
+
+ sv
+
+
+ The number of seconds the URI is considered valid (optional)
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # get-uri anothertest.txt
+
+
+ Description
+ -----------
+
+ This prints out the fully qualified URI for the anothertest.txt file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Notes
+
+
+
+ This cmdlet will pull a list of release notes from the server. You can also filter the notes to a specific version.
+
+
+
+
+
+ Get
+ Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+
+
+ Prints all release notes
+
+
+
+
+ string
+
+
+ v
+
+
+ Prints release notes for a specific version
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Get-Notes -all
+
+
+ Description
+ -----------
+
+ Prints the entire set of release notes from all releases.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # Get-Notes -v "2.0.0.0"
+
+
+ Description
+ -----------
+
+ Prints out the release notes for the 2.0.0.0 release only.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Catalog
+
+
+
+ This cmdlet will show the current Users service catalog that was retrieved when logging in. This catalog represents every service the user has authorization to use.
+
+
+
+
+
+ Get
+ Catalog
+
+
+
+
+
+
+
+
+
+
+
+
+
+ v
+
+
+ Verbose mode displays detailed information about each service that's available.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Get-Catalog
+
+
+ Description
+ -----------
+
+ Shows a simple listing of available services.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # Get-Catalog -v
+
+
+ Description
+ -----------
+
+ Shows a more detailed list of services with additional technical information.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Version
+
+
+
+ Shows the products version number.
+
+
+
+
+
+ Get
+ Version
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Get-Version
+
+
+ Description
+ -----------
+
+ Shows the products current version.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-FloatingIP
+
+
+ This Cmdlet will completely remove an existing Floating IP address.
+
+
+
+
+ Remove
+ FloatingIP
+
+
+
+
+ This Cmdlet will completely remove an existing Floating IP address.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier for the Floating IP address.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-floatingIP 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will delete the floatingIP with the id of 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Network
+
+
+ This Cmdlet will completely remove an existing Network.
+
+
+
+
+ Remove
+ Network
+
+
+
+
+ This Cmdlet will completely remove an existing Network.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Network
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-network -id 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+ Description
+ -----------
+
+ This command will delete the Network with the id of 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Port
+
+
+ This Cmdlet will completely remove an existing Port.
+
+
+
+
+ Remove
+ Port
+
+
+
+
+ This Cmdlet will completely remove an existing Port.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Port
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-port -id 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+ Description
+ -----------
+
+ This command will delete the Port with the id of 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Router
+
+
+ This Cmdlet will completely remove an existing Router.
+
+
+
+
+ Remove
+ Port
+
+
+
+
+ This Cmdlet will completely remove an existing Router.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Router
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-router 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+ Description
+ -----------
+
+ This command will delete the Router with the id of 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-RouterInterface
+
+
+ TThis Cmdlet will completely remove an existing relation between a Subnet and Router.
+
+
+
+
+ Remove
+ Port
+
+
+
+
+ This Cmdlet will completely remove an existing relation between a Subnet and Router.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Router
+
+
+ string
+
+
+
+ sid
+
+
+ The identifier of the Subnet.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-routerinterface -id 12857174-99cf-40e9-999e-fb0fa2e84898 -sid bd1c30f7-71f1-455e-b91e-8d03da7f5224
+
+
+ Description
+ -----------
+
+ This command will remove the association between Router 12857174-99cf-40e9-999e-fb0fa2e84898 and Subnet bd1c30f7-71f1-455e-b91e-8d03da7f5224
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Subnet
+
+
+ This Cmdlet will completely remove an existing Subnet.
+
+
+
+
+ Remove
+ Subnet
+
+
+
+
+ This Cmdlet will completely remove an existing Subnet.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Subnet
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # remove-Subnet 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+ Description
+ -----------
+
+ This command will delete the Subnet with the id of 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-FloatingIP
+
+
+ This Cmdlet will create a new FloatingIP.
+
+
+
+
+ New
+ FloatingIP
+
+
+
+
+ This Cmdlet will create a new FloatingIP.
+
+
+
+
+
+
+
+
+
+
+
+
+ pid
+
+
+ The identifier of the Port required to create the FloatingIP
+
+
+ string
+
+
+
+ nid
+
+
+ The identifier of the Network required to create the FloatingIP
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-FloatingIP -pid 12857174-99cf-40e9-999e-fb0fa2e84898 -nid bd1c30f7-71f1-455e-b91e-8d03da7f5224
+
+
+ Description
+ -----------
+
+ This command will create a new Floating IP address for Network 12857174-99cf-40e9-999e-fb0fa2e84898 and Port bd1c30f7-71f1-455e-b91e-8d03da7f5224
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Network
+
+
+ This Cmdlet will create a new Network.
+
+
+
+
+ New
+ Network
+
+
+
+
+ This Cmdlet will create a new Network.
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+ The name of the new Network
+
+
+ string
+
+
+
+ asu
+
+
+ Determines if the AdminStateUp flag is true or false.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-network "testNet1" -asu
+
+
+ Description
+ -----------
+
+ This command will create a new network called testNet1 with its AdminStateUp set to true.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Port
+
+
+ This Cmdlet will create a new Port.
+
+
+
+
+ New
+ Port
+
+
+
+
+ This Cmdlet will create a new Port.
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+ The name of the new Port
+
+
+ string
+
+
+
+ asu
+
+
+ Determines if the AdminStateUp flag is true or false.
+
+
+ string
+
+
+
+ nid
+
+
+ The id of the Network where the Port will exist.
+
+
+ string
+
+
+
+ did
+
+
+ The Ports DeviceId
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-port "testPort1" -nid bd1c30f7-71f1-455e-b91e-8d03da7f5224 -asu -did "sdf\etc"
+
+
+ Description
+ -----------
+
+ This command will create a new Port called testNet1 on Network bd1c30f7-71f1-455e-b91e-8d03da7f5224 with its AdminStateUp set to true and a Device = sdf/etc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Router
+
+
+ This Cmdlet will create a new Router.
+
+
+
+
+ New
+ Router
+
+
+
+
+ This Cmdlet will create a new Router.
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+ The name of the new Router
+
+
+ string
+
+
+
+ asu
+
+
+ Determines if the AdminStateUp flag is true or false.
+
+
+ string
+
+
+
+ egw
+
+
+ The id of the External Gateway Network Id.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-router "testRouter1" -asu -egw bd1c30f7-71f1-455e-b91e-8d03da7f5224
+
+
+ Description
+ -----------
+
+ This command will create a new Router called testRouter1 on External Network bd1c30f7-71f1-455e-b91e-8d03da7f5224 with its AdminStateUp set to true.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-RouterInterface
+
+
+ This Cmdlet will create a new Router.
+
+
+
+
+ New
+ RouterInterface
+
+
+
+
+ This Cmdlet will create a new RouterInterface.
+
+
+
+
+
+
+
+
+
+
+
+
+ rid
+
+
+ The Router Id
+
+
+ string
+
+
+
+ sid
+
+
+ The Subnet Id
+
+
+ string
+
+
+
+ pid
+
+
+ The Port Id
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-routerinterface -rid bd1c30f7-71f1-455e-b91e-8d03da7f5224 -pid c9e32588-5b69-4100-a1a6-fa49094ec0a8 -sid 7yuu9886-5b69-4100-a1a6-fa49094ec0a8
+
+
+ Description
+ -----------
+
+ This command will create a new Relationship between Router (bd1c30f7-71f1-455e-b91e-8d03da7f5224), Port (c9e32588-5b69-4100-a1a6-fa49094ec0a8) and Subnet (7yuu9886-5b69-4100-a1a6-fa49094ec0a8)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Subnet
+
+
+ This Cmdlet will create a new Subnet.
+
+
+
+
+ New
+ Subnet
+
+
+
+
+ This Cmdlet will create a new Subnet.
+
+
+
+
+
+
+
+
+
+
+
+
+ nid
+
+
+ The id of the Network Id.
+
+
+ string
+
+
+
+ ipv
+
+
+ Sets the IP Version
+
+
+ string
+
+
+
+ c
+
+
+ The CIDR value
+
+
+ string
+
+
+ a
+
+
+ A comma seperated list of Allocation Pools.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # new-subnet -nid bd1c30f7-71f1-455e-b91e-8d03da7f5224 -ipv 4 -c "10.0.6.0/24" -a "10.0.6.20", "10.0.6.22" , "10.0.6.26", "10.0.6.29"
+
+
+ Description
+ -----------
+
+ This command will create a new Subnet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-FloatingIP
+
+
+ This Cmdlet will update an existing FloatingIP.
+
+
+
+
+ Update
+ FloatingIP
+
+
+
+
+ This Cmdlet will update an existing FloatingIP.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Floating IP
+
+
+ string
+
+
+
+ pid
+
+
+ The identifier of the Port Id
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # update-FLoatingIP -fid 12857174-99cf-40e9-999e-fb0fa2e84898 -pid c9e32588-5b69-4100-a1a6-fa49094ec0a8
+
+
+ Description
+ -----------
+
+ This command will reassign the Floating IP (12857174-99cf-40e9-999e-fb0fa2e84898) to the new Port (c9e32588-5b69-4100-a1a6-fa49094ec0a8)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-Network
+
+
+ This Cmdlet will update an existing Network.
+
+
+
+
+ Update
+ Network
+
+
+
+
+ This Cmdlet will update an existing Network.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Network IP
+
+
+ string
+
+
+
+ n
+
+
+ The Networks name
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # update-Network -id 12857174-99cf-40e9-999e-fb0fa2e84898 -n "NewNameTest"
+
+
+ Description
+ -----------
+
+ This command will change the Network(12857174-99cf-40e9-999e-fb0fa2e84898) name to NewNameTest.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-Port
+
+
+ This Cmdlet will update an existing Port.
+
+
+
+
+ Update
+ Port
+
+
+
+
+ This Cmdlet will update an existing Port.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Port IP
+
+
+ string
+
+
+
+ did
+
+
+ The Device Id
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # update-Port -id 12857174-99cf-40e9-999e-fb0fa2e84898 -did "984456484-76cf-431t-66f-uyt5674567543"
+
+
+ Description
+ -----------
+
+ This command will change the Port(12857174-99cf-40e9-999e-fb0fa2e84898) device to the devie with Id = 984456484-76cf-431t-66f-uyt5674567543
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-Router
+
+
+ This Cmdlet will update an existing Router.
+
+
+
+
+ Update
+ Router
+
+
+
+
+ This Cmdlet will update an existing Router.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Router
+
+
+ string
+
+
+
+ nid
+
+
+ The identifier of the Network
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # update-Router -id 12857174-99cf-40e9-999e-fb0fa2e84898 -nid c9e32588-5b69-4100-a1a6-fa49094ec0a8
+
+
+ Description
+ -----------
+
+ This command will reassign the Router(12857174-99cf-40e9-999e-fb0fa2e84898) to Network (c9e32588-5b69-4100-a1a6-fa49094ec0a8)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-Subnet
+
+
+ This Cmdlet will update an existing Subnet.
+
+
+
+
+ Update
+ Subnet
+
+
+
+
+ This Cmdlet will update an existing Subnet.
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ The identifier of the Subnet
+
+
+ string
+
+
+
+ egw
+
+
+ The identifier of the External Network Gateway
+
+
+ string
+
+
+
+ n
+
+
+ The new name of the Subnet
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # update-Subnet -id 12857174-99cf-40e9-999e-fb0fa2e84898 -egw c9e32588-5b69-4100-a1a6-fa49094ec0a8 -n "NewSubnetName"
+
+
+ Description
+ -----------
+
+ This command will reassign the Subnet(12857174-99cf-40e9-999e-fb0fa2e84898) to External Network (c9e32588-5b69-4100-a1a6-fa49094ec0a8) with the new name of "NewSubnetName"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Metadata
+
+
+ This Cmdlet will list out the Metadata entries assigned to the supplied resource. You can currently list metadata assigned to Servers, Storage Objects , Containers and CDN Containers.
+
+
+
+
+ Get
+ Metadata
+
+
+
+
+ Many resources can have zero to many custom meta-data entries assigned to them. This is essentially a list of Key Value Pairs attached to the resource that you may use for whatever you would like.
+
+
+
+
+
+
+
+
+
+
+
+
+ sp
+
+
+ The path to the remote Storage Object. Paths may be expressed as fully qualified or relative to the current location in the store.
+
+
+ string
+
+
+
+ cn
+
+
+ The Container Name.
+
+
+ string
+
+
+
+ cdn
+
+
+ The CDN Container Name.
+
+
+ string
+
+
+
+ sid
+
+
+ The Server ID.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Get-metadata test.txt
+
+
+ Description
+ -----------
+
+ This command will print out a list of name value pairs assigned to the. For details on how to add meta-data elements see the Set-Metadata Cmdlet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # Get-metadata -sid 23465
+
+
+ Description
+ -----------
+
+ This command will print out all Metadata entries for the Server with an ID = 23465.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 3
+
+
+
+
+
+ # Get-metadata -cn "Marketing"
+
+
+ Description
+ -----------
+
+ This command will print out all Metadata entries for the Marketing Container.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 4
+
+
+
+
+
+ # Get-metadata -cdn "Marketing"
+
+
+ Description
+ -----------
+
+ This command will print out all Metadata entries for the Marketing CDN Container.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-Metadata
+
+
+ This Cmdlet can be used to add meta-data elements to an existing resource.
+
+
+
+
+ Set
+ Metadata
+
+
+
+
+ Resources can have zero to many custom meta-data entries assigned to them. This is essentially a list of Key Value Pairs attached to the object that you may use for whatever you would like.
+
+
+
+
+
+ Set-Metadata [-sp] [-sid] [-cdn] -md
+
+
+
+
+
+
+ sp
+
+
+ The path to a remote Storage Object. Paths may be expressed as fully qualified or relative to the current location in the store.
+
+
+ string
+
+
+ md
+
+
+ This is a comma delimited set of Name Value Pairs enclosed in quotes. the Key and Values are delimited by the pipe symbol."
+
+
+ string
+
+
+
+ sid
+
+
+ The Server Id
+
+
+ string
+
+
+
+ cdn
+
+
+ The CDN Container name.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Set-metadata test.txt -md "Author|Tom", "Editor|Sam"
+
+
+ Description
+ -----------
+
+ This example shows us adding two seperate KVPs to the test.txt file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # Set-metadata -sid 1345 -md "Author|Tom", "Editor|Sam"
+
+
+ Description
+ -----------
+
+ This example applies the Key Value Pair (-md argument) to the Server with an Id = 1345.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 3
+
+
+
+
+
+ # Set-metadata -cdn "Marketing" -md "Author|Tom", "Editor|Sam"
+
+
+ Description
+ -----------
+
+ This example applies the Key Value Pair (-md argument) to the CDN Container called Marketing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-URI
+
+
+ This Cmdlet will show the fully qualified URI of an object in storage.
+
+
+
+
+ Get
+ Metadata
+
+
+
+
+
+
+
+
+
+
+ s
+
+
+
+
+
+
+ s
+
+
+ The path to the remote Storage Object. Paths may be expressed as fully qualified or relative to the current location in the store.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Get-URI test.xml
+
+
+ Description
+ -----------
+
+ This example shows the fully qualifed URI for the test.xml file located in the current directory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Item
+
+
+ This Cmdlet remove an object in storage.
+
+
+
+
+ Remove
+ Item
+
+
+
+
+
+
+
+
+
+
+ s
+
+
+
+
+
+
+ t
+
+
+ The path to the remote Storage Object. Paths may be expressed as fully qualified or relative to the current location in the store.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # Remove-Item test.xml
+
+
+ Description
+ -----------
+
+ This example the test.xml file located in the current directory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-Scope
+
+
+ This sets a Containers scope to public.
+
+
+
+
+ Get
+ Metadata
+
+
+
+
+ To allow users other than the owner of a Container to access resources you need to set the Containers scope to Public with this cmdlet.
+
+
+
+
+
+ SourcePath
+
+
+
+
+
+
+ Name
+
+
+ The Containers name.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ #set-scope testContainer -s public
+
+
+ Description
+ -----------
+
+ This example shows us changing the testContainers scope to public.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Container
+
+
+ Removes the specified Container from the system optionally forcing the operation to complete without confirmation.
+
+
+
+
+ Remove
+ Container
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ The name of the Container to remove.
+
+
+ string
+
+
+
+ ForceDelete
+
+
+ This switch forces the Container to be removed without any confirmation prompt.
+
+
+ string
+
+
+ cdn
+
+
+ Removes any associated CDN entry when the Container is removed.
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # remove-container testContainer
+
+
+ Description
+ -----------
+
+ Removes testContainer from the system but prompts the user for confirmation before continuing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+ PS yourContainer:\>
+
+
+ # remove-container testContainer -fd
+
+
+ Description
+ -----------
+
+ Forces the system to delete the specified Container without confirmation from the user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Container
+
+
+ This Cmdlet create a new storage Container.
+
+
+
+
+ New
+ Container
+
+
+
+
+ You must be a registered user of the OpenStack Cloud Services platform in order to perform this operation because it requires a valid access key id to authenticate the request. Therefore anonymous requests can not create Containers. When you create a Container, you become the Container owner.
+
+
+
+
+
+ Name
+
+
+
+
+
+ Name
+
+
+ The name of the Container to create.
+
+
+
+
+ string
+
+
+ Url
+
+
+ The url to a Shared Container.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+ PS yourContainer:\>
+
+
+ # New-Container marketing
+
+
+ Description
+ -----------
+
+ This command will create a new Container named marketing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+ PS yourContainer:\>
+
+
+ # New-Container https://region-a.geo-1.objects.Openstacksvc.com/v1/AUTH_2485a207-71a4-4429-9e24-f7bf49e207fc/testcon
+
+
+ Description
+ -----------
+
+ This command will allow use of the Shared Container named testcon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Volume
+
+
+ This Cmdlet creates a new Block Storage Volume.
+
+
+
+
+ New
+ Volume
+
+
+
+
+
+
+
+
+
+
+ New-Volume
+
+
+
+
+
+ svid
+
+
+ The Source Volume Id to derive this volume from. The Source Volume Id must reside in the same AZ as the one you are creating.
+
+
+
+
+ string
+
+
+ az
+
+
+ The target Availability Zone to create the Volume in.
+
+
+
+
+ string
+
+
+ Name
+
+
+ The name of the Volume to create.
+
+
+
+
+ string
+
+
+ Description
+
+
+ A quick description of the Volumes purpose.
+
+
+
+
+ string
+
+
+ Size
+
+
+ The size (in Gb) of the Volume.
+
+
+
+
+ string
+
+
+ Metadata
+
+
+ Additional Metadata associated with the Volume. This will be a comma delimited set of name value pairs which are themselves pipe delimited.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-Volume "TestVolume" "This is a simple Volume test" 20
+
+
+ Description
+ -----------
+
+ This command will create a new 20 gig Volume.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # New-Volume "TestVolume" "This is a simple Volume test" 20 "test|data", "another|test"
+
+
+ Description
+ -----------
+
+ This command will create a new 20 gig Volume with additional metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Volume
+
+
+ This Cmdlet deletes an existing Block Storage Volume.
+
+
+
+
+ Remove
+ Volume
+
+
+
+
+
+
+
+
+
+
+ Remove-Volume
+
+
+
+
+
+ VolumeId
+
+
+ The Volumes unique identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-Volume 12857174-99cf-40e9-999e-fb0fa2e84898
+
+
+ Description
+ -----------
+
+ This command will remove a existing Volume with an Id = 12857174-99cf-40e9-999e-fb0fa2e84898.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Attach-Volume
+
+
+ This Cmdlet associates a Volume with an existing Server.
+
+
+
+
+ Attach
+ Volume
+
+
+
+
+
+
+
+
+
+
+ Attach-Volume
+
+
+
+
+
+ id
+
+
+ The id of the target Server.
+
+
+
+
+ string
+
+
+ VolumeId
+
+
+ The Volumes unique identifier.
+
+
+
+
+ string
+
+
+ Device
+
+
+ The associations Device name.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Attach-Volume -s 12857174-99cf-40e9-999e-fb0fa2e84898 -v 7da74520-9d5e-427b-a508-213c84e69616 "/dev/vdp"
+
+
+ Description
+ -----------
+
+ This command will associate Volume 7da74520-9d5e-427b-a508-213c84e69616 to Server 12857174-99cf-40e9-999e-fb0fa2e84898 with an assigned device name of /dev/vdX.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Detach-Volume
+
+
+ This Cmdlet disassociates a Volume with an existing Server.
+
+
+
+
+ Detach
+ Volume
+
+
+
+
+
+
+
+
+
+
+ Detach-Volume
+
+
+
+
+
+ Id
+
+
+ The id of the target Server.
+
+
+
+
+ string
+
+
+ VolumeId
+
+
+ The Volumes unique identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Detach-Volume -v 7da74520-9d5e-427b-a508-213c84e69616 -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will disassociate Volume a508 from Server 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Snapshot
+
+
+ This Cmdlet creates a new Block Storage Snapshot.
+
+
+
+
+ New
+ Snapshot
+
+
+
+
+
+
+
+
+
+
+ New-Snapshot
+
+
+
+
+
+ Name
+
+
+ The name of the Snapshot to create.
+
+
+
+
+ string
+
+
+ Description
+
+
+ A quick description of the Snapshots contents.
+
+
+
+
+ string
+
+
+ VolumeId
+
+
+ The Id of the Volume that we're taking the snapshot of.
+
+
+
+
+ string
+
+
+ Force
+
+
+ Force
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-Snapshot -n "TestSnapshot" -d "This is a simple Snapshot test" -v 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will create a new snapshot of Volume 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Snapshot
+
+
+ This Cmdlet deletes an existing Block Storage Snapshot.
+
+
+
+
+ Remove
+ Snapshot
+
+
+
+
+
+
+
+
+
+
+ Remove-Snapshot
+
+
+
+
+
+ SnapshotId
+
+
+ The Snapshots unique identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-Snapshot -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will remove a existing Snapshot with an Id = 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Keypair
+
+
+ This Cmdlet creates a new keypair for the user.
+
+
+
+
+ New
+ Keypair
+
+
+
+
+
+
+
+
+
+
+ New-Keypair
+
+
+
+
+
+ Name
+
+
+ The name of the Keypair to create.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-Keypair "TestKey"
+
+
+ Description
+ -----------
+
+ This command will create a new Keypair named TestKey.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Keypair
+
+
+ This Cmdlet deletes a previously created keypair for the user.
+
+
+
+
+ Remove
+ Keypair
+
+
+
+
+
+
+
+
+
+
+ Remove-Keypair
+
+
+
+
+
+ Name
+
+
+ The name of the Keypair to delete.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-Keypair "TestKey"
+
+
+ Description
+ -----------
+
+ This command will delete an existing Keypair named TestKey.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Disassociate-IP
+
+
+ This Cmdlet releases a previously allocated IP address.
+
+
+
+
+ Disassociate
+ IP
+
+
+
+
+
+
+
+
+
+
+ Disassociate-IP
+
+
+
+
+
+ ip
+
+
+ The IP address to release.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Disassociate-IP 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will release a previously allocated IP address.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UnAssign-IP
+
+
+ This Cmdlet assigns an existing IP address to an existing Server.
+
+
+
+
+ UnAssign
+ IP
+
+
+
+
+
+
+
+
+
+
+ UnAssign-IP
+
+
+
+
+
+ ip
+
+
+ The IP address to disassociate.
+
+
+
+
+ string
+
+
+ sid
+
+
+ The Server Id that will be disassociated from the supplied IP address.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ #Unassign-IP "192.168.110.45" -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will remove the supplied IP address from server 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assign-IP
+
+
+ This Cmdlet assigns an existing IP address to an existing Server.
+
+
+
+
+ Assign
+ IP
+
+
+
+
+
+
+
+
+
+
+ Assign-IP
+
+
+
+
+
+ ip
+
+
+ The IP address to assign.
+
+
+
+
+ string
+
+
+ sid
+
+
+ The Server Id that will be assigned to.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ #Assign-IP "192.168.110.45" -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will assign the supplied IP address to server 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-CDN
+
+
+ This Cmdlet will create a new CDN entry for the specified Container.
+
+
+
+
+ New
+ CDN
+
+
+
+
+
+
+
+
+
+
+ New-CDN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-CDN -n "TestContainer"
+
+
+ Description
+ -----------
+
+ Associates a new CDN entry for the existing Container called TestContainer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-CDN
+
+
+ This Cmdlet will remove a CDN entry for the specified Container.
+
+
+
+
+ Remove
+ CDN
+
+
+
+
+
+
+
+
+
+
+ Remove-CDN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-CDN -n "TestContainer"
+
+
+ Description
+ -----------
+
+ Disassociates the CDN entry for existing container TestContainer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ List-CDN
+
+
+ This Cmdlet will list out all Containers that have associated CDN entries.
+
+
+
+
+ List
+ CDN
+
+
+
+
+
+
+
+
+
+
+ List-CDN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # List-CDN
+
+
+ Description
+ -----------
+
+ This cmdlet will list out all Containers with associated CDN entries.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-Zone
+
+
+ This Cmdlet will force subsequent cmdlets to utilize the Availability Zone supplied.
+
+
+
+
+ Set
+ Zone
+
+
+
+
+
+
+
+
+
+
+ Set-Zone
+
+
+
+
+
+ z
+
+
+ The Availability ZoneID to be set.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Set-Zone 1
+
+
+ Description
+ -----------
+
+ This command will cause all susequent Compute related IO to be directed to the AZ-2 Zone which has the Id of 1. The Id's for each Zone can be found by issueing the Get-Zones cmdlet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-ZoneColor
+
+
+ This command will set all output to a specific color when the User selects the Zone via Set-Zone.
+
+
+
+
+ Set
+ ZoneColor
+
+
+
+
+
+
+
+
+
+
+ Set-ZoneColor
+
+
+
+
+
+ z
+
+
+ The Availability ZoneID to be set.
+
+
+
+
+ string
+
+
+ c
+
+
+ The color for the zones output. Valid values are "Black", "Blue", "Cyan", "DarkBlue", "DarkCyan", "DarkGray", "DarkGreen", "DarkMagenta", "DarkRed", "DarkYellow", "Gray", "Green", "Magenta", "Red", "White", and "Yellow".
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Set-ZoneColor -z 1 -c Green
+
+
+ Description
+ -----------
+
+ This command will set all output to Green when the User selects the Zone via Set-Zone.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-Zone
+
+
+ This Cmdlet will current Availability Zone being used.
+
+
+
+
+ Get
+ Zone
+
+
+
+
+
+
+
+
+
+
+ Get-Zone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Get-Zone
+
+
+ Description
+ -----------
+
+ This command will simply show the current Availability Zone in use.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Associate-IP
+
+
+ This Cmdlet will request a new Floating IP address from the server.
+
+
+
+
+ Associate
+ IP
+
+
+
+
+
+
+
+
+
+
+ Associate-IP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Associate-IP
+
+
+ Description
+ -----------
+
+ Request a new Floating IP address from the server.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add-Rule
+
+
+ This Cmdlet creates a new Security Group Rule and assigns it to an existing Security Group
+
+
+
+
+ Add
+ Rule
+
+
+
+
+
+
+
+
+
+
+ Add-Rule
+
+
+
+
+
+ d
+
+
+ Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ‘ingress’ security group rule matches traffic that is incoming (ingress) for that instance. An ‘egress’ rule is applied to traffic leaving the instance.
+
+
+
+
+ string
+
+
+ max
+
+
+ The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
+
+
+
+
+ string
+
+
+ min
+
+
+ The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
+
+
+
+
+ string
+
+
+ p
+
+
+ The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
+
+
+
+
+ string
+
+
+ rgid
+
+
+ The remote group ID to be associated with this security group rule.
+
+
+
+
+ string
+
+
+ ripp
+
+
+ The remote IP prefix to be associated with this security group rule.
+
+
+
+
+ string
+
+
+ sgid
+
+
+ The Security GroupId used to apply this rule.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Add-Rule -min "80" -max "85" -d "ingress" -et -p icmp IPv4 -sgid 2076db17-a522-4506-91de-c6dd8e837028
+
+
+ Description
+ -----------
+
+ This will create a new Security Group Rule affecting the tcp protocol from port 80 to 85 and assign it to SecurityGroup 2076db17-a522-4506-91de-c6dd8e837028.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Rule
+
+
+ This Cmdlet will delete an existing Security Group Rule.
+
+
+
+
+ Remove
+ Rule
+
+
+
+
+
+
+
+
+
+
+ Remove-Rule
+
+
+
+
+
+ id
+
+
+ The Security GroupRuleId used to remove the rule.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-Rule -id 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ Remove the SecurityGroupRule with an Id of 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-SecurityGroup
+
+
+ This Cmdlet creates a new Security Group.
+
+
+
+
+ New
+ SecurityGroup
+
+
+
+
+
+
+
+
+
+
+ New-SecurityGroup
+
+
+
+
+
+ n
+
+
+ The name of the new Security Group.
+
+
+
+
+ string
+
+
+ d
+
+
+ A brief description of the groups purpose.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-SecurityGroup -n "TestGroup" -d "SomeDescription"
+
+
+ Description
+ -----------
+
+ This command will create a simple test Security Group.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-SecurityGroup
+
+
+ This Cmdlet will delete an existing Security Group.
+
+
+
+
+ Remove
+ SecurityGroup
+
+
+
+
+
+
+
+
+
+
+ Remove-SecurityGroup
+
+
+
+
+
+ id
+
+
+ The identifier used to remove the Security Group.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-SecurityGroup -id 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ Remove the Security Group with an Id of 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add-Metadata
+
+
+ This Cmdlet associates a set of key value pairs with a Server.
+
+
+
+
+ Add
+ Metadata
+
+
+
+
+
+
+
+
+
+
+ Add-Metadata
+
+
+
+
+
+ md
+
+
+ A pipe delimited set of Name Value Pairs seperated by commas. "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" etc..
+
+
+
+
+ string
+
+
+ s
+
+
+ The identifier (ServerId) used to associate this metadata with. If your currently viewing a Servers details this parameter may be ommited as it's supplied for you.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Add-Metadata -md "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will add threee Name Value Pairs to Server 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Server
+
+
+ This Cmdlet creates a new Server.
+
+
+
+
+ New
+ Server
+
+
+
+
+
+
+
+
+
+
+ New-Server
+
+
+
+
+
+ nid
+
+
+ A Comma seperated list of targeted network Ids.
+
+
+
+
+ string
+
+
+ az
+
+
+ Ther Servers Availability Zone
+
+
+
+
+ string
+
+
+
+ n
+
+
+ The Servers name.
+
+
+
+
+ string
+
+
+ i
+
+
+ The identifier (ImageRefId) used to define this Server.
+
+
+
+
+ string
+
+
+ k
+
+
+ The name of a keypair to assign to the newly created Server.
+
+
+
+
+ string
+
+
+ sg
+
+
+ A comma delimited set of quoted SecurityGroup names that are to be applied to the newly created Server.
+
+
+
+
+ string
+
+
+ f
+
+
+ The identifier (FlavorRefId) used to define this Server.
+
+
+
+
+ string
+
+
+ p
+
+
+ A password may be specified when creating the server via this optional parameter. If a password is not specified, a randomly generated password will be assigned and returned in the response.
+
+
+
+
+ string
+
+
+ ip4
+
+
+ ip4 based access address.
+
+
+
+
+ string
+
+
+ ip6
+
+
+ ip6 based access address.
+
+
+
+
+ string
+
+
+ md
+
+
+ A pipe delimited set of Name Value Pairs seperated by commas. "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" etc..
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-Server -n "TestServer" -p "gooblygook" -i "2111" -f "100" -md "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ This command will create a new server with some metadata.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 2
+
+
+
+
+
+ # New-Server -n "TestServer" -p "gooblygook" -i "2111" -f "100" -s "2133" -k "testkey"
+
+
+ Description
+ -----------
+
+ This command will create a new server using the testkey keypair name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reboot-Server
+
+
+ This cmdlet allows for either a soft or hard reboot of a server. With a soft reboot, the operating system is signaled to restart, which allows for a graceful shutdown of all processes. A hard reboot is the equivalent of power cycling the server.
+
+
+
+
+ Reboot
+ Server
+
+
+
+
+
+
+
+
+
+
+ Reboot-Server
+
+
+
+
+
+ id
+
+
+ The Servers identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ t
+
+
+
+
+
+ With a soft reboot (SOFT), the operating system is signaled to restart, which allows for a graceful shutdown of all processes. A hard reboot (HARD) is the equivalent of power cycling the server.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Reboot-Server -s 4ee64397-1253-473c-a81d-bc23dceeef31 -t "SOFT"
+
+
+ Description
+ -----------
+ Perform a soft reboot on the specified server
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-Server
+
+
+ This cmdlet deletes an existing Server.
+
+
+
+
+ Remove
+ Server
+
+
+
+
+
+
+
+
+
+
+ Remove-Server
+
+
+
+
+
+ id
+
+
+ The Servers identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ t
+
+
+
+
+
+ Deletes an existing Server.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Remove-Server -s 4ee64397-1253-473c-a81d-bc23dceeef31
+
+
+ Description
+ -----------
+
+ Deletes the server with the identifier 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reset-Password
+
+
+ This cmdlet resets the administrators password for the given Server.
+
+
+
+
+ Reset
+ Password
+
+
+
+
+
+
+
+
+
+
+ Reset-Password
+
+
+
+
+
+ id
+
+
+ The Servers identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+ The password which must meet the complexity requirements set by your OpenStack Compute provider.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Reset-Password -id 4ee64397-1253-473c-a81d-bc23dceeef31 -p "testpassword08"
+
+
+ Description
+ -----------
+
+ Resets the Admin password on Server 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update-Server
+
+
+ This cmdlet allows you to change the Servers name property.
+
+
+
+
+ Update
+ Server
+
+
+
+
+
+
+
+
+
+
+ Update-Server
+
+
+
+
+
+ id
+
+
+ The Servers identifier.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+ The new Server name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # Update-Server -id 4ee64397-1253-473c-a81d-bc23dceeef31 -n "NewName"
+
+
+ Description
+ -----------
+
+ Updates Server 4ee64397-1253-473c-a81d-bc23dceeef31 to the new name of NewName.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-Image
+
+
+ This Cmdlet crfeates a new Image based on an existing Server.
+
+
+
+
+ New
+ Image
+
+
+
+
+
+
+
+
+
+
+ New-Image
+
+
+
+
+
+ md
+
+
+ A pipe delimited set of Name Value Pairs seperated by commas. "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" etc..
+
+
+
+
+ string
+
+
+ s
+
+
+ The identifier (ServerId) to base the Image on.
+
+
+
+ string
+
+
+ n
+
+
+ The name of the new Image.
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EXAMPLE 1
+
+
+
+
+
+ # New-Image -md "Namevalue1 | value1" , "NameValue2 | value2", "NameValue3 | value3" -s 4ee64397-1253-473c-a81d-bc23dceeef31 -n "TestImage"
+
+
+ Description
+ -----------
+
+ This command will add three Name Value Pairs to the image for Server 4ee64397-1253-473c-a81d-bc23dceeef31.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml b/Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml
new file mode 100644
index 0000000..b88bb75
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/OpenstackShell.format.ps1xml
@@ -0,0 +1,1729 @@
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.Admin.Zone
+
+
+
+
+
+
+ 8
+ left
+
+
+
+ 20
+ left
+
+
+
+ 23
+ left
+
+
+
+ 10
+ left
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ ShellForegroundColor
+
+
+ IsDefault
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.BlockStorage.Snapshot
+
+
+
+
+
+
+ 3
+ left
+
+
+
+ 40
+ left
+
+
+
+ 20
+ left
+
+
+
+ 40
+ left
+
+
+
+ 22
+ left
+
+
+
+ 18
+ left
+
+
+
+ 7
+ left
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+ DisplayName
+
+
+ Description
+
+
+ CreationDate
+
+
+ Status
+
+
+ Size
+
+
+ VolumeId
+
+
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.BlockStorage.VolumeBackup
+
+
+
+
+
+ 3
+ left
+
+
+
+ 45
+ left
+
+
+
+ 20
+ left
+
+
+
+ 20
+ left
+
+
+
+ 8
+ left
+
+
+
+ 10
+ left
+
+
+
+ 10
+ left
+
+
+
+ 28
+ left
+
+
+
+ 18
+ left
+
+
+
+ 42
+ left
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+ Name
+
+
+ Container
+
+
+ Size
+
+
+ Status
+
+
+ AvailabilityZone
+
+
+ CreatedDate
+
+
+ ObjectCount
+
+
+ VolumeId
+
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.BlockStorage.Volume
+
+
+
+
+
+ 3
+ left
+
+
+
+ 45
+ left
+
+
+
+ 20
+ left
+
+
+
+ 30
+ left
+
+
+
+ 6
+ left
+
+
+
+ 8
+ left
+
+
+
+ 8
+ left
+
+
+
+ 22
+ left
+
+
+
+ 10
+ left
+
+
+
+ 10
+ left
+
+
+
+ 10
+ left
+
+
+
+ 30
+ left
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+ Name
+
+
+ Description
+
+
+ VolumeType
+
+
+ Size
+
+
+ IsBootable
+
+
+ CreationDate
+
+
+ Status
+
+
+ AvailabilityZone
+
+
+ Device
+
+
+ AttachedTo
+
+
+ SourceVolid
+
+
+
+
+
+
+
+
+ KeyPair
+
+ Openstack.Objects.Domain.Server.KeyPair
+
+
+
+
+
+
+ 40
+ left
+
+
+
+
+ 50
+ left
+
+
+
+
+ 330
+ left
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+ Fingerprint
+
+
+
+ PublicKey
+
+
+
+
+
+
+
+
+
+
+
+
+ Port
+
+ Openstack.Objects.Domain.Networking.Port
+
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 13
+ left
+
+
+
+
+ 6
+ left
+
+
+
+ 16
+ left
+
+
+
+ 25
+ left
+
+
+
+ 40
+ left
+
+
+
+ 40
+ left
+
+
+
+ 21
+ left
+
+
+
+ 16
+ left
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+ Name
+
+
+ Status
+
+
+ AdminStateUp
+
+
+ MacAddress
+
+
+ DeviceOwner
+
+
+ DeviceId
+
+
+ PortSecurityEnabled
+
+
+ BindingType
+
+
+
+
+
+
+
+
+
+ Subnet
+
+ Openstack.Objects.Domain.Networking.Subnet
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 34
+ left
+
+
+
+
+ 7
+ left
+
+
+
+ 24
+ left
+
+
+
+ 11
+ left
+
+
+
+ 24
+ left
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+ Name
+
+
+ EnableDHCP
+
+
+ Cidr
+
+
+ IPVersion
+
+
+ GatewayIP
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Client.Powershell.Utility.ServiceProvider
+
+
+
+
+
+ 15
+ left
+
+
+
+ 80
+ left
+
+
+
+ 7
+ left
+
+
+
+ 30
+ left
+
+
+
+
+
+
+ Name
+
+
+ AuthenticationServiceURI
+
+
+ IsDefault
+
+
+
+ DefaultTenantId
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.Networking.FloatingIP
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 42
+ left
+
+
+
+
+ 20
+ left
+
+
+
+
+ 42
+ left
+
+
+
+
+ 15
+ left
+
+
+
+
+ 15
+ left
+
+
+
+
+ 15
+ left
+
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+
+ Id
+
+
+
+ FloatingIPAddress
+
+
+
+ FloatingNetworkId
+
+
+
+ FixedIPAddress
+
+
+
+ PortId
+
+
+
+ RouterId
+
+
+
+
+
+
+
+
+
+ StorageContainer
+
+ Openstack.Objects.Domain.StorageContainer
+
+
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+
+ Network
+
+ Openstack.Objects.Domain.Networking.Network
+
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 13
+ left
+
+
+
+
+ 6
+ left
+
+
+
+
+ 6
+ left
+
+
+
+
+ 6
+ left
+
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+
+ Id
+
+
+
+ Name
+
+
+
+ IsExternal
+
+
+
+ Shared
+
+
+
+ PortSecurityEnabled
+
+
+
+
+
+
+
+
+
+ service
+
+ Openstack.Objects.Domain.Admin.Service
+
+
+
+
+
+
+ 20
+ left
+
+
+
+
+ 27
+ left
+
+
+
+
+
+
+
+
+
+ Type
+
+
+
+ Name
+
+
+
+
+
+
+
+
+
+ process4
+
+ Openstack.Client.Powershell.Providers.ObjectStorage.StorageItemViewModel
+
+
+
+
+
+ 47
+ left
+
+
+
+ 13
+ left
+
+
+
+ 25
+ left
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ Name
+
+
+ Size
+
+
+ LastModifiedDate
+
+
+ Type
+
+
+
+
+
+
+
+
+
+ process4
+
+ Openstack.Storage.StorageObject
+
+
+
+
+
+ 47
+ left
+
+
+
+ 13
+ left
+
+
+
+ 25
+ left
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ Name
+
+
+ Length
+
+
+ LastModified
+
+
+ ContentType
+
+
+
+
+
+
+
+
+ process5
+
+ Openstack.Storage.StorageFolder
+
+
+
+
+
+ 47
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+
+
+ Name
+
+
+
+ ContentType
+
+
+
+
+
+
+
+
+ Router
+
+ Openstack.Objects.Domain.Networking.Router
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+ 47
+ left
+
+
+
+
+ 13
+ left
+
+
+
+
+ 14
+ left
+
+
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+
+ Id
+
+
+ Name
+
+
+
+ Status
+
+
+ AdminStateUp
+
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Client.Powershell.Providers.Common.BaseUIContainer
+
+
+
+
+
+
+ 15
+ left
+
+
+
+
+ 100
+ left
+
+
+
+
+ 13
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+
+
+
+
+ Name
+
+
+
+ Description
+
+
+ ObjectType
+
+
+ Path
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Administration.Domain.User
+
+
+
+
+
+
+ 15
+ left
+
+
+
+
+ 20
+ left
+
+
+
+
+ 20
+ left
+
+
+
+
+
+
+
+
+ AccountId
+
+
+
+ Username
+
+
+ Name
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Objects.Domain.Compute.Account
+
+
+
+
+
+
+ 15
+ left
+
+
+
+
+ 20
+ left
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Administration.Domain.Group
+
+
+
+
+
+
+ 40
+ left
+
+
+
+
+ 26
+ left
+
+
+
+
+ 50
+ left
+
+
+
+
+
+
+
+
+ GroupId
+
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Objects.Domain.Compute.Server
+
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+
+ 30
+ left
+
+
+
+ 25
+ left
+
+
+
+ 10
+ left
+
+
+
+ 15
+ left
+
+
+
+
+ 100
+ left
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+ Id
+
+
+
+ Name
+
+
+ CreationDate
+
+
+ LastUpdatedDate
+
+
+ KeyName
+
+
+ Status
+
+
+ DisplayIPAddresses
+
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Objects.Domain.Compute.Image
+
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 70
+ left
+
+
+
+
+ 25
+ left
+
+
+
+
+ 25
+ left
+
+
+
+
+ 15
+ left
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+
+ Id
+
+
+
+ Name
+
+
+
+ LastModified
+
+
+
+ CreatedDate
+
+
+
+ Status
+
+
+
+
+
+
+
+
+
+
+ process
+
+ System.Collections.DictionaryEntry
+
+
+
+
+
+
+ 30
+ left
+
+
+
+
+ 320
+ left
+
+
+
+
+
+
+
+
+
+
+ Key
+
+
+
+ Value
+
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Objects.Domain.Security.SecurityGroup
+
+
+
+
+
+
+ 3
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 40
+ left
+
+
+
+
+ 90
+ left
+
+
+
+
+ 15
+ left
+
+
+
+
+
+
+
+
+ QuickPickNumber
+
+
+
+ Id
+
+
+
+ Name
+
+
+
+ Description
+
+
+
+ TenantId
+
+
+
+
+
+
+
+
+
+
+ process
+
+ Openstack.Objects.Domain.Compute.MetaDataElement
+
+
+
+
+
+
+ 20
+ left
+
+
+
+
+ 20
+ left
+
+
+
+
+
+
+
+
+
+
+ Key
+
+
+
+ Value
+
+
+
+
+
+
+
+
+
+
+
+ flavor
+
+ Openstack.Objects.Domain.Compute.Flavor
+
+
+
+
+
+
+ 8
+ left
+
+
+
+
+ 26
+ left
+
+
+
+
+ 5
+ left
+
+
+
+
+ 10
+ left
+
+
+
+
+
+ 11
+ left
+
+
+
+
+ 11
+ left
+
+
+
+
+ 5
+ left
+
+
+
+
+ 5
+ left
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+
+ Name
+
+
+ Disk
+
+
+ Ram
+
+
+
+ RxtxCap
+
+
+
+ RxtxQuota
+
+
+
+ Swap
+
+
+
+ Vcpus
+
+
+
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/PostBuild.bat b/Openstack.Client.Powershell/Deployment/PostBuild.bat
new file mode 100644
index 0000000..d09c045
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/PostBuild.bat
@@ -0,0 +1,21 @@
+
+=====================================================================================================================
+ACTION REQUIRED : Change the DocPath Variable below to reflect your Personal Documents Folder..
+=====================================================================================================================
+set DocPath=C:\Users\Travis\Documents
+
+ md %DocPath%\WindowsPowershell\
+ md %DocPath%\OS\
+ 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 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
new file mode 100644
index 0000000..9ecf6d1
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/PostBuild.example
@@ -0,0 +1,13 @@
+
+=====================================================================================================================
+ACTION REQUIRED : Change the DocPath Variable below to reflect your Personal Documents Folder..
+=====================================================================================================================
+set DocPath=C:\Users\Travis\Documents
+
+ md %DocPath%\WindowsPowershell\
+ md %DocPath%\OS\
+ 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
diff --git a/Openstack.Client.Powershell/Deployment/ReleaseManifest.xml b/Openstack.Client.Powershell/Deployment/ReleaseManifest.xml
new file mode 100644
index 0000000..5a1ee8b
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ReleaseManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Support for listing, adding, attaching, detaching and removing block volumes
+ * Support for creating and removing block storage snapshots
+
+
+
+
+
+ New Features
+ * Migrate-Drive support for migrating full data sets from external sources
+
+
+
+
+
+ New Features
+ * Full access to the OpenStack compute infrastructure
+ * CDN support
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/ReleaseNotes.xml b/Openstack.Client.Powershell/Deployment/ReleaseNotes.xml
new file mode 100644
index 0000000..b6571b6
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ReleaseNotes.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Easier Zone management with Set-Zone and Get-Zones
+
+
+
+
+
+ New Features
+ * Support for listing, adding, attaching, detaching and removing block volumes
+ * Support for creating and removing block storage snapshots
+
+
+
+
+
+ New Features
+ * Migrate-Drive support for migrating full data sets from external sources
+
+
+
+
+
+ New Features
+ * Full access to the OpenStack compute infrastructure
+ * CDN support
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt b/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt
new file mode 100644
index 0000000..103d384
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/AnotherTest.txt
@@ -0,0 +1,92 @@
+====================================================================================================================
+///
+///
+///
+///
+///
+///
+//======================================================================================================================
+ 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
new file mode 100644
index 0000000..07013fc
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/PostBuild.targets
@@ -0,0 +1,47 @@
+
+
+
+
+
+ Release
+ Any CPU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml
new file mode 100644
index 0000000..ab26426
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupTest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml
new file mode 100644
index 0000000..a1bf735
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroups.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+ 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
new file mode 100644
index 0000000..d152d40
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/SecurityGroupData/SecurityGroupsTest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml
new file mode 100644
index 0000000..8562881
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
new file mode 100644
index 0000000..d9bf71e
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Server1.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+ 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
new file mode 100644
index 0000000..fae1202
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/ServerData/Servers.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/ScratchPad/app.config b/Openstack.Client.Powershell/Deployment/ScratchPad/app.config
new file mode 100644
index 0000000..2e14572
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/ScratchPad/app.config
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Deployment/powershell.exe.config b/Openstack.Client.Powershell/Deployment/powershell.exe.config
new file mode 100644
index 0000000..944e423
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/powershell.exe.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Openstack.Client.Powershell/Deployment/readme.txt b/Openstack.Client.Powershell/Deployment/readme.txt
new file mode 100644
index 0000000..e2feb1a
--- /dev/null
+++ b/Openstack.Client.Powershell/Deployment/readme.txt
@@ -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).
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/License.txt b/Openstack.Client.Powershell/License.txt
new file mode 100644
index 0000000..282f43d
--- /dev/null
+++ b/Openstack.Client.Powershell/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.Client.Powershell/Migrations/AWSMigration.cs b/Openstack.Client.Powershell/Migrations/AWSMigration.cs
new file mode 100644
index 0000000..ade2fc0
--- /dev/null
+++ b/Openstack.Client.Powershell/Migrations/AWSMigration.cs
@@ -0,0 +1,162 @@
+/* ============================================================================
+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 Amazon.S3;
+using Amazon.S3.Model;
+using Openstack.Objects.DataAccess;
+using Openstack.Objects.Utility;
+using System.IO;
+using Openstack.Objects.Domain;
+using Openstack.Objects.DataAccess.Storage;
+
+namespace Openstack.Migrations
+{
+ public class AWSMigration
+ {
+ private IAmazonS3 _client;
+ private Session _session;
+ public delegate void CopyOperationEventHandler(object sender, CopyOperationInfoEventArgs e);
+ public delegate void CreateContainerOperationEventHandler(object sender, CreateContainerOperationInfoEventArgs e);
+ public event CopyOperationEventHandler Changed;
+ public event CreateContainerOperationEventHandler ContainerCreated;
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void OnChanged(CopyOperationInfoEventArgs e)
+ {
+ if (Changed != null)
+ Changed(this, e);
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void OnCreateContainer(CreateContainerOperationInfoEventArgs e)
+ {
+ if (ContainerCreated != null)
+ ContainerCreated(this, e);
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ public AWSMigration(string accessKeyID, string secretAccessKeyID)
+ {
+ _client = Amazon.AWSClientFactory.CreateAmazonS3Client(accessKeyID, secretAccessKeyID);
+ _session = Session.CreateSession();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void CreateContainer(string name)
+ {
+ _session.Factory.CreateContainerRepository().SaveContainer(new Objects.Domain.StorageContainer(name));
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ public string[] GetBuckets()
+ {
+ return _client.ListBuckets().Buckets.Select(b => b.BucketName).ToArray();
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void CopyObject(S3Object s3Object, string bucketName)
+ {
+ IStorageObjectRepository repository = _session.Factory.CreateStorageObjectRepository();
+
+ if (s3Object.Key.EndsWith("/") || s3Object.Size == 0)
+ {
+ StoragePath path = new StoragePath(_session.Context.GetRepositoryContext("object-store").ServiceDescription.Url, bucketName, s3Object.Key);
+ repository.MakeFolder(path.AbsoluteURI);
+ }
+ else
+ {
+ // Grab the file from the S3 store...
+
+ GetObjectRequest goRequest = new GetObjectRequest();
+ goRequest.BucketName = bucketName;
+ goRequest.Key = s3Object.Key;
+ GetObjectResponse goResponse = _client.GetObject(goRequest);
+
+ // Save to the newly created OpenStack Container..
+
+ StorageObject sObject = new StorageObject();
+ sObject.Load(goResponse.ResponseStream);
+ StoragePath path = new StoragePath(_session.Context.GetRepositoryContext("object-store").ServiceDescription.Url, bucketName, s3Object.Key);
+ _session.Factory.CreateStorageObjectRepository().Copy(sObject, path.AbsoluteURI, true);
+
+ this.OnChanged(new CopyOperationInfoEventArgs(Path.GetFileName(s3Object.Key), s3Object.Size));
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================
+ public void MigrateBucket(string sourceBucketName)
+ {
+ ListObjectsRequest request = new ListObjectsRequest();
+ request = new ListObjectsRequest();
+ request.BucketName = sourceBucketName;
+
+ // Create the target Storage Object Container first in Swift..
+
+ this.CreateContainer(sourceBucketName);
+ this.OnCreateContainer(new CreateContainerOperationInfoEventArgs(sourceBucketName));
+
+ do
+ {
+ ListObjectsResponse response = _client.ListObjects(request);
+
+ foreach (S3Object s3Object in response.S3Objects) {
+ this.CopyObject(s3Object, sourceBucketName);
+ }
+
+ if (response.IsTruncated) {
+ request.Marker = response.NextMarker;
+ }
+ else
+ {
+ request = null;
+ }
+ } while (request != null);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Migrations/CopyInfoEventArgs.cs b/Openstack.Client.Powershell/Migrations/CopyInfoEventArgs.cs
new file mode 100644
index 0000000..f0078cd
--- /dev/null
+++ b/Openstack.Client.Powershell/Migrations/CopyInfoEventArgs.cs
@@ -0,0 +1,47 @@
+/* ============================================================================
+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.
+============================================================================ */
+namespace Openstack.Migrations
+{
+ public class CopyInfoEventArgs
+ {
+ private long _BytesCopied = 0;
+ private string _filename;
+ private string _exception;
+
+ public string ExceptionMessage
+ {
+ get { return _exception; }
+ set { _exception = value; }
+ }
+
+ public CopyInfoEventArgs(string filename, long bytesCopied)
+ {
+ _filename = filename;
+ _BytesCopied = bytesCopied;
+ }
+
+ public string Filename
+ {
+ get { return _filename; }
+ set { _filename = value; }
+ }
+ public long BytesCopied
+ {
+ get { return _BytesCopied; }
+ set { _BytesCopied = value; }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Migrations/LocalStoreMigration.cs b/Openstack.Client.Powershell/Migrations/LocalStoreMigration.cs
new file mode 100644
index 0000000..e831086
--- /dev/null
+++ b/Openstack.Client.Powershell/Migrations/LocalStoreMigration.cs
@@ -0,0 +1,138 @@
+/* ============================================================================
+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 Openstack.Objects.Utility;
+using System;
+using Openstack.Objects.DataAccess.Storage;
+using System.IO;
+
+namespace Openstack.Migrations
+{
+ public enum StorageProvider
+ {
+ SkyDrive = 0,
+ DropBox = 1
+ }
+
+ public class LocalStoreMigration
+ {
+ private Session _session;
+ public delegate void CopyOperationEventHandler(object sender, CopyOperationInfoEventArgs e);
+ public event CopyOperationEventHandler Changed;
+
+////=========================================================================================
+/////
+/////
+/////
+/////
+////=========================================================================================
+ private void OnChanged(CopyOperationInfoEventArgs e)
+ {
+ if (Changed != null)
+ Changed(this, e);
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private void Repository_Changed(object sender, CopyOperationInfoEventArgs e)
+ {
+ this.OnChanged(e);
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ public LocalStoreMigration()
+ {
+ _session = Session.CreateSession();
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void CreateContainer(string name)
+ {
+ _session.Factory.CreateContainerRepository().SaveContainer(new Objects.Domain.StorageContainer(name));
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private DirectoryInfo[] GetRootDecendants(string localStorePath)
+ {
+ DirectoryInfo info = new DirectoryInfo(localStorePath);
+ return info.GetDirectories("*.*", SearchOption.AllDirectories);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ private void MigrateDrive(StorageProvider provider, string containerName)
+ {
+ string localStorePath = null;
+
+ if (provider == StorageProvider.DropBox)
+ localStorePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Dropbox\";
+ else
+ localStorePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Skydrive\";
+
+ string targetPath = _session.Context.GetRepositoryContext("object-store").ServiceDescription.Url + "/" + containerName + "/";
+ StorageObjectRepository repository = new StorageObjectRepository(_session.Context.GetRepositoryContext("object-store"));
+
+ // Create the target Container..
+
+ this.CreateContainer(containerName);
+
+ repository.Changed += new StorageObjectRepository.CopyOperationCompleteEventHandler(Repository_Changed);
+
+ DirectoryInfo[] dirs = this.GetRootDecendants(localStorePath);
+ foreach (DirectoryInfo direcory in dirs) {
+ repository.Copy(localStorePath + direcory.Name + @"\", targetPath, true);
+ }
+
+ repository.Changed -= new StorageObjectRepository.CopyOperationCompleteEventHandler(Repository_Changed);
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ public void MigrateLocalStore(StorageProvider provider)
+ {
+ this.MigrateLocalStore(provider, provider.ToString());
+ }
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ public void MigrateLocalStore(StorageProvider provider, string containerName)
+ {
+ MigrateDrive(provider, containerName);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk b/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk
new file mode 100644
index 0000000..a5aa06a
Binary files /dev/null and b/Openstack.Client.Powershell/Openstack.Client.Powershell - Shortcut.lnk differ
diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj b/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj
new file mode 100644
index 0000000..67cdc30
--- /dev/null
+++ b/Openstack.Client.Powershell/Openstack.Client.Powershell.csproj
@@ -0,0 +1,236 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {32BAC168-2EC8-4074-9E6D-8C13460DCFAD}
+ Library
+ Properties
+ Openstack.Client.Powershell
+ Openstack.Client.Powershell
+ v4.5
+ 512
+
+
+ ..\..\
+ true
+
+
+ true
+ full
+ false
+ bin\Release\
+ DEBUG
+ prompt
+ 4
+ AnyCPU
+ false
+ false
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ false
+
+
+ true
+ bin\TransformTool Build\
+ TRACE;DEBUG
+ full
+ AnyCPU
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ false
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ false
+ false
+
+
+ OnBuildSuccess
+
+
+
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+ Always
+
+
+
+
+
+ Designer
+ Always
+
+
+
+ Designer
+ Always
+
+
+ Always
+
+
+
+ Designer
+
+
+ Designer
+
+
+
+ Designer
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+ Always
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+ Always
+
+
+ Always
+ Designer
+
+
+
+
+
+
+
+ {c53d669c-cdf1-4157-aec1-bd167f655b2b}
+ Openstack.Common
+
+
+ {b2c92371-b62b-45a2-adeb-edebefa3a75c}
+ Openstack
+
+
+
+
+
+
+
+ Echo =====================
+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
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell.sln b/Openstack.Client.Powershell/Openstack.Client.Powershell.sln
new file mode 100644
index 0000000..8bece28
--- /dev/null
+++ b/Openstack.Client.Powershell/Openstack.Client.Powershell.sln
@@ -0,0 +1,133 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D129B468-4E23-4226-AA0E-AE02BB697D9A}"
+ ProjectSection(SolutionItems) = preProject
+ HPCloud.Client.Powershell.vsmdi = HPCloud.Client.Powershell.vsmdi
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Client.Powershell", "Openstack.Client.Powershell.csproj", "{32BAC168-2EC8-4074-9E6D-8C13460DCFAD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Client.Common", "..\..\Common\HPCloud.Client.Common\Openstack.Client.Common.csproj", "{668A82E0-9F8A-476E-A5F7-F755B44AC4DD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.RDPClient", "..\RDPClient\Openstack.RDPClient.csproj", "{3301ACFF-3A51-458D-B4C7-37D229A86AC9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Objects", "..\..\API\Openstack.Objects\Openstack.Objects.csproj", "{BDCDCBF5-3467-461E-8307-E1E4E19F6532}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Common", "..\..\API\Openstack.Common\Openstack.Common.csproj", "{F6AF0191-F236-4C26-8C93-30D5F4D8000F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openstack.Objects.Test", "..\..\API\Openstack.Objects.Test\Openstack.Objects.Test.csproj", "{E90D4392-6748-4405-9F99-2D5FBB09DFC8}"
+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
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.Release|x86.ActiveCfg = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU
+ {668A82E0-9F8A-476E-A5F7-F755B44AC4DD}.TransformTool Build|x86.ActiveCfg = Release|Any CPU
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Debug|x86.ActiveCfg = Debug|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Debug|x86.Build.0 = Debug|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Release|Any CPU.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Release|Mixed Platforms.Build.0 = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Release|x86.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.Release|x86.Build.0 = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.TransformTool Build|Any CPU.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.TransformTool Build|Mixed Platforms.Build.0 = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.TransformTool Build|x86.ActiveCfg = Release|x86
+ {3301ACFF-3A51-458D-B4C7-37D229A86AC9}.TransformTool Build|x86.Build.0 = Release|x86
+ {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}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Debug|x86.ActiveCfg = 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}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.Release|x86.ActiveCfg = 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
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU
+ {BDCDCBF5-3467-461E-8307-E1E4E19F6532}.TransformTool Build|x86.ActiveCfg = Release|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}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Debug|x86.ActiveCfg = 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}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.Release|x86.ActiveCfg = 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
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU
+ {F6AF0191-F236-4C26-8C93-30D5F4D8000F}.TransformTool Build|x86.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.Release|x86.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.TransformTool Build|Any CPU.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.TransformTool Build|Any CPU.Build.0 = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.TransformTool Build|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.TransformTool Build|Mixed Platforms.Build.0 = Release|Any CPU
+ {E90D4392-6748-4405-9F99-2D5FBB09DFC8}.TransformTool Build|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(TestCaseManagementSettings) = postSolution
+ CategoryFile = HPCloud.Client.Powershell.vsmdi
+ EndGlobalSection
+EndGlobal
diff --git a/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo b/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo
new file mode 100644
index 0000000..7383093
Binary files /dev/null and b/Openstack.Client.Powershell/Openstack.Client.Powershell.v12.suo differ
diff --git a/Openstack.Client.Powershell/Properties/AssemblyInfo.cs b/Openstack.Client.Powershell/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..7c46497
--- /dev/null
+++ b/Openstack.Client.Powershell/Properties/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+/* ============================================================================
+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.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("Openstack.Client.Powershell")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("OpenStack")]
+[assembly: AssemblyProduct("Openstack.Client.Powershell")]
+[assembly: AssemblyCopyright("")]
+[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("847a28a4-6407-4aa6-8070-a4a51396db70")]
+
+// 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.3.5.8")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentUIContainer.cs
new file mode 100644
index 0000000..6c42dae
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentUIContainer.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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.BlockStorage;
+
+namespace Openstack.Client.Powershell.Providers.BlockStorage
+{
+ public class AttachmentUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ // this.Entities = ((Image)this.Entity).MetaData;
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ VolumeAttachment attachment = (VolumeAttachment)this.Entity;
+
+ this.WriteHeader("Attachment Details");
+ this.WriteAttachmentDetails(attachment);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteImageMetadata(Image image)
+ {
+ this.WriteMetadata(image.MetaData);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteAttachmentDetails(VolumeAttachment attachment)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Device : " + attachment.Device);
+ Console.WriteLine("Volume Id : " + attachment.VolumeId);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentsUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentsUIContainer.cs
new file mode 100644
index 0000000..394bf60
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/AttachmentsUIContainer.cs
@@ -0,0 +1,105 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.BlockStorage;
+using System.Linq;
+using Openstack.Client.Powershell.Providers.Security;
+
+namespace Openstack.Client.Powershell.Providers.BlockStorage
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class AttachmentsUIContainer : BaseUIContainer
+ {
+ private Server _server;
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public AttachmentsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public AttachmentsUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ public void LoadEntities(Server server)
+ {
+ _server = server;
+ List attachments = this.RepositoryFactory.CreateVolumeRepository().GetServerVolumes(server.Id);
+
+ if (attachments != null && attachments.Count() > 0)
+ {
+ List volumes = this.RepositoryFactory.CreateVolumeRepository().GetVolumes();
+
+ var innerJoinQuery =
+ from attachment in attachments
+ join volume in volumes on attachment.VolumeId equals volume.Id
+ select new Volume()
+ {
+ Id = volume.Id,
+ Description = volume.Description,
+ Name = volume.Name,
+ Size = volume.Size,
+ AvailabilityZone = volume.AvailabilityZone,
+ Device = attachment.Device,
+ AttachedTo = volume.AttachedTo,
+ Status = volume.Status,
+ CreationDate = volume.CreationDate
+ };
+
+ List allVolumes = innerJoinQuery.ToList();
+
+ this.SetUIContainers(allVolumes);
+ this.Entities = allVolumes;
+ }
+ else
+ {
+ this.Entities = null;
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadEntities(_server);
+ }
+ #endregion
+ }
+}
+
+
+
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/BlockStorageUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/BlockStorageUIContainer.cs
new file mode 100644
index 0000000..1191711
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/BlockStorageUIContainer.cs
@@ -0,0 +1,87 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Utility;
+using Openstack.Objects.DataAccess;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class BlockStorageUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public BlockStorageUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+ this.Containers.Add(this.CreateContainer("Volumes", "Manage all Block Storage Volumes from this location.", @"BlockStorage\Volumes"));
+ this.Containers.Add(this.CreateContainer("Backups", "Manage all of your Volume backups.", @"BlockStorage\Backups"));
+ this.Containers.Add(this.CreateContainer("Snapshots", "Container for storing and managing Block Storage Snapshots. ", @"BlockStorage\Snapshots"));
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public BlockStorageUIContainer(BaseUIContainer parentContainer, string name, string description, string path, Context context, BaseRepositoryFactory repository)
+ : base(parentContainer, name, description, path)
+ {
+ this.Context = context;
+ this.RepositoryFactory = repository;
+
+ this.LoadContainers();
+ this.ObjectType = Client.Powershell.Providers.Common.ObjectType.Entity;
+ }
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotUIContainer.cs
new file mode 100644
index 0000000..e81077c
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotUIContainer.cs
@@ -0,0 +1,79 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.BlockStorage;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ public class SnapshotUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ // this.Entities = ((Image)this.Entity).MetaData;
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Snapshot snapshot = (Snapshot)this.Entity;
+
+ this.WriteHeader("Snapshot Details");
+ this.WriteSnapshotDetails(snapshot);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteVolumeMetadata(Volume volume)
+ {
+ //this.WriteMetadata(volume.MetaData);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteSnapshotDetails(Snapshot snapshot)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Id : " + snapshot.Id);
+ Console.WriteLine("Name : " + snapshot.DisplayName);
+ Console.WriteLine("Description : " + snapshot.Description);
+ Console.WriteLine("Created On : " + snapshot.CreationDate);
+ Console.WriteLine("Status : " + snapshot.Status);
+ Console.WriteLine("Volume Id : " + snapshot.VolumeId);
+ Console.WriteLine("");
+ }
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotsUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotsUIContainer.cs
new file mode 100644
index 0000000..0cca918
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/SnapshotsUIContainer.cs
@@ -0,0 +1,64 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class SnapshotsUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public SnapshotsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public SnapshotsUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ IList snapshots = this.RepositoryFactory.CreateSnapshotRepository().GetSnapshots();
+ this.SetUIContainers(snapshots);
+ this.Entities = snapshots;
+ }
+ #endregion
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupUIContainer.cs
new file mode 100644
index 0000000..910dbff
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupUIContainer.cs
@@ -0,0 +1,79 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ public class VolumeBackupUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {}
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {}
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ VolumeBackup backup = (VolumeBackup)this.Entity;
+
+ this.WriteHeader("Volume Backup Details");
+ this.WriteVolumeBackupDetails(backup);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteVolumeBackupDetails(VolumeBackup backup)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Id : " + backup.Id);
+ Console.WriteLine("Name : " + backup.Name);
+ Console.WriteLine("Description : " + backup.Description);
+ Console.WriteLine("Size : " + backup.Size);
+ Console.WriteLine("Availability Zone : " + backup.AvailabilityZone);
+ Console.WriteLine("Container : " + backup.Container);
+ Console.WriteLine("Object Count : " + backup.ObjectCount);
+ Console.WriteLine("Created On : " + backup.CreatedDate);
+ Console.WriteLine("Status : " + backup.Status);
+ Console.WriteLine("Volume Id : " + backup.VolumeId);
+ Console.WriteLine("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupsUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupsUIContainer.cs
new file mode 100644
index 0000000..1527649
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeBackupsUIContainer.cs
@@ -0,0 +1,63 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class VolumeBackupsUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public VolumeBackupsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public VolumeBackupsUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ IList volumes = this.RepositoryFactory.CreateVolumeRepository().GetVolumeBackups();
+ this.SetUIContainers(volumes);
+ this.Entities = volumes;
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/VolumeUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeUIContainer.cs
new file mode 100644
index 0000000..e52b1b3
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/VolumeUIContainer.cs
@@ -0,0 +1,109 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.BlockStorage;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ public class VolumeUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ //this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+ AttachmentsUIContainer sgContainer = (AttachmentsUIContainer)this.CreateContainer("Attachments", "Manage this Volumes attachments.", this.Parent.Path + @"\Attachments");
+ this.Containers.Add(sgContainer);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Volume volume = (Volume)this.Entity;
+
+ this.WriteHeader("Volume Details");
+ this.WriteVolumeDetails(volume);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteVolumeMetadata(Volume volume)
+ {
+ int maxLength = volume.Metadata.Max(m => m.Key.Length);
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ foreach (KeyValuePair element in volume.Metadata)
+ {
+ Console.WriteLine(element.Key.PadRight(maxLength) + " : " + element.Value.Trim());
+ }
+ Console.WriteLine();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteVolumeDetails(Volume volume)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Id : " + volume.Id);
+ Console.WriteLine("Name : " + volume.Name);
+ Console.WriteLine("Description : " + volume.Description);
+ Console.WriteLine("Size : " + volume.Size);
+ Console.WriteLine("Created On : " + volume.CreationDate);
+ Console.WriteLine("Status : " + volume.Status);
+ Console.WriteLine("Server Attached To : " + volume.AttachedTo);
+ Console.WriteLine("Device : " + volume.Device);
+ Console.WriteLine("");
+
+ if (volume.Metadata.Count() > 0)
+ {
+ Console.ForegroundColor = ConsoleColor.White;
+ Console.WriteLine("Volume Metadata");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("");
+ WriteVolumeMetadata(volume);
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/BlockStorage/VolumesUIContainer.cs b/Openstack.Client.Powershell/Providers/BlockStorage/VolumesUIContainer.cs
new file mode 100644
index 0000000..19ffa99
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/BlockStorage/VolumesUIContainer.cs
@@ -0,0 +1,63 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class VolumesUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public VolumesUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public VolumesUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ IList volumes = this.RepositoryFactory.CreateVolumeRepository().GetVolumes();
+ this.SetUIContainers(volumes);
+ this.Entities = volumes;
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/Common/AccountUIContainer.cs b/Openstack.Client.Powershell/Providers/Common/AccountUIContainer.cs
new file mode 100644
index 0000000..bd2f2c8
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/AccountUIContainer.cs
@@ -0,0 +1,84 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Utility;
+using Openstack.Objects.DataAccess;
+using Openstack.Client.Powershell.Providers.Database;
+using Openstack.Client.Powershell.Providers.Networking;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Administration.Domain
+{
+ public static class CurrentAccountUIContainer
+ {
+ public static AccountUIContainer CurrentAccount = null;
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public class AccountUIContainer : BaseUIContainer
+ {
+ public override void Load()
+ {
+ this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+
+ this.AddContainer(this.CreateContainer ("Servers", "A place to manage Servers across the Account.", "Servers"));
+ this.AddContainer(this.CreateContainer ("Flavors", "Manage additional hardware configurations for Servers.", "Flavors"));
+ this.AddContainer(this.CreateContainer ("Images", "Manage collections of files used to create or rebuild Servers.", "Images"));
+ this.AddContainer(this.CreateContainer ("Security", "Manage Key Pair and Security Group Rules here.", "Security"));
+ //this.AddContainer(this.CreateContainer ("Networking", "A place to manage dynamic IP addresses assigned to your Servers.", "Networking"));
+ this.AddContainer(this.CreateContainer ("BlockStorage", "A place to manage Block Storage Volumes and Snapshots.", "BlockStorage"));
+ this.AddContainer(this.CreateContainer ("Networks", "Manage networks, subnets, ports and routers.", "Networks"));
+ // this.AddContainer(this.CreateContainer ("Data", "Database Services", "Data"));
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public AccountUIContainer(BaseUIContainer parentContainer, string name, string description, string path, Context context, BaseRepositoryFactory repository)
+ : base(parentContainer, name, description, path)
+ {
+ this.Context = context;
+ this.RepositoryFactory = repository;
+
+ this.LoadContainers();
+ this.ObjectType = Client.Powershell.Providers.Common.ObjectType.Entity;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/BaseEntityUIContainer.cs b/Openstack.Client.Powershell/Providers/Common/BaseEntityUIContainer.cs
new file mode 100644
index 0000000..b043fe3
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/BaseEntityUIContainer.cs
@@ -0,0 +1,32 @@
+/* ============================================================================
+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;
+
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class BaseEntityUIContainer : BaseUIContainer
+ {
+ public override void Load()
+ {
+
+
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/BaseNavigationCmdletProvider.cs b/Openstack.Client.Powershell/Providers/Common/BaseNavigationCmdletProvider.cs
new file mode 100644
index 0000000..d4913fd
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/BaseNavigationCmdletProvider.cs
@@ -0,0 +1,317 @@
+/* ============================================================================
+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.Management.Automation.Provider;
+using Openstack.Objects.DataAccess;
+using Openstack.Common.Properties;
+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.Objects.Utility;
+using Openstack.Objects.Domain.Admin;
+using Openstack.Objects.DataAccess.Security;
+using System.Reflection;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class BaseNavigationCmdletProvider : NavigationCmdletProvider
+ {
+ static BaseRepositoryFactory _repositoryFactory;
+//=========================================================================================
+///
+///
+///
+//=========================================================================================
+ protected BaseRepositoryFactory RepositoryFactory
+ {
+ get
+ {
+ return (BaseRepositoryFactory)this.SessionState.PSVariable.Get("BaseRepositoryFactory").Value;
+ }
+ set
+ {
+ this.SessionState.PSVariable.Set(new PSVariable("BaseRepositoryFactory", value));
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ protected Settings Settings
+ {
+ get
+ {
+ return this.Context.Settings;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ protected Context Context
+ {
+ get
+ {
+ return (Context)this.SessionState.PSVariable.GetValue("Context", null);
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsContextInitialized()
+ {
+ if (this.SessionState.PSVariable.GetValue("Context", null) == null) {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ protected string ConfigFilePath
+ {
+ get
+ {
+ try
+ {
+ return (string)this.SessionState.PSVariable.Get("ConfigPath").Value;
+ }
+ catch (Exception)
+ {
+ return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+ }
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private void SetZoneColor()
+ {
+ string configFilePath = this.ConfigFilePath;
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement defaultZoneNode = doc.XPathSelectElement("//AvailabilityZone[@isDefault='True']");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), defaultZoneNode.Attribute("shellForegroundColor").Value);
+ this.Host.UI.RawUI.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), defaultZoneNode.Attribute("shellForegroundColor").Value);
+ this.Context.Forecolor = defaultZoneNode.Attribute("shellForegroundColor").Value;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ protected void InitializeSession()
+ {
+ if (!IsContextInitialized())
+ {
+ Context context = new Context();
+ CredentialManager manager = new CredentialManager(false);
+ AuthenticationRequest request = manager.BuildAuthenticationRequest();
+
+ if (request != null)
+ {
+ KeystoneAuthProvider authProvider = new KeystoneAuthProvider();
+ AuthenticationResponse response = authProvider.Authenticate(request);
+
+ context.ServiceCatalog = response.ServiceCatalog;
+ context.Settings = Settings.Default;
+
+ context.AccessToken = response.Token;
+ context.ProductName = "Openstack-WinCLI";
+ context.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+
+ this.SessionState.PSVariable.Set(new PSVariable("Context", context));
+ this.SessionState.PSVariable.Set(new PSVariable("BaseRepositoryFactory", new BaseRepositoryFactory(context)));
+ this.SetZoneColor();
+
+ string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ //string currentVersion = "1.4.0.0";
+ UpdateManager updateManager = new UpdateManager(this.Context, currentVersion, this.RepositoryFactory);
+ updateManager.ProcessUpdateCheck();
+ }
+ }
+ }
+ #region Implementation of DriveCmdletProvider
+//==================================================================================================
+///
+/// Removes an Item from the store..
+///
+///
+//==================================================================================================
+ protected override void ClearItem(string path)
+ {
+ base.ClearItem(path);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected void WriteJSON (T graph, string path)
+ {
+ MemoryStream stream = new MemoryStream();
+ DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(T));
+ ser.WriteObject(stream, graph);
+
+ string retValue = Encoding.Default.GetString(stream.ToArray());
+ WriteItemObject(retValue, path, false);
+ WriteItemObject("", path, false);
+ }
+//==================================================================================================
+///
+/// Writes out the files represented as StorageObjects for the supplied path.
+///
+//==================================================================================================
+ protected void WriteXML(T graph, string path)
+ {
+ XmlTextWriter xtw = null;
+ MemoryStream stream = new MemoryStream();
+ StringBuilder builder = new StringBuilder();
+ XmlDocument document = new XmlDocument();
+ StringWriter writer = null;
+ XmlSerializer serializer = new XmlSerializer(typeof(T));
+
+ try
+ {
+ serializer.Serialize(stream, graph);
+ stream.Position = 0;
+ document.Load(stream);
+
+ writer = new StringWriter(builder);
+ xtw = new XmlTextWriter(writer);
+ xtw.Formatting = Formatting.Indented;
+
+ document.WriteTo(xtw);
+ }
+ finally
+ {
+ xtw.Close();
+ }
+ WriteItemObject(builder.ToString(), path, false);
+ WriteItemObject("", path, false);
+ }
+//==================================================================================================
+///
+/// Called when the user decides to delete a KVSDrive.
+///
+///
+///
+//==================================================================================================
+ protected override PSDriveInfo RemoveDrive(PSDriveInfo drive)
+ {
+ if (drive == null)
+ {
+ WriteError(new ErrorRecord(new ArgumentNullException("drive"), "NullDrive", ErrorCategory.InvalidArgument, drive));
+ return null;
+ }
+ return drive;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override void GetChildNames(string path, ReturnContainers returnContainers)
+ {
+ WriteItemObject(path, path, true);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override string GetChildName(string path)
+ {
+ return base.GetChildName(path);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override bool ItemExists(string path)
+ {
+ return true;
+ }
+ #endregion
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ protected ResponseFormat ResponseFormat
+ {
+ get
+ {
+ try
+ {
+ return (ResponseFormat)this.SessionState.PSVariable.Get("ResponseFormat").Value;
+ }
+ catch (Exception)
+ {
+ PSVariable variable = new PSVariable("ResponseFormat");
+ variable.Value = ResponseFormat.data;
+
+ this.SessionState.PSVariable.Set(variable);
+ return ResponseFormat.data;
+ }
+ }
+ }
+//==================================================================================================
+///
+/// This test should not verify the existance of the item at the path.
+/// It should only perform syntactic and semantic validation of the
+/// path. For instance, for the file system provider, that path should
+/// be canonicalized, syntactically verified, and ensure that the path
+/// does not refer to a device.
+///
+///
+///
+//==================================================================================================
+ protected override bool IsValidPath(string path)
+ {
+ return true;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/BaseUIContainer.cs b/Openstack.Client.Powershell/Providers/Common/BaseUIContainer.cs
new file mode 100644
index 0000000..4f7d5f8
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/BaseUIContainer.cs
@@ -0,0 +1,518 @@
+/* ============================================================================
+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.Generic;
+using System.Linq;
+using Openstack.Common.Properties;
+using Openstack.Objects.Domain;
+using System;
+using Openstack.Objects.Utility;
+using Openstack.Objects.DataAccess;
+using System.Collections.ObjectModel;
+using System.Collections;
+using Openstack.Objects.Domain.Compute;
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class GenericUIContainer : BaseEntityUIContainer { }
+
+ public enum ObjectType
+ {
+ Entity = 1,
+ Container = 2
+ }
+ public abstract class BaseUIContainer
+ {
+ private string _id;
+ private string _name;
+ private string _description;
+ private string _path = @"\";
+ private ObjectType _objectType = ObjectType.Container;
+ protected List _containers = new List();
+ protected IList _entities = new List();
+ private BaseEntity _entity;
+ private BaseUIContainer _parentContainer;
+ private bool _isContainerListInitialized = false;
+ private Context _context;
+ private BaseRepositoryFactory _repositoryFactory;
+ private string _displayName = null;
+
+ #region Ctors
+//================================================================================
+///
+///
+///
+//================================================================================
+ public BaseUIContainer()
+ {
+
+ }
+//================================================================================
+///
+///
+///
+///
+///
+///
+///
+///
+//================================================================================
+ public BaseUIContainer(BaseUIContainer parentContainer, string name, string description, string path)
+ {
+ _description = description;
+ _parentContainer = parentContainer;
+ _name = name;
+ _path = path;
+ }
+//================================================================================
+///
+///
+///
+///
+///
+///
+///
+//================================================================================
+ public BaseUIContainer(string displayName, BaseUIContainer parentContainer, string name, string path)
+ {
+ _parentContainer = parentContainer;
+ _name = name;
+ _path = path;
+ _displayName = displayName;
+ }
+ #endregion
+ #region Properties
+//================================================================================
+///
+///
+///
+//================================================================================
+ public BaseRepositoryFactory RepositoryFactory
+ {
+ get { return _repositoryFactory; }
+ set { _repositoryFactory = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public Context Context
+ {
+ get { return _context; }
+ set
+ {
+ _context = value;
+ if (_repositoryFactory != null && _repositoryFactory.Context != null)
+ _repositoryFactory.Context = value;
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+//================================================================================
+ protected bool IsMocked
+ {
+ get
+ {
+ if (Settings.Default.IsMocked == true)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public IList Entities
+ {
+ get { return _entities; }
+ set
+ {
+ _entities = value;
+ }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public BaseEntity Entity
+ {
+ get { return _entity; }
+ set
+ {
+ _entity = value;
+ }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public List Containers
+ {
+ get { return _containers; }
+ //set { _containers = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public ObjectType ObjectType
+ {
+ get { return _objectType; }
+ set { _objectType = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public string Id
+ {
+ get { return _id; }
+ set { _id = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public BaseUIContainer Parent
+ {
+ get { return _parentContainer; }
+ set { _parentContainer = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public string Path
+ {
+ get { return _path; }
+ set { _path = value; }
+
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public string Description
+ {
+ get { return _description; }
+ set { _description = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public string DisplayName
+ {
+ get { return _displayName; }
+ set { _displayName = value; }
+ }
+//================================================================================
+///
+///
+///
+//================================================================================
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ #endregion
+ #region Methods
+//================================================================================
+///
+///
+///
+///
+//================================================================================
+ protected void AddContainer(BaseUIContainer container)
+ {
+ if (container != null) {
+ this.Containers.Add(container);
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ protected string BuildChildPath(string name)
+ {
+ return this.Path + "\\" + name;
+ }
+//================================================================================
+///
+///
+///
+///
+//================================================================================
+ public virtual BaseUIContainer CreateContainer(string id)
+ {
+ return null;
+ }
+//================================================================================
+///
+///
+///
+///
+///
+///
+//================================================================================
+ private bool IsAuthorized(T container)
+ {
+ Type type = container.GetType();
+ object[] metadata = type.GetCustomAttributes(false);
+
+ foreach (object attribute in metadata)
+ {
+ RequiredServiceIdentifierAttribute identifier = attribute as RequiredServiceIdentifierAttribute;
+
+ if (identifier != null)
+ if (this.Context.ServiceCatalog.DoesServiceExist(identifier.ServiceName))
+ return true;
+ else return false;
+ }
+
+ return true;
+ }
+//================================================================================
+///
+///
+///
+///
+///
+///
+///
+///
+//================================================================================
+ protected BaseUIContainer SetContainer(BaseUIContainer container, string name, string description, string path, string displayName = null) where T : BaseUIContainer
+ {
+ if (this.IsAuthorized(container))
+ {
+ container.Name = name;
+ container.Description = description;
+ container.Context = this.Context;
+ container.RepositoryFactory = this.RepositoryFactory;
+ container.Parent = this;
+ container.Path = path;
+ container.DisplayName = displayName;
+ container.Id = name;
+
+ return container;
+ }
+ else
+ {
+ return null;
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+///
+///
+///
+///
+//================================================================================
+ protected BaseUIContainer CreateContainer(string name, string description, string path, string displayName = null) where T : BaseUIContainer
+ {
+ T container = Activator.CreateInstance();
+
+ if (this.IsAuthorized(container))
+ {
+ container.Name = name;
+ container.Description = description;
+ container.Context = this.Context;
+ container.RepositoryFactory = this.RepositoryFactory;
+ container.Parent = this;
+ container.Path = path;
+ container.DisplayName = displayName;
+ container.Id = name;
+
+ return container;
+ }
+ else
+ {
+ return null;
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+//================================================================================
+ public virtual BaseUIContainer CreateEntityContainer(BaseEntity entity)
+ {
+ BaseEntityUIContainer container = new BaseEntityUIContainer();
+ container.Entity = entity;
+
+ return container;
+ }
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ public BaseUIContainer GetContainer(string containerName)
+ {
+ return _containers.Where(c => c.Id == containerName).SingleOrDefault();
+ }
+
+ public virtual void WriteEntityDetails() { return; }
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ protected void SetUIContainers(Collection entities) where T : BaseUIContainer
+ {
+ List entityContainers = new List();
+ foreach (BaseEntity entity in entities)
+ {
+ T entityContainer = (T)Activator.CreateInstance(typeof(T));
+
+ entityContainer.Entity = entity;
+ entityContainer.Name = entity.Name;
+ entityContainer.ObjectType = Common.ObjectType.Entity;
+ entityContainer.Parent = this;
+ entityContainer.RepositoryFactory = this.RepositoryFactory;
+ entityContainer.Context = this.Context;
+ entityContainer.Id = entity.Id;
+
+ entityContainers.Add(entityContainer);
+ }
+
+ this.Containers.Clear();
+
+ int count = 0;
+ foreach (BaseUIContainer bc in entityContainers)
+ {
+ bc.Path = @"\" + bc.Parent.Path + @"\-" + Convert.ToString(count);
+ this.Containers.Add(bc);
+ ++count;
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ protected void SetUIContainers(IList entities) where T : BaseUIContainer
+ {
+ if (entities != null && entities.Count > 0)
+ {
+ List entityContainers = new List();
+ foreach (BaseEntity entity in entities)
+ {
+ T entityContainer = (T)Activator.CreateInstance(typeof(T));
+
+ entityContainer.Entity = entity;
+ entityContainer.Name = entity.Name;
+ entityContainer.ObjectType = Common.ObjectType.Entity;
+ entityContainer.Parent = this;
+ entityContainer.RepositoryFactory = this.RepositoryFactory;
+ entityContainer.Context = this.Context;
+ entityContainer.Id = entity.Id;
+
+ entityContainers.Add(entityContainer);
+ }
+
+ this.Containers.Clear();
+
+ int count = 0;
+ foreach (BaseUIContainer bc in entityContainers)
+ {
+ bc.Path = @"\" + bc.Parent.Path + @"\-" + Convert.ToString(count);
+ this.Containers.Add(bc);
+ ++count;
+ }
+ }
+ }
+ public abstract void Load();
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ public virtual bool IsEntityId(string id)
+ {
+ if (this.Id == id) return true; else return false;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ protected void WriteMetadata(MetaData metadata)
+ {
+ if (metadata != null)
+ {
+ int maxLength = metadata.Max(m => m.Key.Length);
+
+ foreach (KeyValuePair element in metadata)
+ {
+ if (element.Value != null && element.Key != null)
+ Console.WriteLine(element.Key.PadRight(maxLength) + " : " + element.Value.Trim());
+ }
+ Console.WriteLine();
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ protected void WriteHeader(string msg, ConsoleColor textColor = ConsoleColor.Yellow)
+ {
+ Console.ForegroundColor = ConsoleColor.White;
+ Console.WriteLine("");
+ Console.WriteLine(msg );
+ Console.WriteLine();
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/CommonDriveInfo.cs b/Openstack.Client.Powershell/Providers/Common/CommonDriveInfo.cs
new file mode 100644
index 0000000..658f392
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/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/Common/CommonDriveParameters.cs b/Openstack.Client.Powershell/Providers/Common/CommonDriveParameters.cs
new file mode 100644
index 0000000..816e2c0
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/CommonDriveParameters.cs
@@ -0,0 +1,44 @@
+/* ============================================================================
+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;
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class CommonDriveParameters
+ {
+ #region Ctors
+ //=================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=================================================================================
+ public CommonDriveParameters()
+ { }
+ #endregion
+ #region Properties
+ //=================================================================================
+ ///
+ ///
+ ///
+ //=================================================================================
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/Common/CommonServiceProvider.cs b/Openstack.Client.Powershell/Providers/Common/CommonServiceProvider.cs
new file mode 100644
index 0000000..8a67c9b
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/CommonServiceProvider.cs
@@ -0,0 +1,606 @@
+
+/* ============================================================================
+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.Management.Automation.Provider;
+using System.Collections.ObjectModel;
+using System.IO;
+using Openstack.Administration.Domain;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using Openstack.Objects.Domain;
+using System.Management.Automation.Runspaces;
+
+namespace Openstack.Client.Powershell.Providers.Security
+{
+ public enum ContainerAxis
+ {
+ Ancestor = 0,
+ Descendant = 1,
+ Neutral = 3,
+ Root = 4,
+ NotFound = 5
+ }
+
+ [CmdletProvider("OS-Cloud", ProviderCapabilities.None)]
+ public class CommonServiceProvider : BaseNavigationCmdletProvider
+ {
+ #region Provider LifeCycle Support
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ protected override System.Collections.ObjectModel.Collection InitializeDefaultDrives()
+ {
+ this.InitializeSession();
+
+ // Check to see if this provider is in the list of returned Services in the Catalog (indicating access is granted)
+
+ PSDriveInfo driveInfo = new PSDriveInfo("OpenStack", this.ProviderInfo, "/", "Openstack Services Provider", null);
+ Collection drives = new Collection();
+ drives.Add(driveInfo);
+ return drives;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override ProviderInfo Start(ProviderInfo providerInfo)
+ {
+ return base.Start(providerInfo);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override PSDriveInfo NewDrive(PSDriveInfo drive)
+ {
+ WriteDebug("Enter : CloudServiceProvider.NewDrive");
+ if (drive == null)
+ {
+ WriteError(new ErrorRecord(new ArgumentNullException("drive"), "NullDrive", ErrorCategory.InvalidArgument, drive));
+ return null;
+ }
+
+ if (drive.Root == null)
+ {
+ WriteError(new ErrorRecord(new ArgumentNullException("drive.Root"), "NullRoot", ErrorCategory.InvalidArgument, drive));
+ return null;
+ }
+
+ if (drive is CommonDriveInfo)
+ {
+ return drive;
+ }
+
+ var driveParams = this.DynamicParameters as CommonDriveParameters;
+ WriteDebug("Exit : CloudServiceProvider.NewDrive");
+ return new CommonDriveInfo(drive, driveParams);
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ protected override object NewDriveDynamicParameters()
+ {
+ return new CommonDriveParameters();
+ }
+ #endregion
+ #region Basic Operations (LS, CD xxx, CD.. etc)
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override void GetChildItems(string path, bool recurse)
+ {
+ WriteContainer(this.Drive.CurrentContainer);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsParentPath(string path)
+ {
+ if (Path.GetFileNameWithoutExtension(path) == Path.GetFileNameWithoutExtension(this.Drive.CurrentContainer.Parent.Path))
+ return true;
+ else
+ return false;
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void SetRoot()
+ {
+ string defaultTenantId = "TENANTAC1001";
+ BaseUIContainer root = new AccountUIContainer(null, "Account", "The Users assigned Account", @"\\", this.Context, this.RepositoryFactory);
+ Account fake = new Account();
+ fake.Name = "TestAccount";
+ fake.Id = defaultTenantId;
+ root.Entity = fake;
+
+ CurrentAccountUIContainer.CurrentAccount = (AccountUIContainer)root;
+ this.Drive.CurrentContainer = root;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsMovingToContainer(string lastPathEntry)
+ {
+ bool isMovingToContainer = false;
+
+ if (this.Drive.CurrentContainer.Name == lastPathEntry) isMovingToContainer = true;
+
+ foreach (BaseUIContainer container in this.Drive.CurrentContainer.Containers)
+ {
+ if (container.Id == lastPathEntry) isMovingToContainer = true;
+ }
+
+ return isMovingToContainer;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private ContainerAxis CheckContainerAxis(string path)
+ {
+ // Do our Root and Neutrality Checks (by Neutral I mean the User has issued LS on the same entity so no movement along the axis).
+
+ if (path == "\\") return ContainerAxis.Root;
+
+ string lastPathEntry = Path.GetFileNameWithoutExtension(path);
+
+ // See if the User is moving back up to the Parent node of the Current Container.
+
+ if ((this.Drive.CurrentContainer != null && this.Drive.CurrentContainer.Parent != null && lastPathEntry == this.Drive.CurrentContainer.Parent.Id)) return ContainerAxis.Ancestor;
+ if (this.IsNamedAncestor(path)) return ContainerAxis.Ancestor;
+
+ // Before we get started verifying the decendant move, make sure the next node is populated with something first..
+
+ if (this.Drive.CurrentContainer != null && this.Drive.CurrentContainer.Containers.Count == 0)
+ this.Drive.CurrentContainer.Load();
+
+ // Finally see if the User is moving downward into a decendant BaseUIContainer from the current one, if not the input supplied is invalid.
+
+ if (lastPathEntry == this.Drive.CurrentContainer.Id) return ContainerAxis.Descendant;
+
+ if (this.IsMovingToContainer(lastPathEntry)) return ContainerAxis.Descendant;
+ else
+ return ContainerAxis.NotFound;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsNamedAncestor(string path)
+ {
+ string lastPathEntry = Path.GetFileNameWithoutExtension(path);
+
+ if (Path.GetFileNameWithoutExtension(path).StartsWith("-") || path == "\\")
+ {
+ return false;
+ }
+ else if (this.Drive.CurrentContainer.Parent != null && this.Drive.CurrentContainer.Parent.Name == lastPathEntry)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private string TranslateQuickPickNumber(string path)
+ {
+ BaseUIContainer result = null;
+ int number = 0;
+
+ if (Int32.TryParse(Path.GetFileName(path), out number))
+ {
+ if (path == "\\" + this.Drive.CurrentLocation)
+ {
+ return path.Replace(Path.GetFileName(path), this.Drive.CurrentContainer.Entity.Id);
+ }
+ else if (path.Length < this.Drive.CurrentLocation.Length)
+ {
+ result = this.Drive.CurrentContainer.Parent;
+ }
+ else
+ {
+ try
+ {
+ result = this.Drive.CurrentContainer.Containers.Where(q => q.Entity.QuickPickNumber == number).FirstOrDefault();
+ }
+ catch (NullReferenceException ex)
+ {
+ return null;
+ }
+ }
+
+
+ if (result != null)
+ return path.Replace(Path.GetFileName(path), result.Id);
+ else return null;
+ }
+ else return null;
+
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsQuickPickNumber(string path)
+ {
+ int test = 0;
+ return Int32.TryParse(Path.GetFileName(path), out test);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override bool IsItemContainer(string path)
+ {
+ if (this.IsQuickPickNumber(path))
+ {
+ string testPath = this.TranslateQuickPickNumber(path);
+ if (testPath == null && this.Drive.CurrentContainer.Entity != null)
+ {
+ path = path.Replace(Path.GetFileName(path), this.Drive.CurrentContainer.Entity.Id);
+ }
+ else {
+ path = testPath;
+ }
+ }
+
+ switch (this.CheckContainerAxis(path))
+ {
+ case (ContainerAxis.Ancestor):
+
+ // The User has issued "cd .." so we're moving up the Ancestor axis...
+
+ this.Drive.CurrentContainer = this.Drive.CurrentContainer.Parent;
+ this.SessionState.PSVariable.Set("CurrentContainer", this.Drive.CurrentContainer);
+ return true;
+
+ case (ContainerAxis.Descendant):
+
+ // The User has moved down the decendant axis either into a Container representing a single Entity or one that represents
+ // a full blown association of entities.
+
+ this.SetDescendant(path);
+ break;
+
+ case (ContainerAxis.Neutral):
+
+ // The User has issued LS one the same Container so no movement on the axis..
+
+ return true;
+
+ case (ContainerAxis.Root):
+
+ // The User has issued cd\ bringing them all the way back to Root..
+
+ this.SetRoot();
+ return true;
+
+ case (ContainerAxis.NotFound):
+
+ return false;
+ }
+
+ return true;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private bool SetDescendant(string path)
+ {
+ if (this.Drive.CurrentContainer != null && this.Drive.CurrentContainer.Containers != null)
+ {
+ // To clarify, we're looking for the value of the last delimited entry in the path..
+
+ string lastPathEntry = Path.GetFileNameWithoutExtension(path);
+
+ if (lastPathEntry != "" && lastPathEntry != this.Drive.CurrentContainer.Id)
+ {
+ BaseUIContainer container = null;
+ container = this.Drive.CurrentContainer.GetContainer(lastPathEntry);
+ this.SessionState.PSVariable.Set("CurrentContainer", container);
+
+ if (container != null)
+ {
+ // NAVIGATION SUCCESS : The commands value can be matched to an available association so set that node
+ // as the current container\position..
+
+ this.Drive.CurrentContainer = container;
+ this.SessionState.PSVariable.Set("CurrentContainer", container);
+ return true;
+ }
+ else
+ {
+ // SHOW ENTITY DETAILS : Check to see if the key supplied by the User matches any Entity that is being managed
+ // by the current Container. Here, the User has moved (CD) into an Entity and has issued an LS command.
+
+ if (this.Drive.CurrentContainer.Entity != null && this.Drive.CurrentContainer.IsEntityId(lastPathEntry)) return true;
+
+ // The User tried to view the details of some entity yet we havn't pulled that Entity into the Container yet.
+
+ BaseUIContainer entityContainer = this.Drive.CurrentContainer.CreateContainer(lastPathEntry);
+
+ if (entityContainer != null)
+ {
+ // The Read operation on that Entity succeeded so set that Container as current..
+
+ this.Drive.CurrentContainer = entityContainer;
+ this.SessionState.PSVariable.Set("CurrentContainer", container);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+
+ if (this.Drive.CurrentContainer != null)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+ return false;
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteDecendantContainers(BaseUIContainer container)
+ {
+ Contract.Assert(container != null);
+
+ if (container.Containers != null && container.Containers.Where(c => c.ObjectType == ObjectType.Container).Count() > 0)
+ {
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteItemObject("==========================================================================================================", container.Path, false);
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine(container.Name + " " + "Associations");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteItemObject("==========================================================================================================", container.Path, false);
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+
+ foreach (BaseUIContainer testContainer in container.Containers)
+ {
+ if (testContainer.ObjectType == ObjectType.Container)
+ {
+ WriteItemObject(testContainer, container.Path, false);
+ }
+ }
+ //container.Containers.ForEach(c => WriteItemObject(c, c.Path, true));
+ WriteItemObject("", container.Path, false);
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteEntities(BaseUIContainer container)
+ {
+ //if (container.Entities.Count == 0)
+ //container.Load();
+
+ if (container.Entities != null && container.Entities.Count > 0)
+ {
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteItemObject("", container.Path, false);
+ WriteItemObject("==========================================================================================================", container.Path, false);
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ WriteItemObject("The following " + container.Name + " " + "are available.", container.Path, false);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ WriteItemObject("==========================================================================================================", container.Path, false);
+ WriteItemObject("", container.Path, false);
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ int count = 0;
+ foreach (object obj in container.Entities)
+ {
+ this.Host.UI.RawUI.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ BaseEntity tempObj = obj as BaseEntity;
+ if (tempObj != null)
+ {
+ tempObj.QuickPickNumber = count;
+ WriteItemObject(tempObj, this.Drive.CurrentLocation, false);
+ }
+ else
+ {
+ WriteItemObject(obj, this.Drive.CurrentLocation, false);
+ }
+ ++count;
+ }
+
+ WriteItemObject("", this.Drive.CurrentLocation, false);
+ WriteItemObject(Convert.ToString(count) + " " + container.Name + "(s) found", this.Drive.CurrentLocation, false);
+ WriteItemObject("", this.Drive.CurrentLocation, false);
+ }
+ else
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteEntity(BaseUIContainer container)
+ {
+ if (container.ObjectType == ObjectType.Entity)
+ {
+ container.WriteEntityDetails();
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteUIContainer(BaseUIContainer container)
+ {
+ container.Load();
+
+ this.WriteDecendantContainers(container);
+ this.WriteEntities(container);
+ this.WriteEntity(container);
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteEntityContainer(BaseEntityUIContainer container)
+ { }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteContainer(BaseUIContainer container)
+ {
+ this.WriteUIContainer(container);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override void GetChildNames(string path, ReturnContainers returnContainers)
+ {
+ WriteItemObject(path, path, true);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override string GetChildName(string path)
+ {
+ return base.GetChildName(path);
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ protected override bool ItemExists(string path)
+ {
+ return true;
+ }
+//==================================================================================================
+///
+/// This test should not verify the existance of the item at the path.
+/// It should only perform syntactic and semantic validation of the
+/// path. For instance, for the file system provider, that path should
+/// be canonicalized, syntactically verified, and ensure that the path
+/// does not refer to a device.
+///
+///
+///
+//==================================================================================================
+ protected override bool IsValidPath(string path)
+ {
+ return true;
+ }
+ #endregion
+ #region Properties
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private CommonDriveInfo Drive
+ {
+ get
+ {
+ return this.PSDriveInfo as CommonDriveInfo;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/HPServiceIdentifierAttribute.cs b/Openstack.Client.Powershell/Providers/Common/HPServiceIdentifierAttribute.cs
new file mode 100644
index 0000000..73e9252
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/HPServiceIdentifierAttribute.cs
@@ -0,0 +1,54 @@
+/* ============================================================================
+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 Openstack.Objects.Domain.Admin;
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ [System.AttributeUsage(System.AttributeTargets.Class )
+] public class RequiredServiceIdentifierAttribute : System.Attribute
+ {
+ private string _serviceName;
+ private Services _services;
+
+ public Services Services
+ {
+ get { return _services; }
+ set { _services = value; }
+ }
+
+ public RequiredServiceIdentifierAttribute(Services service)
+ {
+ _services = service;
+ }
+
+ public RequiredServiceIdentifierAttribute(string serviceName)
+ {
+ _serviceName = serviceName;
+ }
+
+ public string ServiceName
+ {
+ get
+ {
+ return _serviceName;
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Common/UpdateManager.cs b/Openstack.Client.Powershell/Providers/Common/UpdateManager.cs
new file mode 100644
index 0000000..b78093a
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Common/UpdateManager.cs
@@ -0,0 +1,293 @@
+/* ============================================================================
+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.Linq;
+using System.Xml.Linq;
+using Openstack.Common.Properties;
+using System.Xml.XPath;
+using Openstack.Objects.Utility;
+using Openstack.Objects.DataAccess;
+using System.IO;
+
+namespace Openstack.Client.Powershell.Providers.Common
+{
+ public class UpdateManager
+ {
+ private Settings _settings;
+ private string _currentVersion;
+ private Context _context;
+ private BaseRepositoryFactory _factory = null;
+
+//================================================================================
+///
+///
+///
+//================================================================================
+ public UpdateManager(Context context, string currentVersion, BaseRepositoryFactory factory)
+ {
+ _settings = context.Settings;
+ _currentVersion = currentVersion;
+ _context = context;
+ _factory = new BaseRepositoryFactory(context);
+ }
+//================================================================================
+//
+
+//
+//================================================================================
+ public BaseRepositoryFactory Factory
+ {
+ get { return _factory; }
+ set { _factory = value; }
+ }
+//================================================================================
+///
+///
+///
+///
+///
+//================================================================================
+ private bool RequiresUpdate(XDocument manifest)
+ {
+ try
+ {
+ XElement releaseNode = (from xml2 in manifest.Descendants("Release")
+ where xml2.Attribute(XName.Get("IsCurrentRelease")).Value == "True"
+ select xml2).FirstOrDefault();
+
+ if (releaseNode.Attribute(XName.Get("version")).Value == _currentVersion)
+ return false;
+ else
+ return true;
+ }
+ catch (Exception ex) { return false; }
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ protected void WriteHeaderSection(string headerText)
+ {
+ Console.WriteLine(" ");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("========================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine(headerText);
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("========================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ }
+//=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private string ReplaceToken(string url)
+ {
+ string[] elements = url.Split('/');
+ elements[4] = "AUTH_2485a207-71a4-4429-9e24-f7bf49e207fc";
+ return String.Join("/", elements);
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private string CreateValidSourcePath(string sourcePath)
+ {
+ int pos = sourcePath.IndexOf(':');
+ sourcePath = sourcePath.Remove(pos, 1);
+ return (this.ReplaceToken(this._context.ServiceCatalog.GetService("object-store").Url) + "/" + sourcePath).Replace(@"\", "/");
+ }
+//=========================================================================================
+///
+///
+///
+///
+//=========================================================================================
+ private void GetLatestRelease(XDocument manifest)
+ {
+ IStorageObjectRepository repository = this.Factory.CreateStorageObjectRepository();
+ ((BaseRepository)repository).Context.AccessToken.Id = null;
+
+ XElement releaseNode = (from xml2 in manifest.Descendants("Release")
+ where xml2.Attribute(XName.Get("IsCurrentRelease")).Value == "True"
+ select xml2).FirstOrDefault();
+
+ string sourcePath = this.CreateValidSourcePath(releaseNode.Attribute(XName.Get("InstallPath")).Value);
+
+ repository.Copy(sourcePath, _settings.NewReleaseFolder + Path.GetFileName(sourcePath), false);
+ Console.Write(@" ==> Download of " + _settings.NewReleaseFolder + Path.GetFileName(sourcePath) + " was successful.");
+ Console.WriteLine(" ");
+ }
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private string PromptForCredentials()
+ {
+ Console.WriteLine("Please supply a downloads folder : ");
+ string path = Console.ReadLine();
+ if (!path.EndsWith(@"\")) path = path + @"\";
+
+ if (!path.EndsWith(@"\")) path = path + @"\";
+
+ while (!Directory.Exists(path))
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("");
+ Console.WriteLine("The supplied path does not exist. Please enter a valid path : ");
+ Console.ForegroundColor = ConsoleColor.Green;
+ path = Console.ReadLine();
+ }
+ return path;
+ }
+//=======================================================================================================
+///
+/// Writes out header information to be used during the process that prompts for new credentials.
+///
+//=======================================================================================================
+ private void WriteGetReleasePathHeader()
+ {
+ Console.WriteLine("");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("=======================================================================================================");
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ Console.WriteLine("We've noticed that you haven't supplied a location that we can download new releases to. When a new ");
+ Console.WriteLine("Windows CLI version is released, you will be shown the release notes for that version and be asked ");
+ Console.WriteLine("to download the latest install package. This component will be sent to that location");
+ Console.ForegroundColor = ConsoleColor.DarkGray;
+ Console.WriteLine("=======================================================================================================");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine(" ");
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void UpdateCheck(XDocument manifest)
+ {
+ string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+
+ if (this.RequiresUpdate(manifest))
+ {
+ this.WriteHeaderSection("New updates are available..");
+ Console.WriteLine(" ");
+ this.PrintReleaseNotes(manifest);
+ Console.WriteLine(" ");
+ Console.Write(@"Would you like to download the latest release? (Y\N)");
+ ConsoleKeyInfo key = Console.ReadKey();
+
+ if (key.KeyChar == 'Y' || key.KeyChar == 'y')
+ {
+ _settings.Load(configFilePath);
+ Console.WriteLine(" ");
+ Console.WriteLine(" ");
+ Console.WriteLine(@" ==> Copying latest release to " + _settings.NewReleaseFolder);
+ this.GetLatestRelease(manifest);
+ }
+ else
+ {
+ Console.WriteLine(" ");
+ Console.WriteLine(" ");
+ }
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private void PrintReleaseNotes(XDocument manifest)
+ {
+ XElement releaseNode = (from xml2 in manifest.Descendants("Release")
+ where xml2.Attribute(XName.Get("IsCurrentRelease")).Value == "True"
+ select xml2).FirstOrDefault();
+
+ Console.WriteLine("Version : " + releaseNode.Attribute(XName.Get("version")).Value);
+ Console.WriteLine("Notes :");
+
+ XElement notes = (from xml2 in releaseNode.Descendants()
+ select xml2).FirstOrDefault();
+ Console.WriteLine(notes.Value);
+ }
+//=======================================================================================================
+///
+///
+///
+///
+//=======================================================================================================
+ private bool DoesRequireReleasePath(XElement releasePathNode)
+ {
+ System.Collections.Generic.IEnumerable attributes = releasePathNode.Attributes();
+ foreach (XAttribute attribute in attributes)
+ {
+ if (attribute.Name == "value" && attribute.Value == string.Empty)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ private void CheckReleasePath()
+ {
+ string configFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\" + @"OS\CLI.config";
+ XDocument doc = XDocument.Load(configFilePath);
+ XElement releasePathNode = doc.XPathSelectElement("//add[@key='NewReleaseFolder']");
+
+ if (this.DoesRequireReleasePath(releasePathNode))
+ {
+ this.WriteGetReleasePathHeader();
+ string path = this.PromptForCredentials();
+ releasePathNode.SetAttributeValue("value", path);
+ doc.Save(configFilePath);
+ }
+ }
+//================================================================================
+///
+///
+///
+///
+//================================================================================
+ public void ProcessUpdateCheck()
+ {
+ return;
+ XDocument manifest = XDocument.Load(_settings.ReleaseNotesURI);
+
+ // Make sure that we have a supplied Downloads path from the user to send the release to..
+
+ this.CheckReleasePath();
+
+ // Check for and handle the new update..
+
+ this.UpdateCheck(manifest);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/AbsoluteUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/AbsoluteUIContainer.cs
new file mode 100644
index 0000000..f6b49c9
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/AbsoluteUIContainer.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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class AbsoluteLimitsUIContainer : BaseUIContainer
+ {
+ private List _absoluteLimits;
+
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public AbsoluteLimitsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path,
+ List absoluteLimits)
+ : base(parentContainer, name, description, path)
+ {
+ _absoluteLimits = absoluteLimits;
+ this.ObjectType = ObjectType.Container;
+ }
+
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override BaseUIContainer CreateContainer(string id)
+ {
+ return null;
+ }
+ #endregion
+ #region Properties
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ //public List AbsoluteLimits
+ //{
+ // get { return _absoluteLimits; }
+ // set { _absoluteLimits = value; }
+ //}
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/AddressesUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/AddressesUIContainer.cs
new file mode 100644
index 0000000..392f500
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/AddressesUIContainer.cs
@@ -0,0 +1,31 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class AddressesUIContainer : BaseUIContainer
+ {
+ public override void Load()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/FlavorUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/FlavorUIContainer.cs
new file mode 100644
index 0000000..032f6b6
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/FlavorUIContainer.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.Text;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Client.Powershell.Providers.Common;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class FlavorUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Flavor flavor = (Flavor)this.Entity;
+ this.WriteHeader("Flavor Details");
+ this.WriteFlavorDetails(flavor);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteFlavorDetails(Flavor flavor)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Id : " + flavor.Id);
+ Console.WriteLine("Name : " + flavor.Name);
+ Console.WriteLine("Disk : " + flavor.Disk);
+ Console.WriteLine("Ram : " + flavor.Ram);
+ Console.WriteLine("Status : " + flavor.Status);
+ Console.WriteLine("RxtxCap : " + flavor.RxtxCap);
+ Console.WriteLine("RxtxQuota : " + flavor.RxtxQuota);
+ Console.WriteLine("Swap : " + flavor.Swap);
+ Console.WriteLine("Vcpus : " + flavor.Vcpus);
+ Console.WriteLine("");
+
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/FlavorsUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/FlavorsUIContainer.cs
new file mode 100644
index 0000000..cb4954f
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/FlavorsUIContainer.cs
@@ -0,0 +1,77 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using System.Collections;
+using System.Collections.Generic;
+using Openstack.Objects.Domain.Compute;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class FlavorsUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FlavorsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public FlavorsUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ List flavors = this.RepositoryFactory.CreateFlavorRepository().GetFlavors(null, null);
+ flavors.Sort();
+ this.SetUIContainers(flavors);
+ this.Entities = flavors;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override BaseUIContainer CreateContainer(string id)
+ {
+ return null;
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/FloatingIPUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/FloatingIPUIContainer.cs
new file mode 100644
index 0000000..56d3bf4
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/FloatingIPUIContainer.cs
@@ -0,0 +1,71 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class FloatingIPUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FloatingIPUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public FloatingIPUIContainer()
+ { }
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ //List IPs = this.RepositoryFactory.CreateNetworkRepository().GetFloatingIPs();
+ //if (IPs != null && IPs.Count > 0)
+ //{
+ // this.Entities = IPs;
+ //}
+ //else
+ //{
+ // this.Containers.Clear();
+ // this.Entities.Clear();
+ //}
+ }
+ #endregion
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/Compute/ImageUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/ImageUIContainer.cs
new file mode 100644
index 0000000..36b2b93
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/ImageUIContainer.cs
@@ -0,0 +1,76 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class ImageUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load(){ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Image image = (Image)this.Entity;
+
+ this.WriteHeader("Image Details");
+ this.WriteImageDetails(image);
+ this.WriteHeader("Image meta-data is as follows.", ConsoleColor.White);
+ this.WriteImageMetadata(image);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteImageMetadata(Image image)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ this.WriteMetadata(image.MetaData);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteImageDetails(Image image)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+
+ Console.WriteLine("Id : " + image.Id);
+ Console.WriteLine("Name : " + image.Name);
+ Console.WriteLine("Created On : " + image.CreatedDate);
+ Console.WriteLine("Last Updated On : " + image.LastModified);
+ Console.WriteLine("Status : " + image.Status);
+ Console.WriteLine("Progress : " + image.Progress);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/ImagesUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/ImagesUIContainer.cs
new file mode 100644
index 0000000..e0dfbcf
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/ImagesUIContainer.cs
@@ -0,0 +1,62 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class ImagesUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public ImagesUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public ImagesUIContainer()
+ {}
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ IList images = this.RepositoryFactory.CreateImageRepository().GetImages(null, null, null, null, null);
+ this.SetUIContainers(images);
+ this.Entities = images;
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/KeyPairsUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/KeyPairsUIContainer.cs
new file mode 100644
index 0000000..192cad7
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/KeyPairsUIContainer.cs
@@ -0,0 +1,69 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class KeyPairsUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public KeyPairsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = ObjectType.Container;
+ }
+ public KeyPairsUIContainer()
+ { }
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ IList keypairs = this.RepositoryFactory.CreateKeyPairRepository().GetKeyPairs();
+ if (keypairs != null && keypairs.Count > 0)
+ {
+ this.SetUIContainers(keypairs);
+ this.Entities = keypairs;
+ }
+ else
+ {
+ this.Containers.Clear();
+ this.Entities.Clear();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/LimitsUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/LimitsUIContainer.cs
new file mode 100644
index 0000000..8a1758b
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/LimitsUIContainer.cs
@@ -0,0 +1,159 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain.Compute;
+using System.Xml.Serialization;
+using System.IO;
+using System.Xml.Linq;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class LimitsUIContainer : BaseUIContainer
+ {
+ private Limits _limits;
+
+ public LimitsUIContainer()
+ {
+
+ }
+
+ public override void Load()
+ {
+
+ }
+
+ //=========================================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================================
+ public void LoadContainers()
+ {
+
+
+ //XmlSerializer serializer = new XmlSerializer(typeof(Limits));
+
+
+ //XDocument document = new XDocument();
+ //document.lo
+
+
+ //Limits limits = (Limits)serializer.Deserialize(new FileStream(@"c:\Projects\rates.xml", FileMode.Open, FileAccess.Read));
+ // _limits = (Limits)serializer.Deserialize(new FileStream(@"c:\Projects\results.xml", FileMode.Open, FileAccess.Read));
+ //int y = 7;
+
+
+
+
+
+ //this.Containers.Add(new AbsoluteLimitsUIContainer(this, "Absolute", "Limits based on some monitoring value." , "/"));
+ // this.Containers.Add(new RatesUIContainer(this, "Rates", "Limits based on HTTP Verb in use.", "/"));
+
+
+ //Limits limits = new Limits();
+ //Rate rate1 = new Rate();
+ //rate1.RegEx = "testreg";
+ //rate1.Uri = "theURI";
+
+
+ //limits.rates.Add(rate1);
+
+ //XmlSerializer serializer = new XmlSerializer(typeof(Limits));
+ //TextWriter tw = new StreamWriter(@"c:\Projects\results.xml");
+ //serializer.Serialize(tw, limits);
+ //tw.Close();
+
+
+
+
+
+
+
+
+
+ //Limits limits = this.MockEntity();
+ //RatesUIContainer ratesContainer = new RatesUIContainer(this, "Rates", "Rate limits are specified in terms of both a human-readable wild-card URI and a machine-processable regular expression.", this.BuildChildPath("Rates"));
+ //ratesContainer.Rates = limits.Rates;
+ //this.Containers.Add(ratesContainer);
+ //AbsoluteLimitsUIContainer absoluteLimitsContainer = new AbsoluteLimitsUIContainer(this, "AbsoluteLimits", "Absolute Limits assigned to this account.", this.BuildChildPath("Rates"));
+ //this.Containers.Add(absoluteLimitsContainer);
+
+ }
+ //=========================================================================================================
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================================
+ //private Limits MockEntity()
+ //{
+ // Limits limits = new Limits();
+
+
+ // AbsoluteLimit al1 = new AbsoluteLimit();
+ // al1.Name = "al1 test";
+ // al1.Value = 21;
+ // limits.AbsoluteLimits.Add(al1);
+
+ // AbsoluteLimit al2 = new AbsoluteLimit();
+ // al2.Name = "al2 test";
+ // al2.Value = 21;
+ // limits.AbsoluteLimits.Add(al2);
+
+ // AbsoluteLimit al3 = new AbsoluteLimit();
+ // al3.Name = "al3 test";
+ // al3.Value = 21;
+ // limits.AbsoluteLimits.Add(al3);
+
+ // AbsoluteLimit al4 = new AbsoluteLimit();
+ // al4.Name = "al4 test";
+ // al4.Value = 21;
+ // limits.AbsoluteLimits.Add(al4);
+
+
+ // Rate r1 = new Rate();
+
+ // limits.Rates.Add
+
+
+
+
+
+ //}
+ //=========================================================================================================
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ //=========================================================================================================
+ public LimitsUIContainer(BaseUIContainer parentContainer, string name, string description, string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.LoadContainers();
+ this.ObjectType = ObjectType.Container;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/MetaDataUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/MetaDataUIContainer.cs
new file mode 100644
index 0000000..dda1f66
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/MetaDataUIContainer.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.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class MetaDataUIContainer : BaseUIContainer
+ {
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ public void Load(System.Collections.Generic.Dictionary elements)
+ {
+ List metadataElements = new List();
+
+ foreach (KeyValuePair element in elements) {
+ if (element.Key != String.Empty)
+ metadataElements.Add(new MetaDataElement(element.Key, element.Value));
+ }
+ this.Entities = metadataElements;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void Load()
+ {
+
+ }
+ public override void WriteEntityDetails()
+ {
+
+ base.WriteEntityDetails();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/RatesUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/RatesUIContainer.cs
new file mode 100644
index 0000000..66391f8
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/RatesUIContainer.cs
@@ -0,0 +1,155 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class RatesUIContainer : BaseUIContainer
+ {
+ private List _rates;
+
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public RatesUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path,
+ List rates)
+ : base(parentContainer, name, description, path)
+ {
+ _rates = rates;
+ this.ObjectType = ObjectType.Container;
+ }
+
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private BaseUIContainer MockEntity(string id)
+ {
+ Server server1 = new Server();
+ server1.Name = "server1";
+ server1.Id = "11";
+ ServerUIContainer container = new ServerUIContainer(this, id, "server test", this.Path + "\\" + server1.Id);
+ container.Entity = server1;
+
+ return container;
+
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ _entities = this.MockEntities();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private List MockEntities()
+ {
+ Server server1 = new Server();
+ server1.Name = "server1";
+ server1.Id = "11";
+
+ Server server2 = new Server();
+ server2.Name = "server2";
+ server2.Id = "44";
+
+
+ Server server3 = new Server();
+ server3.Name = "server3";
+ server3.Id = "99";
+
+ Server server4 = new Server();
+ server4.Name = "server4";
+ server4.Id = "23";
+
+ Server server5 = new Server();
+ server5.Name = "server5";
+ server5.Id = "87";
+
+ List servers = new List();
+ servers.Add(server1);
+ servers.Add(server2);
+ servers.Add(server3);
+ servers.Add(server4);
+ servers.Add(server5);
+
+ return servers;
+
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override BaseUIContainer CreateContainer(string id)
+ {
+ return this.MockEntity(id);
+
+ //string tenantId = ((Tenant)CurrentTenantContainer.CurrentTenant.Entity).Id;
+ //IUserRepository repository = RepositoryFactory.CreateUserRepository(ResponseFormat.xml);
+ //User user = repository.GetUser(id, tenantId);
+
+ //if (user != null)
+ //{
+ // UserContainer container = new UserContainer(this, user.AccountId, "test descr", this.BuildChildPath(user.AccountId));
+ // container.Entity = user;
+
+ // return container;
+ //}
+ //else
+ //{
+ // return null;
+ //}
+ }
+ #endregion
+ #region Properties
+ //=========================================================================================================
+ ///
+ ///
+ ///
+ //=========================================================================================================
+ public List Rates
+ {
+ get { return _rates; }
+ set { _rates = value; }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/ServerLogUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/ServerLogUIContainer.cs
new file mode 100644
index 0000000..6d7a0e6
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/ServerLogUIContainer.cs
@@ -0,0 +1,78 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain.Compute.Servers;
+using Openstack.Objects.Domain.Compute.Servers.Actions;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class ServerLogUIContainer : BaseUIContainer
+ {
+ public static int CountStringOccurrences(string text, string pattern)
+ {
+ // Loop through all instances of the string 'text'.
+ int count = 0;
+ int i = 0;
+ while ((i = text.IndexOf(pattern, i)) != -1)
+ {
+ i += pattern.Length;
+ count++;
+ }
+ return count;
+ }
+
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ GetServerLogAction action = new GetServerLogAction();
+ action.ServerId = this.Parent.Entity.Id;
+ this.Entity = (Log)this.RepositoryFactory.CreateServerRepository().GetServerLog(action);
+
+ this.WriteHeader("Log Entries");
+
+ Log log = (Log)this.Entity;
+ System.Text.RegularExpressions.Regex ex = new System.Text.RegularExpressions.Regex(@"\\n");
+ string[] buffer = ex.Split(log.Content);
+
+ Console.WriteLine();
+ foreach (string line in buffer)
+ {
+ Console.WriteLine(line);
+ }
+ Console.WriteLine();
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+
+ this.WriteHeader("Log Entries");
+ Console.Write(((Log)this.Entity).Content);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/ServerUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/ServerUIContainer.cs
new file mode 100644
index 0000000..100d7ef
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/ServerUIContainer.cs
@@ -0,0 +1,279 @@
+/* ============================================================================
+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.Linq;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using System.Collections.Generic;
+using Openstack.Client.Powershell.Providers.BlockStorage;
+using Openstack.Objects.Domain.Security;
+using Openstack.Objects.Domain.Compute.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.DataAccess.Security;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ public class ServerUIContainer : BaseUIContainer
+ {
+ private Image _image;
+ private Flavor _flavor;
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public ServerUIContainer(BaseUIContainer parentContainer, string name, string description, string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.LoadContainers();
+ this.ObjectType = Common.ObjectType.Entity;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public ServerUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadServerDetails();
+ this.LoadContainers();
+ this.LoadFlavorDetails();
+ this.LoadImageDetails();
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadServerDetails()
+ {
+ Server server = (Server)this.Entity;
+ this.Entity = this.RepositoryFactory.CreateServerRepository().GetServer(server.Id);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadFlavorDetails()
+ {
+ Server temp = ((Server)this.Entity);
+ string flavorId = ((EntityRef)temp.Flavor).Id;
+ _flavor = this.RepositoryFactory.CreateFlavorRepository().GetFlavor(flavorId);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadImageDetails()
+ {
+ Server temp = ((Server)this.Entity);
+ string imageId = ((EntityRef)temp.Image).Id;
+ _image = this.RepositoryFactory.CreateImageRepository().GetImage(imageId);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private List GetResolvedSecurityGroups(List groups)
+ {
+ List secGroups = this.RepositoryFactory.CreateSecurityRepository().GetSecurityGroups();
+ try
+ {
+ var innerJoinQuery =
+ from agroup in groups
+ join secGroup in secGroups on agroup.Name equals secGroup.Name
+ select new SecurityGroup()
+ {
+ Id = secGroup.Id,
+ Description = secGroup.Description,
+ Name = secGroup.Name,
+ TenantId = secGroup.TenantId,
+ Rules = secGroup.Rules
+ };
+ return innerJoinQuery.ToList();
+ }
+ catch (Exception) { }
+ return null;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+ BaseUIContainer container = (BaseUIContainer)this.CreateContainer("Metadata", "Metadata about the Server.", this.Parent.Path + @"\Metadata");
+ if (this.Entity != null)
+ {
+ ((MetaDataUIContainer)container).Load(((Server)this.Entity).MetaData);
+ }
+
+ this.Containers.Add(container);
+
+ SecurityGroupsUIContainer sgContainer = (SecurityGroupsUIContainer)this.CreateContainer("SecurityGroups", "Manage this Servers security rules.", this.Parent.Path + @"\SecurityGroups");
+ sgContainer.IsServerGroups = true;
+ sgContainer.LoadEntities(this.GetResolvedSecurityGroups(((Server)this.Entity).SecurityGroups));
+ this.Containers.Add(sgContainer);
+
+ try
+ {
+ AttachmentsUIContainer aContainer = (AttachmentsUIContainer)this.CreateContainer("Volumes", "List the Volumes attached to this Server", this.Parent.Path + @"\Volumes");
+ aContainer.LoadEntities(((Server)this.Entity));
+ //if (aContainer != null && aContainer.Entities != null)
+ if (aContainer != null)
+ this.Containers.Add(aContainer);
+ }
+ catch (Exception ex) { int h = 8; }
+
+ ServerLogUIContainer logContainer = (ServerLogUIContainer)this.CreateContainer("EventLog", "EventLog", this.Parent.Path + @"\Log");
+ this.Containers.Add(logContainer);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void WriteNetworkDetails()
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine();
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Address : " + ((Server)this.Entity).IpAddress);
+ Console.WriteLine();
+
+ //IList addresses = ((Server)this.Entity).Addresses.Private;
+ //if (addresses != null)
+ //{
+ // foreach (IPAddress address in addresses)
+ // {
+ // Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ // Console.WriteLine();
+ // Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ // Console.WriteLine(" Address : " + address.Addr);
+ // Console.WriteLine(" Version : " + address.Version);
+ // Console.WriteLine();
+ // }
+ //}
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void WriteServerDetails(Server server)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + server.Id);
+ Console.WriteLine(" Name : " + server.Name);
+ Console.WriteLine(" UUID : " + server.UUID);
+ Console.WriteLine(" Host Id : " + server.HostId);
+ Console.WriteLine(" Status : " + server.Status);
+ Console.WriteLine(" Progress : " + server.Progress);
+ Console.WriteLine(" Created On : " + server.CreationDate);
+ Console.WriteLine(" Last Update : " + server.LastUpdatedDate);
+ Console.WriteLine(" Key : " + server.KeyName);
+
+ TimeSpan span = DateTime.Now - server.CreationDate;
+ Console.WriteLine(" Age : " + Convert.ToString(span.Days) + " day(s)");
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteImageDetails(Image image)
+ {
+ if (image != null)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + image.Id);
+ Console.WriteLine(" Name : " + image.Name);
+ Console.WriteLine(" Last Modified : " + image.LastModified);
+ Console.WriteLine(" Created On : " + image.CreatedDate);
+ Console.WriteLine(" Status : " + image.Status);
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteFlavorDetails(Flavor flavor)
+ {
+ if (flavor != null)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + flavor.Id);
+ Console.WriteLine(" Name : " + flavor.Name);
+ Console.WriteLine(" RAM : " + flavor.Ram);
+ Console.WriteLine(" Disk : " + flavor.Disk);
+ Console.WriteLine(" Status : " + flavor.Status);
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Server server = (Server)this.Entity;
+
+ this.WriteHeader("Server Details");
+ this.WriteServerDetails(server);
+ this.WriteHeader("Image Information.", ConsoleColor.White);
+ this.WriteImageDetails(_image);
+ this.WriteHeader("Flavor Details", ConsoleColor.White);
+ this.WriteFlavorDetails(_flavor);
+ this.WriteHeader("Assigned Network Addresses", ConsoleColor.White);
+ this.WriteNetworkDetails();
+ Console.WriteLine();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override bool IsEntityId(string id)
+ {
+ if (id == ((Server)this.Entity).Id)
+ return true;
+ else
+ return false;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Compute/ServersUIContainer.cs b/Openstack.Client.Powershell/Providers/Compute/ServersUIContainer.cs
new file mode 100644
index 0000000..2313de9
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Compute/ServersUIContainer.cs
@@ -0,0 +1,103 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Administration.Domain;
+using System.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Compute;
+using Openstack.Objects.Domain;
+using System;
+using System.Collections.ObjectModel;
+using Openstack.Objects;
+using System.Xml.Serialization;
+using System.IO;
+
+namespace Openstack.Client.Powershell.Providers.Compute
+{
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class ServersUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public ServersUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public ServersUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = Common.ObjectType.Container;
+ }
+
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadEntities();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadEntities()
+ {
+ IList servers = this.RepositoryFactory.CreateServerRepository().GetServers(null, null, null, null, ServerStatus.Unknown);
+ if (servers != null && servers.Count > 0)
+ {
+ this.SetUIContainers(servers);
+ this.Entities = servers;
+ }
+ else
+ {
+ this.Containers.Clear();
+ this.Entities.Clear();
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override BaseUIContainer CreateContainer(string id)
+ {
+ return null;
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Dbaas/DBInstancesUIContainer.cs b/Openstack.Client.Powershell/Providers/Dbaas/DBInstancesUIContainer.cs
new file mode 100644
index 0000000..44ff4fa
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Dbaas/DBInstancesUIContainer.cs
@@ -0,0 +1,28 @@
+/* ============================================================================
+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;
+
+namespace Openstack.Client.Powershell.Providers.Dbaas
+{
+ class DBInstancesUIContainer
+ {
+ }
+}
+
+
diff --git a/Openstack.Client.Powershell/Providers/Dbaas/DatabaseUIContainer.cs b/Openstack.Client.Powershell/Providers/Dbaas/DatabaseUIContainer.cs
new file mode 100644
index 0000000..c67e785
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Dbaas/DatabaseUIContainer.cs
@@ -0,0 +1,89 @@
+/* ============================================================================
+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.Collections;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Client.Powershell.Providers.Security;
+using Openstack.Objects.Domain;
+using Openstack.Objects.Utility;
+using Openstack.Objects.DataAccess;
+using Openstack.Client.Powershell.Providers.Compute;
+
+namespace Openstack.Client.Powershell.Providers.Database
+{
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class DatabaseUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public DatabaseUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+ this.Containers.Add(this.CreateContainer("Instances", "Manage Database Instances across the Account..", @"Data\Instances"));
+ this.AddContainer(this.CreateContainer("Flavors", "Manage additional hardware configurations for Database Servers.", @"Data\Flavors"));
+ this.Containers.Add(this.CreateContainer("Snapshots", "Container for storing and managing Database Instance Snapshots. ", @"Data\Snapshots"));
+ this.Containers.Add(this.CreateContainer("SecurityGroups", "Container for storing and managing Database Instance Security Groups. ", @"Data\SecurityGroups"));
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public DatabaseUIContainer(BaseUIContainer parentContainer, string name, string description, string path, Context context, BaseRepositoryFactory repository)
+ : base(parentContainer, name, description, path)
+ {
+ this.Context = context;
+ this.RepositoryFactory = repository;
+
+ this.LoadContainers();
+ this.ObjectType = Client.Powershell.Providers.Common.ObjectType.Entity;
+ }
+ }
+}
+
diff --git a/Openstack.Client.Powershell/Providers/Networking/FloatingIPUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/FloatingIPUIContainer.cs
new file mode 100644
index 0000000..352f020
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/FloatingIPUIContainer.cs
@@ -0,0 +1,87 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class FloatingIPUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FloatingIPUIContainer(BaseUIContainer parentContainer, string name, string description, string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = Common.ObjectType.Entity;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FloatingIPUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ FloatingIP floatingIP = (FloatingIP)this.Entity;
+ this.WriteHeader("Floating IP Details");
+ this.WriteFloatingIPDetails(floatingIP);
+ Console.WriteLine();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteFloatingIPDetails(FloatingIP floatingIP)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + floatingIP.Id);
+ Console.WriteLine(" Fixed Address : " + floatingIP.FixedIPAddress);
+ Console.WriteLine(" Floating Address : " + floatingIP.FloatingIPAddress);
+ Console.WriteLine(" Port Id : " + floatingIP.PortId);
+ Console.WriteLine(" Router Id : " + floatingIP.RouterID);
+ Console.WriteLine(" Tenant Id : " + floatingIP.TenantId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Openstack.Client.Powershell/Providers/Networking/FloatingIPsUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/FloatingIPsUIContainer.cs
new file mode 100644
index 0000000..ad2f259
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/FloatingIPsUIContainer.cs
@@ -0,0 +1,102 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class FloatingIPsUIContainer : BaseUIContainer
+ {
+ private bool _hasLoaded = false;
+
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FloatingIPsUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public FloatingIPsUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = Common.ObjectType.Container;
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ if (!_hasLoaded)
+ {
+ this.LoadEntities();
+ }
+ }
+//=================================================================================================
+///
+///
+///
+//=================================================================================================
+ public void Load(List floatingIPs)
+ {
+ this.Containers.Clear();
+ this.SetUIContainers(floatingIPs);
+ this.Entities = floatingIPs;
+ _hasLoaded = true;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadEntities()
+ {
+ List floatingIPs = this.RepositoryFactory.CreateFloatingIPRepository().GetFloatingIPs();
+
+ if (floatingIPs != null && floatingIPs.Count > 0)
+ {
+ this.SetUIContainers(floatingIPs);
+ this.Entities = floatingIPs;
+ }
+ else
+ {
+ this.Containers.Clear();
+ this.Entities.Clear();
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/NetworkUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/NetworkUIContainer.cs
new file mode 100644
index 0000000..f99e954
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/NetworkUIContainer.cs
@@ -0,0 +1,166 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class NetworkUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadNetworkDetails();
+ this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadPortUIContainers()
+ {
+ string networkId = this.Entity.Id;
+ BaseUIContainer container = (BaseUIContainer)this.CreateContainer("Ports", "Ports associated with this Network.", this.Parent.Path + @"\Port");
+
+ if (this.Entity != null)
+ {
+ IPortRepository repository = this.RepositoryFactory.CreatePortRepository();
+ List allports = repository.GetPorts();
+ List ports = new List();
+
+ foreach (Port port in allports) {
+ if (port.NetworkId == networkId)
+ ports.Add(port);
+ }
+
+ ((PortsUIContainer)container).Load(ports);
+ this.Containers.Add(container);
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadFloatingIPUIContainers()
+ {
+ string networkId = this.Entity.Id;
+ BaseUIContainer container = (BaseUIContainer)this.CreateContainer("FloatingIPs", "Floating IPs associated with this Network.", this.Parent.Path + @"\FloatingIP");
+
+ if (this.Entity != null)
+ {
+ IFloatingIPRepository repository = this.RepositoryFactory.CreateFloatingIPRepository();
+ List allfloatingIPs = repository.GetFloatingIPs();
+ List floatingIPs = new List();
+
+ foreach (FloatingIP floatingIP in allfloatingIPs)
+ {
+ if (floatingIP.FloatingNetworkId == networkId)
+ floatingIPs.Add(floatingIP);
+ }
+
+ ((FloatingIPsUIContainer)container).Load(floatingIPs);
+ this.Containers.Add(container);
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadSubnetUIContainers()
+ {
+ BaseUIContainer container = (BaseUIContainer)this.CreateContainer("Subnets", "Subnets associated with this Network.", this.Parent.Path + @"\Subnet");
+ if (this.Entity != null)
+ {
+ ISubnetRepository repository = this.RepositoryFactory.CreateSubnetRepository();
+ List subnets = new List();
+
+ foreach (string subnetListElement in ((Network)this.Entity).Subnets)
+ {
+ Subnet subnet = repository.GetSubnet(subnetListElement);
+ if (subnet != null)
+ subnets.Add(subnet);
+ }
+
+ ((SubnetsUIContainer)container).Load(subnets);
+ this.Containers.Add(container);
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.Containers.Clear();
+ this.LoadSubnetUIContainers();
+ this.LoadPortUIContainers();
+ this.LoadFloatingIPUIContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void LoadNetworkDetails()
+ {
+ Network network = (Network)this.Entity;
+ this.Entity = this.RepositoryFactory.CreateNetworkRepository().GetNetwork(network.Id);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ private void WriteNetworkDetails(Network network)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + network.Id);
+ Console.WriteLine(" Name : " + network.Name);
+ Console.WriteLine(" Status : " + network.Status);
+ Console.WriteLine(" Admin State Up : " + network.AdminStateUp);
+ Console.WriteLine(" Shared : " + network.Shared);
+ Console.WriteLine(" Is External : " + network.IsExternal);
+ Console.WriteLine(" Port Security Enabled : " + network.PortSecurityEnabled);
+ Console.WriteLine(" Tenant Id : " + network.TenantId);
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Network network = (Network)this.Entity;
+ this.WriteHeader("Network Details");
+ this.WriteNetworkDetails(network);
+ Console.WriteLine();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/NetworksUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/NetworksUIContainer.cs
new file mode 100644
index 0000000..3574c7d
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/NetworksUIContainer.cs
@@ -0,0 +1,110 @@
+/* ============================================================================
+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.Generic;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ // [RequiredServiceIdentifierAttribute("Openstack-ComputeDrive")]
+ public class NetworksUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public NetworksUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public NetworksUIContainer(BaseUIContainer parentContainer,
+ string name,
+ string description,
+ string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = Common.ObjectType.Container;
+ }
+
+ #region Methods
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ {
+ this.LoadEntities();
+ this.LoadContainers();
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadEntities()
+ {
+ List networks = this.RepositoryFactory.CreateNetworkRepository().GetNetworks();
+
+ if (networks != null && networks.Count > 0)
+ {
+ this.SetUIContainers(networks);
+ this.Entities = networks;
+ }
+ else
+ {
+ this.Containers.Clear();
+ this.Entities.Clear();
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void LoadContainers()
+ {
+ this.AddContainer(this.CreateContainer("Subnets", "All Subnets assocated with the Account.", "Subnets"));
+ this.AddContainer(this.CreateContainer("Ports", "All Ports associated with the Account", "Ports"));
+ this.AddContainer(this.CreateContainer("FloatingIPs", "All Floating IPs associated with the Account", "FloatingIPs"));
+ this.AddContainer(this.CreateContainer("Routers", "All Routers associated with the Account", "Routers"));
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public override BaseUIContainer CreateContainer(string id)
+ {
+ return null;
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/PortUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/PortUIContainer.cs
new file mode 100644
index 0000000..5a7eeff
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/PortUIContainer.cs
@@ -0,0 +1,75 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class PortUIContainer : BaseUIContainer
+ {
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void Load()
+ {
+
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private void WriteFixedIPs(Port port)
+ {
+ this.WriteHeader("Assigned Fixed IPs");
+ foreach (FixedIP fixedIP in port.FixedIPs)
+ {
+ Console.WriteLine(" IP Address : " + fixedIP.IpAddress);
+ Console.WriteLine(" Subnet Id : " + fixedIP.SubnetId);
+ Console.WriteLine("");
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Port port = (Port)this.Entity;
+ this.WriteHeader("Port Details");
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + port.Id);
+ Console.WriteLine(" Device Id : " + port.DeviceId);
+ Console.WriteLine(" Device Owner : " + port.DeviceOwner);
+ Console.WriteLine(" MAC Address : " + port.MacAddress);
+ Console.WriteLine(" Status : " + port.Status);
+ Console.WriteLine(" Network Id : " + port.NetworkId);
+ Console.WriteLine(" Admin State Up : " + port.AdminStateUp);
+ Console.WriteLine(" Port Security Enabled : " + port.PortSecurityEnabled);
+ Console.WriteLine(" Binding Type : " + port.BindingType);
+
+ this.WriteFixedIPs(port);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/PortsUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/PortsUIContainer.cs
new file mode 100644
index 0000000..63cb3df
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/PortsUIContainer.cs
@@ -0,0 +1,57 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class PortsUIContainer : BaseUIContainer
+ {
+ private bool _hasLoaded = false;
+//=================================================================================================
+///
+///
+///
+//=================================================================================================
+ public override void Load()
+ {
+ if (!_hasLoaded)
+ {
+ this.Containers.Clear();
+ IPortRepository repository = this.RepositoryFactory.CreatePortRepository();
+ this.Entities = repository.GetPorts();
+ this.SetUIContainers(this.Entities);
+ }
+ }
+//=================================================================================================
+///
+///
+///
+//=================================================================================================
+ public void Load(List ports)
+ {
+ this.Containers.Clear();
+ this.SetUIContainers(ports);
+ this.Entities = ports;
+ _hasLoaded = true;
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/RouterUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/RouterUIContainer.cs
new file mode 100644
index 0000000..0371477
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/RouterUIContainer.cs
@@ -0,0 +1,55 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class RouterUIContainer : BaseUIContainer
+ {
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void Load()
+ {}
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Router router = (Router)this.Entity;
+ this.WriteHeader("Router Details");
+
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + router.Id);
+ Console.WriteLine(" Router Name : " + router.Name);
+ Console.WriteLine(" Status : " + router.Status);
+ Console.WriteLine(" Admin State Up : " + router.AdminStateUp);
+ Console.WriteLine(" Ext Gateway : " + router.ExternalGateway.NetworkId);
+ Console.WriteLine(" Tenant Id : " + router.TenantId);
+ Console.WriteLine("");
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/RoutersUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/RoutersUIContainer.cs
new file mode 100644
index 0000000..0ab94a7
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/RoutersUIContainer.cs
@@ -0,0 +1,40 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class RoutersUIContainer : BaseUIContainer
+ {
+//=================================================================================================
+///
+///
+///
+//=================================================================================================
+ public override void Load()
+ {
+ this.Containers.Clear();
+ IRouterRepository repository = this.RepositoryFactory.CreateRouterRepository();
+ this.Entities = repository.GetRouters();
+ this.SetUIContainers(this.Entities);
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/SubnetUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/SubnetUIContainer.cs
new file mode 100644
index 0000000..6de6522
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/SubnetUIContainer.cs
@@ -0,0 +1,103 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class SubnetUIContainer : BaseUIContainer
+ {
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public SubnetUIContainer(BaseUIContainer parentContainer, string name, string description, string path)
+ : base(parentContainer, name, description, path)
+ {
+ this.ObjectType = Common.ObjectType.Entity;
+ }
+//=========================================================================================================
+///
+///
+///
+///
+///
+///
+//=========================================================================================================
+ public SubnetUIContainer() { }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void Load()
+ { }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteSubnetDetails(Subnet subnet)
+ {
+ Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), this.Context.Forecolor);
+ Console.WriteLine(" Id : " + subnet.Id);
+ Console.WriteLine(" Gateway IP : " + subnet.GatewayIP);
+ Console.WriteLine(" IP Version : " + subnet.IPVersion);
+ Console.WriteLine(" Cidr : " + subnet.Cidr);
+ Console.WriteLine(" DHCP Enabled : " + subnet.EnableDHCP);
+ Console.WriteLine(" Network Id : " + subnet.NetworkId);
+ Console.WriteLine(" Tenant Id : " + subnet.TenantId);
+ }
+//=========================================================================================================
+///
+///
+///
+///
+//=========================================================================================================
+ private void WriteAllocationPools(Subnet subnet)
+ {
+ this.WriteHeader("Available Subnet Allocation Pools");
+ foreach (AllocationPool pool in subnet.AllocationPools)
+ {
+ Console.WriteLine(" Start : " + pool.Start);
+ Console.WriteLine(" End : " + pool.End);
+ Console.WriteLine("");
+ }
+ }
+//=========================================================================================================
+///
+///
+///
+//=========================================================================================================
+ public override void WriteEntityDetails()
+ {
+ Subnet subnet = (Subnet)this.Entity;
+ this.WriteHeader("Subnet Details");
+ this.WriteSubnetDetails(subnet);
+ this.WriteAllocationPools(subnet);
+ Console.WriteLine();
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/Networking/SubnetsUIContainer.cs b/Openstack.Client.Powershell/Providers/Networking/SubnetsUIContainer.cs
new file mode 100644
index 0000000..690bfd6
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/Networking/SubnetsUIContainer.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.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Openstack.Client.Powershell.Providers.Common;
+using Openstack.Objects.DataAccess.Networking;
+using Openstack.Objects.Domain.Networking;
+
+namespace Openstack.Client.Powershell.Providers.Networking
+{
+ public class SubnetsUIContainer : BaseUIContainer
+ {
+ private bool _hasLoaded = false;
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ public void Load(List subnets)
+ {
+ this.Containers.Clear();
+ this.SetUIContainers(subnets);
+ this.Entities = subnets;
+ _hasLoaded = true;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public override void Load()
+ {
+ if (!_hasLoaded)
+ {
+ this.Containers.Clear();
+ List subnets = this.RepositoryFactory.CreateSubnetRepository().GetSubnets();
+ this.SetUIContainers(subnets);
+ this.Entities = subnets;
+ }
+ }
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs
new file mode 100644
index 0000000..8985fb0
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveInfo.cs
@@ -0,0 +1,363 @@
+/* ============================================================================
+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.Generic;
+using System.Management.Automation;
+using System.Collections;
+using Openstack;
+using System.Diagnostics.Contracts;
+using Openstack.Client.Powershell.Utility;
+using System;
+using System.IO;
+using System.Linq;
+using Openstack.Storage;
+using Openstack.Identity;
+
+
+namespace Openstack.Client.Powershell.Providers.Storage
+{
+ public class OpenStackPSDriveInfo : PSDriveInfo
+ {
+ public const string cDelimiter = "/";
+
+ private OSDriveParameters _parameters = null;
+ private IStorageServiceClient _storageClient;
+ private List _pathCache = new List();
+ private bool _isQueueOn = false;
+ private Settings _settings = null;
+ private Context _context;
+ private string _sharePath;
+ private string _storageServiceUrl;
+
+ #region Ctors
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ public OpenStackPSDriveInfo(PSDriveInfo driveInfo, OSDriveParameters parameters, Context context , string storageServiceUrl): base(driveInfo)
+ {
+ _parameters = parameters;
+ _context = context;
+ _storageServiceUrl = storageServiceUrl;
+
+ if (parameters != null)
+ _settings = parameters.Settings;
+ }
+ #endregion
+ #region Methods
+//=======================================================================================================
+///
+///
+///
+///
+///
+//=======================================================================================================
+ private string GetFirstPathElement(string path)
+ {
+ int delimeterPosition;
+
+ if (path.StartsWith(@"\"))
+ {
+ delimeterPosition = path.IndexOf(@"\", 1, StringComparison.Ordinal);
+ if (delimeterPosition != -1)
+ return path.Substring(0, delimeterPosition);
+ else
+ return null;
+ }
+ else
+ {
+ delimeterPosition = path.IndexOf("/", 0, StringComparison.Ordinal);
+ if (delimeterPosition != -1)
+ return path.Substring(0, delimeterPosition);
+ else
+ {
+ delimeterPosition = path.IndexOf(@"\", 0, StringComparison.Ordinal);
+ if (delimeterPosition != -1)
+ return path.Substring(0, delimeterPosition);
+ else
+ return null;
+ }
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+///
+///
+//=======================================================================================================
+ private bool IsHPOSDrive(string name)
+ {
+ if (name != null)
+ {
+ if (name.Contains(":"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else return false;
+ }
+
+ public string SharePath
+ {
+ get { return _sharePath; }
+ set { _sharePath = value; }
+ }
+ private IStorageServiceClient StorageClient
+ {
+ get { return _storageClient; }
+ set { _storageClient = value; }
+ }
+
+//=======================================================================================================
+///
+///
+///
+///
+///
+//=======================================================================================================
+ private bool ContainsHPOSDrive(string name)
+ {
+ foreach (PSDriveInfo drive in this.Provider.Drives)
+ {
+ if (drive.Provider.Name == "OS-Storage" && drive.Name.Contains(name))
+ return true;
+ }
+ return false;
+ }
+////=========================================================================================
+///
+///
+///
+///
+///
+//=========================================================================================
+ private bool IsLocalPath(string path)
+ {
+ // Temporaily reverse the delimiter for this check...
+
+ string temp = path.Replace(@"/", @"\");
+ List drives = DriveInfo.GetDrives().ToList();
+
+ drives.DefaultIfEmpty(null);
+ if (drives.Where(d => temp.ToUpper().Contains(d.Name)).FirstOrDefault() == null)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private bool IsFullyQualifiedPath (string path)
+ {
+ string firstPathElement = GetFirstPathElement(path);
+
+ if (IsHPOSDrive(firstPathElement))
+ {
+ return true;
+ }
+ else if (IsLocalPath(path))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private string FormatPath (string path)
+ {
+ string currentLocation = null;
+
+ // Strip out any leading or trailing delimiters..
+
+ if (path.StartsWith(@"\") || path.StartsWith("/"))
+ {
+ path = path.Substring(1);
+ }
+
+ // Reverse the delimiter and strip out the current location. We do this because some paths will come from the provider
+ // in which PS has already supplied the fully qualified path, yet some paths will come from cmdlets (like CopyItem)
+ // that receive paths from the user. These paths may or may not contain the current location so we strip it out reguardless
+ // then read it back...
+
+ path = path.Replace(@"\", "/");
+ currentLocation = this.CurrentLocation.Replace(@"\", "/");
+
+ if (currentLocation != "")
+ {
+ path = path.Replace(currentLocation + "/", string.Empty);
+ }
+ path = path.Replace(this.Name + "/", string.Empty);
+ return path;
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private StoragePath ProcessRootPath(string path)
+ {
+ path = this.FormatPath(path);
+
+ if (this.IsLocalPath(path))
+ {
+ // Nothing to do to a pure local path. Just return it wrapped up..
+
+ return new StoragePath(path);
+ }
+ else
+ {
+ string firstElement = this.GetFirstPathElement(path);
+
+ if (this.IsHPOSDrive(firstElement))
+ {
+ // 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);
+
+ }
+ else
+ {
+ // If the path supplied lacks a storageContainer name, take the current one..
+
+ return new StoragePath(this.StorageServiceUrl, this.Name, path.Replace(@"\", "/"));
+ }
+ }
+ }
+//==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ private StoragePath ProcessNonRootPath (string path)
+ {
+ string publicURL = this.StorageServiceUrl;
+
+ if (this.IsFullyQualifiedPath(path) == true)
+ {
+ return new StoragePath(this.StorageServiceUrl + "/" + path.Replace(@"\", "/").Replace(":", "/"));
+ }
+ else
+ {
+ path = this.FormatPath(path);
+
+ if (path.EndsWith(cDelimiter))
+ {
+ // We're dealing with a folder path here..
+
+ return new StoragePath(publicURL, this.Name, this.CurrentLocation.Replace(@"\", "/") + cDelimiter + path);
+
+ }
+ else
+ {
+ // We're dealing with an object path here..
+
+ path = (publicURL + cDelimiter + this.Name + cDelimiter + this.CurrentLocation.Replace(@"\", "/") + cDelimiter + path);
+ return new StoragePath(path);
+ }
+ }
+ }
+ //==================================================================================================
+///
+///
+///
+///
+///
+//==================================================================================================
+ public StoragePath CreateStoragePath(string path)
+ {
+ if (this.IsLocalPath(path))
+ {
+ return new StoragePath(path);
+ }
+ else
+ {
+ // Check for a root path supplied first..
+
+ if (this.CurrentLocation == string.Empty)
+ {
+ return this.ProcessRootPath(path);
+ }
+ else
+ {
+ return this.ProcessNonRootPath(path);
+ }
+ }
+ return null;
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ public Hashtable GetParameters()
+ {
+ return null;
+ }
+ #endregion
+ #region Properties
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private string StorageServiceUrl
+ {
+ get
+ {
+ return _storageServiceUrl;
+ }
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ public List PathCache
+ {
+ get { return _pathCache; }
+ set { _pathCache = value; }
+ }
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs
new file mode 100644
index 0000000..f6b1bab
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSDriveParameters.cs
@@ -0,0 +1,42 @@
+/* ============================================================================
+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 Openstack.Client.Powershell.Utility;
+
+namespace Openstack.Client.Powershell.Providers.Storage
+{
+ public class OSDriveParameters
+ {
+ private Settings _settings;
+
+ public Settings Settings
+ {
+ get { return _settings; }
+ set { _settings = value; }
+ }
+ #region Ctors
+//=================================================================================
+///
+///
+///
+///
+//=================================================================================
+ public OSDriveParameters()
+ {
+ }
+
+ #endregion
+ }
+}
diff --git a/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs
new file mode 100644
index 0000000..ded3813
--- /dev/null
+++ b/Openstack.Client.Powershell/Providers/ObjectStorage/HPOSNavigationProvider.cs
@@ -0,0 +1,751 @@
+/* ============================================================================
+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.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 System.Management.Automation.Runspaces;
+using Openstack;
+using System.Threading.Tasks;
+using System.Threading;
+using Openstack.Client.Powershell.Providers.ObjectStorage;
+
+namespace Openstack.Client.Powershell.Providers.Storage
+{
+ [CmdletProvider("Object Storage", ProviderCapabilities.ExpandWildcards)]
+ public class HPOSNavigationProvider : BaseNavigationCmdletProvider
+ {
+ const string cDelimiter = @"\";
+ const string cFolderMarker = "folder.txt";
+
+ private class FolderStatistics
+ {
+ public long TotalFilesFound = 0;
+ public long TotalBytes = 0;
+ public long TotalFoldersFound = 0;
+ }
+ private IStorageServiceClient _storageClient;
+
+
+ private IStorageServiceClient StorageClient
+ {
+ get
+ {
+ IOpenstackClient client = (IOpenstackClient)this.SessionState.PSVariable.GetValue("Client", null);
+ return client.CreateServiceClient();
+ }
+
+ }
+
+ #region Implementation of DriveCmdletProvider
+//==================================================================================================
+///
+/// Removes an Item from the store..
+///
+///
+//==================================================================================================
+ protected override void ClearItem(string path)
+ {
+ base.ClearItem(path);
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ public System.Collections.ObjectModel.Collection GetAvailableDrives(Settings settings, ProviderInfo providerInfo)
+ {
+ IEnumerable storageContainers = null;
+ OSDriveParameters parameters = new OSDriveParameters();
+
+ if (this.Settings != null)
+ {
+ parameters.Settings = this.Settings;
+ }
+ else
+ {
+ parameters.Settings = settings;
+ }
+
+ try
+ {
+ // Get a list of Storage Containers...
+
+ Task> getContainersTask = this.Client.CreateServiceClient().ListStorageContainers();
+ getContainersTask.Wait();
+ storageContainers = getContainersTask.Result;
+ }
+ 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
+ {
+ 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;
+ OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, this.StorageServiceURL);
+ //kvsDriveInfo.SharePath = storageContainer.SharePath;
+ drives.Add(kvsDriveInfo);
+ }
+ }
+ else
+ {
+ PSDriveInfo driveInfo = new PSDriveInfo("OS-Init", this.ProviderInfo, "/", "Root folder for your storageContainer", null);
+ return new Collection
+ {
+ new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, this.StorageServiceURL)
+ };
+ }
+ }
+ catch (Exception)
+ {
+
+ }
+
+ return drives;
+ }
+//==================================================================================================
+///
+///
+///
+//==================================================================================================
+ private void SetDefaultDrive()
+ {
+ Runspace runSpace = RunspaceFactory.CreateRunspace();
+ runSpace.Open();
+ Pipeline pipeline = runSpace.CreatePipeline();
+ Command setDefaultDriveCmd = new Command("Set-Location OS-Init:");
+ pipeline.Commands.Add(setDefaultDriveCmd);
+ }
+//==================================================================================================
+///
+///
+///
+///
+//==================================================================================================
+ private Collection CreateDefaultDrive(OSDriveParameters parameters)
+ {
+ 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)
+ };
+ }
+//==================================================================================================
+///
+/// This is called when the CLIManifest.psd1 is registered with the Import-Module cmdlet.
+///
+///
+//==================================================================================================
+ protected override System.Collections.ObjectModel.Collection InitializeDefaultDrives()
+ {
+ this.InitializeSession();
+
+ if (this.Context.ServiceCatalog.Exists(this.ProviderInfo.Name))
+ {
+ IEnumerable storageContainers = null;
+ OSDriveParameters parameters = new OSDriveParameters();
+ var storageServiceClient = this.Client.CreateServiceClient();
+ Task accountTask = storageServiceClient.GetStorageAccount();
+
+ accountTask.Wait();
+ StorageAccount account = accountTask.Result;
+ storageContainers = account.Containers;
+ Collection drives = new Collection();
+
+ // For every storageContainer that the User has access to, create a Drive that he can mount within Powershell..
+
+ try
+ {
+ if (storageContainers != null)
+ {
+ if (storageContainers.Count() == 1 && storageContainers.First().Name == string.Empty)
+ {
+ return this.CreateDefaultDrive(parameters);
+ }
+ parameters.Settings = this.Settings;
+
+ foreach (StorageContainer storageContainer in storageContainers)
+ {
+ PSDriveInfo driveInfo = new PSDriveInfo(storageContainer.Name, this.ProviderInfo, "/", "Root folder for your storageContainer", null);
+ OpenStackPSDriveInfo kvsDriveInfo = new OpenStackPSDriveInfo(driveInfo, parameters, this.Context, this.StorageServiceURL);
+ //kvsDriveInfo.SharePath = storageContainer.SharePath;
+ drives.Add(kvsDriveInfo);
+ }
+ }
+ else
+ {
+ return this.CreateDefaultDrive(parameters);
+ }
+ }
+ catch (Exception ex)
+ {
+ WriteDebug("Exception : HPOSNavigationProvider.InitializeDefaultDrives");
+ WriteDebug(ex.Message);
+ this.WriteError(new ErrorRecord(ex, "1", ErrorCategory.InvalidArgument, this));
+ }
+ return drives;
+ }
+ else
+ {
+ return null;
+ }
+ }
+//=======================================================================================================
+///
+///
+///
+//=======================================================================================================
+ public bool ContainsWildcard(string path)
+ {
+ if (path.Contains("?") || path.Contains("*") || path.Contains("[") || path.Contains("]"))
+ return true;
+ else
+ return false;
+ }
+//=======================================================================================================
+///
+///
+///
+///
+///
+//=======================================================================================================
+ private string GetContainerName(string path)
+ {
+ return this.Drive.Name;
+
+ if (path == "//")
+ {
+ return this.Drive.Name;
+ }
+ return null;
+ }
+//==================================================================================================
+///
+/// Retrieves a StorageObject with a fully qualified path from the User.
+///
+///
+///
+//==================================================================================================
+ private IEnumerable GetStorageObjects(string path)
+ {
+ List modelViewItems = new List();
+ Task