nttlimitedrd / compute.api.powershell Goto Github PK
View Code? Open in Web Editor NEWA C# client library and PowerShell cmdlets for the Dimension Data CaaS API
License: MIT License
A C# client library and PowerShell cmdlets for the Dimension Data CaaS API
License: MIT License
Cannot remove multiple servers at the same time, with following error message:
Remove-CaasServer : , Error:BadRequest,
Uri:https://api-au.dimensiondata.com/oec/0.9/1578108f-e4aa-4ab7-8b2b-b9244482df93/server/04f88390-265c-4269-b18e-1556dc8ab815?deleteCaaSOperationStatus: {"operation":"Delete
Server","result":"ERROR","resultDetail":"Another operation is in progress on Server with Id 04f88390-265c-4269-b18e-1556dc8ab815. Please try again
later.","resultCode":"REASON_392","additionalInformation":null}
As we can remove multiple servers in CaaS UI, should we have the same ability in PS Module?
In this case, we can create or remove multiple servers at the same time.
Thanks
River
Actions for CaasVipNode has only a parameter "Enabled" as bool, it should be 3 different status:
Same as all actions for CaasVipPoolMember.
Hi Guys,
I am looking to a Cmdlet Remove-CaasVlan, like Remove-CaasNetwork to use against a MCP 2.0.
Thank you
Job.
as per request from Darren Harris.
The API documentation states that the drsEligible should either contain true/false or the consistencyGroup if it was configured in a consistency group.
The current drsEligible type only defines a default constructor.
[DebuggerStepThrough]
[DesignerCategory("code")]
[GeneratedCode("xsd", "4.6.1055.0")]
[XmlRoot("drsEligible", Namespace = "urn:didata.com:api:cloud:types")]
[XmlType(Namespace = "urn:didata.com:api:cloud:types")]
public class drsEligible
{
public drsEligible();
}
HI, I am trying to use Add-CaasBackupClient command however when I try to use the email address I get the following error message.
Command
$link = Add-CaasBackupClient -Server $server -StoragePolicy $stoPolicy -SchedulePolicy $schPolicy -ClientType $clientType -Trigger ON_SUCCESS_OR_FAILURE -EmailAddresses [[email protected]]
Error
Add-CaasBackupClient : Cannot bind parameter 'EmailAddresses'. Cannot convert the "[[email protected]]" value of type "System.String" to type
"System.Collections.Generic.IReadOnlyList`1[System.String]".
At line:1 char:170
~~~~~~~~~~~~~~~~~~~~
Other trials
I have also tried different formats of the email address, however they all error
@([email protected])
@("[email protected]")
"[email protected]"
["[email protected]"]
[[email protected]]
Any help would be appreciated.
Thanks.
To expose for both .NET library and PowerShell Module:
http://stackoverflow.com/questions/16526689/using-a-proxy-with-net-4-5-httpclient
What would be nice is having something like
$con = New-CaaSConnection -ApiCredentials (Get-Credential)
$con.SetProxy('https://proxy.com:8888')
Even they are in the different network domains.
I don't understand why... Maybe someone can give me a heads up?
Both the New-CaasNetworkDomain and New-CaasVlan commands essentially return null values.
They should return a Job object by default, and have a -Wait
flag parameter, which if used they provision then return the respective NetworkDomain/VLAN type object back
We can have Network Domains have same name in different datacenters.
When we search this name, it will return multiple result.
It's hard for user to locate a single object.
Hi Team,
We are trying to change the server config by Shutting down the server, changing the config and then starting the server again. The below script does run through and works but it also generates this exception. Hence though of asking you to help if i am missing something here.
Out-CaasWaitForOperation : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not
match any of the parameters that take pipeline input.
At C:\Scripts\CloudAPIServerChangeSpecs\serverchangespecs.ps1:16 char:63
~~~~~~~~~~~~~~~~~~
Script:
foreach ( $serverName in $serverNames ) {
$server = Get-CaasServers -Name $serverName -Network $prodNetwork
if ($server.started -eq "True" ){
Write-Output "$serverName is running"
Set-CaasServerState -Action PowerOff -Server $server -PassThru | Out-CaasWaitForOperation | Set-CaasServer -CPUCount 2 -MemoryInMB $Memory4GB -PassThru | Out-CaasWaitForOperation |
Set-CaasServerState -Action PowerOn
Start-Sleep 30
Write-Output "$serverName has been updated with new config"
Get-CaasServers -Name $serverName -Network $prodNetwork
}
else
{
Write-Output "$serverName is Not Running"
}
Wonder if someone can point me in the right direction.
I trying to create a VM form a customer template using powershell. If using the following command:
$serverDetails = New-CaasServerDetails -Name $machineName -AdminPassword $adminPass -IsStarted $powerState -NetworkDomain $networkdomain -PrimaryVlan $vlan -PrimaryDns $primarydns -SecondaryDns $secondarydns -ServerImage $serverImage -CpuSpeed $vcputype -CpuCount $vcpu -MemoryGb $vram -CpuCoresPerSocket 1
I get the following message:
New-CaasServerDetails : ServerImage type cannot be converted to DD.CBU.Compute.Api.Contracts.Image.ImagesWithDiskSpeedImageor
toDD.CBU.Compute.Api.Contracts.Network20.OsImageType
At C:\support store\Server Builder\VMBuilder.ps1:231 char:26
$serverDetails = New-CaasServerDetails -Name $machineName -AdminPassword ...
+ CategoryInfo : InvalidArgument: (:) [New-CaasServerDetails], ArgumentException
+ FullyQualifiedErrorId : -3,DD.CBU.Compute.Powershell.NewCaasServerDetailsCmdlet
Can I use powershell to create a Virtual machine from a customer template?
What does ImagesWithDiskSpeedImage mean?
New-CaasNetworkDomain has "Location", which refers to Get-CaasNetworkDomain's "DatacenterId".
I think we'd better keep one name as "DatacenterId" rather than "Location" as it's using "DatacenterId" in the web API.
Any suggestion?
If you guys are all OK with this, I'll go ahead to change it in New-CaasNetworkDomain.
Thanks
River
Hi Team,
Not sure if this is the right place to post this but couldn't find anywhere else. The DD dev portal doesn't allow either. I am using the latest powershell module and having this issue to shutdown a server uisng it's name. I do understand that All commands expecting the -Server parameter must use the Get-CaasServer but can't figure out to pass that . Hoping that you could help.
command:
Set-CaasServerState -Action Shutdown -Server myservername
Error received:
et-CaasServerState : Cannot bind parameter 'Server'. Cannot convert the myservername value of type
"System.String" to type "DD.CBU.Compute.Api.Contracts.Server.ServerWithBackupType".
At line:1 char:48
~~~~~~~~~~~~~~~~~
Greetings,
I am able to use the New-CaaSConnection command manually via a PowerShell window and it works fine. However, I'm attempting to build out a form based in PowerShell. Login page is already made and scripted. However, when it attempts to run the New-CaaSConnection command via that process, it just hangs and never connects or does anything further.
I've copy/pasted the exact same process into PowerShell manually and it works fine. Not sure why that would be, and I'm not even sure if this is the right place to submit this as an issue, but it is strange.
The response of Get-CaasServers is not great to read because there are so many complex types in the field list.
We should implement ToString
overrides to types like OperatingSystemType, ServerTypeNetworkInfo
operatingSystem : DD.CBU.Compute.Api.Contracts.Network20.OperatingSystemType
cpu : DD.CBU.Compute.Api.Contracts.Network20.CpuType
memoryGb : 4
disk : {129135ed-96dd-48fe-90f1-60fa962c34ed}
Item : DD.CBU.Compute.Api.Contracts.Network20.ServerTypeNetworkInfo
backup :
monitoring :
softwareLabel :
sourceImageId : 0fcabe1a-df59-4dab-b552-050ba9dc675f
createTime : 5/26/2016 2:07:34 AM
deployed : True
started : False
state : NORMAL
progress :
vmwareTools : DD.CBU.Compute.Api.Contracts.Network20.VmwareToolsType
virtualHardware : DD.CBU.Compute.Api.Contracts.Network20.VirtualHardwareType
id : e7d756dd-084d-45ab-bd4d-241b85f156b4
datacenterId : AU9
Need commandlet to modify a NIC IP Address.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.