All parameters should be configured through JSON

1. Create JSON files that will help in creation of new pools based on
existing pools configuration.
2. Configure all the pool attributes through JSON file.
3. Validation of the attributes passed in the JSON file.
This commit is contained in:
praveenmathamsetty
2017-01-08 21:33:47 +05:30
parent e658ebbe9a
commit 0c5518d439
9 changed files with 1382 additions and 190 deletions

View File

@@ -1,17 +1,31 @@
{ {
"Type": "AUTOMATED", "Type": "AUTOMATED",
"Data": { "Data": {
"Name": "LCFarmTest", "Name": "LCFarmJson",
"DisplayName": "Ankit LC Farm Test", "DisplayName": "FarmJsonTest",
"AccessGroup": "Root", "AccessGroup": "Root",
"Description": "created LC Farm from PS", "Description": "created LC Farm from PS via JSON",
"Enabled": null, "Enabled": null,
"Deleting": false, "Deleting": false,
"Settings": null, "Settings": {
"DisconnectedSessionTimeoutPolicy" : "NEVER",
"DisconnectedSessionTimeoutMinutes" : 1,
"EmptySessionTimeoutPolicy" : "AFTER",
"EmptySessionTimeoutMinutes" : 1,
"LogoffAfterTimeout" : false
},
"Desktop": null, "Desktop": null,
"DisplayProtocolSettings": null, "DisplayProtocolSettings": {
"DefaultDisplayProtocol" : "PCOIP",
"AllowDisplayProtocolOverride" : false,
"EnableHTMLAccess" : false
},
"ServerErrorThreshold": null, "ServerErrorThreshold": null,
"MirageConfigurationOverrides": null "MirageConfigurationOverrides": {
"OverrideGlobalSetting" : false,
"Enabled" : false,
"Url" : null
}
}, },
"AutomatedFarmSpec": { "AutomatedFarmSpec": {
"ProvisioningType": "VIEW_COMPOSER", "ProvisioningType": "VIEW_COMPOSER",
@@ -19,7 +33,7 @@
"RdsServerNamingSpec": { "RdsServerNamingSpec": {
"NamingMethod": "PATTERN", "NamingMethod": "PATTERN",
"PatternNamingSettings": { "PatternNamingSettings": {
"NamingPattern": "LCFarmVM_PS", "NamingPattern": "LCFarmVMPS",
"MaxNumberOfRDSServers": 1 "MaxNumberOfRDSServers": 1
} }
}, },
@@ -28,17 +42,17 @@
"StopProvisioningOnError": true, "StopProvisioningOnError": true,
"MinReadyVMsOnVComposerMaintenance": 0, "MinReadyVMsOnVComposerMaintenance": 0,
"VirtualCenterProvisioningData": { "VirtualCenterProvisioningData": {
"ParentVm": "Win_Server_2012_R2", "ParentVm": "RDSServer",
"Snapshot": "Snap_RDS", "Snapshot": "RDS_SNAP1",
"Datacenter": null, "Datacenter": null,
"VmFolder": "AnkitPoolVM", "VmFolder": "Praveen",
"HostOrCluster": "cls", "HostOrCluster": "CS-1",
"ResourcePool": "cls" "ResourcePool": "CS-1"
}, },
"VirtualCenterStorageSettings": { "VirtualCenterStorageSettings": {
"Datastores": [ "Datastores": [
{ {
"Datastore": "datastore1 (5)", "Datastore": "Datastore1",
"StorageOvercommit": "UNBOUNDED" "StorageOvercommit": "UNBOUNDED"
} }
], ],
@@ -67,7 +81,7 @@
"AdContainer": "CN=Computers", "AdContainer": "CN=Computers",
"ReusePreExistingAccounts": false, "ReusePreExistingAccounts": false,
"SysprepCustomizationSettings": { "SysprepCustomizationSettings": {
"CustomizationSpec": "RDSH_Cust2" "CustomizationSpec": "PraveenCust"
} }
}, },
"RdsServerMaxSessionsData": { "RdsServerMaxSessionsData": {
@@ -76,5 +90,5 @@
} }
}, },
"ManualFarmSpec": null, "ManualFarmSpec": null,
"NetBiosName" : "adankit" "NetBiosName" : "adviewdev"
} }

View File

@@ -7,17 +7,31 @@
"Description": "Manual PS Test", "Description": "Manual PS Test",
"Enabled": null, "Enabled": null,
"Deleting": false, "Deleting": false,
"Settings": null, "Settings": {
"DisconnectedSessionTimeoutPolicy" : "NEVER",
"DisconnectedSessionTimeoutMinutes" : 1,
"EmptySessionTimeoutPolicy" : "AFTER",
"EmptySessionTimeoutMinutes" : 1,
"LogoffAfterTimeout" : false
},
"Desktop": null, "Desktop": null,
"DisplayProtocolSettings": null, "DisplayProtocolSettings": {
"DefaultDisplayProtocol" : "PCOIP",
"AllowDisplayProtocolOverride" : false,
"EnableHTMLAccess" : false
},
"ServerErrorThreshold": null, "ServerErrorThreshold": null,
"MirageConfigurationOverrides": null "MirageConfigurationOverrides": {
"OverrideGlobalSetting" : false,
"Enabled" : false,
"Url" : null
}
}, },
"AutomatedFarmSpec": null, "AutomatedFarmSpec": null,
"ManualFarmSpec": { "ManualFarmSpec": {
"RdsServers": [ "RdsServers": [
{ {
"rdsServer": "WIN-ORKA1Q8B0P7" "rdsServer": "RDSServer.adviewdev.eng.vmware.com"
} }
] ]
} }

View File

@@ -5,7 +5,44 @@
"AccessGroup": "Root", "AccessGroup": "Root",
"Description": "create full clone via JSON" "Description": "create full clone via JSON"
}, },
"DesktopSettings": null, "DesktopSettings": {
"enabled": true,
"deleting": false,
"connectionServerRestrictions": null,
"logoffSettings": {
"powerPolicy": "TAKE_NO_POWER_ACTION",
"automaticLogoffPolicy": "NEVER",
"automaticLogoffMinutes": 120,
"allowUsersToResetMachines": false,
"allowMultipleSessionsPerUser": false,
"deleteOrRefreshMachineAfterLogoff": "NEVER",
"refreshOsDiskAfterLogoff": "NEVER",
"refreshPeriodDaysForReplicaOsDisk": 5,
"refreshThresholdPercentageForReplicaOsDisk": 10
},
"displayProtocolSettings": {
"supportedDisplayProtocols": ["PCOIP", "BLAST" ],
"defaultDisplayProtocol": "BLAST",
"allowUsersToChooseProtocol": true,
"pcoipDisplaySettings": {
"renderer3D": "DISABLED",
"enableGRIDvGPUs": false,
"vRamSizeMB": 96,
"maxNumberOfMonitors": 3,
"maxResolutionOfAnyOneMonitor": "WSXGA_PLUS"
},
"enableHTMLAccess": true
},
"flashSettings": {
"quality": "NO_CONTROL",
"throttling": "DISABLED"
},
"mirageConfigurationOverrides": {
"overrideGlobalSetting": false,
"enabled": false,
"url": false
}
},
"Type": "AUTOMATED", "Type": "AUTOMATED",
"AutomatedDesktopSpec": { "AutomatedDesktopSpec": {
"ProvisioningType": "VIRTUAL_CENTER", "ProvisioningType": "VIRTUAL_CENTER",
@@ -69,7 +106,7 @@
"NoCustomizationSettings": { "NoCustomizationSettings": {
"DoNotPowerOnVMsAfterCreation": false "DoNotPowerOnVMsAfterCreation": false
}, },
"SysprepCustomizationSettings": null, "SysprepCustomizationSettings": {"customizationSpec" : "praveencust"},
"QuickprepCustomizationSettings": null, "QuickprepCustomizationSettings": null,
"CloneprepCustomizationSettings": null "CloneprepCustomizationSettings": null
} }
@@ -77,6 +114,5 @@
"ManualDesktopSpec": null, "ManualDesktopSpec": null,
"RdsDesktopSpec": null, "RdsDesktopSpec": null,
"GlobalEntitlementData": null, "GlobalEntitlementData": null,
"NetBiosName" : "adviewdev", "NetBiosName" : "adviewdev"
"SysPrepName" : "praveencust"
} }

View File

@@ -5,7 +5,44 @@
"AccessGroup": "ROOT", "AccessGroup": "ROOT",
"Description": "create instant pool" "Description": "create instant pool"
}, },
"DesktopSettings": null, "DesktopSettings": {
"enabled": true,
"deleting": false,
"connectionServerRestrictions": null,
"logoffSettings": {
"powerPolicy": "ALWAYS_POWERED_ON",
"automaticLogoffPolicy": "NEVER",
"automaticLogoffMinutes": 120,
"allowUsersToResetMachines": false,
"allowMultipleSessionsPerUser": false,
"deleteOrRefreshMachineAfterLogoff": "DELETE",
"refreshOsDiskAfterLogoff": "NEVER",
"refreshPeriodDaysForReplicaOsDisk": 5,
"refreshThresholdPercentageForReplicaOsDisk": 10
},
"displayProtocolSettings": {
"supportedDisplayProtocols": ["PCOIP", "BLAST" ],
"defaultDisplayProtocol": "BLAST",
"allowUsersToChooseProtocol": true,
"pcoipDisplaySettings": {
"renderer3D": "DISABLED",
"enableGRIDvGPUs": false,
"vRamSizeMB": 96,
"maxNumberOfMonitors": 3,
"maxResolutionOfAnyOneMonitor": "WSXGA_PLUS"
},
"enableHTMLAccess": true
},
"flashSettings": {
"quality": "NO_CONTROL",
"throttling": "DISABLED"
},
"mirageConfigurationOverrides": {
"overrideGlobalSetting": false,
"enabled": false,
"url": false
}
},
"Type": "AUTOMATED", "Type": "AUTOMATED",
"AutomatedDesktopSpec": { "AutomatedDesktopSpec": {
"ProvisioningType": "INSTANT_CLONE_ENGINE", "ProvisioningType": "INSTANT_CLONE_ENGINE",

View File

@@ -5,7 +5,44 @@
"AccessGroup": "Root", "AccessGroup": "Root",
"Description": "created linkedclone pool from ps" "Description": "created linkedclone pool from ps"
}, },
"DesktopSettings": null, "DesktopSettings": {
"enabled": true,
"deleting": false,
"connectionServerRestrictions": null,
"logoffSettings": {
"powerPolicy": "TAKE_NO_POWER_ACTION",
"automaticLogoffPolicy": "NEVER",
"automaticLogoffMinutes": 120,
"allowUsersToResetMachines": false,
"allowMultipleSessionsPerUser": false,
"deleteOrRefreshMachineAfterLogoff": "NEVER",
"refreshOsDiskAfterLogoff": "NEVER",
"refreshPeriodDaysForReplicaOsDisk": 5,
"refreshThresholdPercentageForReplicaOsDisk": 10
},
"displayProtocolSettings": {
"supportedDisplayProtocols": ["RDP","PCOIP", "BLAST" ],
"defaultDisplayProtocol": "PCOIP",
"allowUsersToChooseProtocol": true,
"pcoipDisplaySettings": {
"renderer3D": "DISABLED",
"enableGRIDvGPUs": false,
"vRamSizeMB": 96,
"maxNumberOfMonitors": 3,
"maxResolutionOfAnyOneMonitor": "WSXGA_PLUS"
},
"enableHTMLAccess": true
},
"flashSettings": {
"quality": "NO_CONTROL",
"throttling": "DISABLED"
},
"mirageConfigurationOverrides": {
"overrideGlobalSetting": false,
"enabled": false,
"url": null
}
},
"Type": "AUTOMATED", "Type": "AUTOMATED",
"AutomatedDesktopSpec": { "AutomatedDesktopSpec": {
"ProvisioningType": "VIEW_COMPOSER", "ProvisioningType": "VIEW_COMPOSER",
@@ -33,7 +70,7 @@
"Template": null, "Template": null,
"ParentVm": "Agent_pra", "ParentVm": "Agent_pra",
"Snapshot": "kb-hotfix", "Snapshot": "kb-hotfix",
"Datacenter": null, "Datacenter": "Dev-Dc",
"VmFolder": "Praveen", "VmFolder": "Praveen",
"HostOrCluster": "CS-1", "HostOrCluster": "CS-1",
"ResourcePool": "CS-1" "ResourcePool": "CS-1"
@@ -52,7 +89,8 @@
"UseNativeSnapshots": false, "UseNativeSnapshots": false,
"SpaceReclamationSettings": { "SpaceReclamationSettings": {
"ReclaimVmDiskSpace": false, "ReclaimVmDiskSpace": false,
"ReclamationThresholdGB": null "ReclamationThresholdGB": null,
"BlackoutTimes" : null
}, },
"PersistentDiskSettings": { "PersistentDiskSettings": {
"RedirectWindowsProfile": false, "RedirectWindowsProfile": false,
@@ -75,19 +113,31 @@
} }
}, },
"VirtualCenterNetworkingSettings": { "VirtualCenterNetworkingSettings": {
"Nics": null "Nics": [
{
"Nic": "nicName",
"NetworkLabelAssignmentSpecs": [
{
"Enabled" : false,
"networkLabel" : null,
"maxLabelType" : null,
"maxLabel" : null
}
]
}
]
} }
}, },
"VirtualCenterManagedCommonSettings": { "VirtualCenterManagedCommonSettings": {
"TransparentPageSharingScope": "VM" "TransparentPageSharingScope": "VM"
}, },
"CustomizationSettings": { "CustomizationSettings": {
"CustomizationType": "QUICK_PREP", "CustomizationType": "SYS_PREP",
"DomainAdministrator": null, "DomainAdministrator": "administrator",
"AdContainer": "CN=Computers", "AdContainer": "CN=Computers",
"ReusePreExistingAccounts": false, "ReusePreExistingAccounts": false,
"NoCustomizationSettings": null, "NoCustomizationSettings": null,
"SysprepCustomizationSettings": null, "SysprepCustomizationSettings": {"customizationSpec" : "praveencust"},
"QuickprepCustomizationSettings": { "QuickprepCustomizationSettings": {
"PowerOffScriptName": null, "PowerOffScriptName": null,
"PowerOffScriptParameters": null, "PowerOffScriptParameters": null,
@@ -100,6 +150,5 @@
"ManualDesktopSpec": null, "ManualDesktopSpec": null,
"RdsDesktopSpec": null, "RdsDesktopSpec": null,
"GlobalEntitlementData": null, "GlobalEntitlementData": null,
"NetBiosName" : "adviewdev", "NetBiosName" : "adviewdev"
"SysPrepName" : "praveencust"
} }

View File

@@ -5,7 +5,44 @@
"AccessGroup": "ROOT", "AccessGroup": "ROOT",
"Description": "Manual pool creation" "Description": "Manual pool creation"
}, },
"DesktopSettings": null, "DesktopSettings": {
"enabled": true,
"deleting": false,
"connectionServerRestrictions": null,
"logoffSettings": {
"powerPolicy": "TAKE_NO_POWER_ACTION",
"automaticLogoffPolicy": "NEVER",
"automaticLogoffMinutes": 120,
"allowUsersToResetMachines": false,
"allowMultipleSessionsPerUser": false,
"deleteOrRefreshMachineAfterLogoff": "NEVER",
"refreshOsDiskAfterLogoff": "NEVER",
"refreshPeriodDaysForReplicaOsDisk": 5,
"refreshThresholdPercentageForReplicaOsDisk": 10
},
"displayProtocolSettings": {
"supportedDisplayProtocols": ["PCOIP", "BLAST" ],
"defaultDisplayProtocol": "BLAST",
"allowUsersToChooseProtocol": true,
"pcoipDisplaySettings": {
"renderer3D": "DISABLED",
"enableGRIDvGPUs": false,
"vRamSizeMB": 96,
"maxNumberOfMonitors": 3,
"maxResolutionOfAnyOneMonitor": "WSXGA_PLUS"
},
"enableHTMLAccess": true
},
"flashSettings": {
"quality": "NO_CONTROL",
"throttling": "DISABLED"
},
"mirageConfigurationOverrides": {
"overrideGlobalSetting": false,
"enabled": false,
"url": false
}
},
"Type": "MANUAL", "Type": "MANUAL",
"AutomatedDesktopSpec": null, "AutomatedDesktopSpec": null,
"ManualDesktopSpec": { "ManualDesktopSpec": {
@@ -16,7 +53,7 @@
"Source": "VIRTUAL_CENTER", "Source": "VIRTUAL_CENTER",
"Machines": [ "Machines": [
{ {
"Machine" : "PowerCLI-VM" "Machine" : "Praveen_Agent"
} }
], ],
"VirtualCenter": null, "VirtualCenter": null,
@@ -32,4 +69,5 @@
}, },
"RdsDesktopSpec": null, "RdsDesktopSpec": null,
"GlobalEntitlementData": null "GlobalEntitlementData": null
} }

View File

@@ -0,0 +1,27 @@
{
"Base": {
"Name" : "RdsJson",
"DisplayName": "TestRDSPS",
"AccessGroup": "Root",
"Description": "Testing PS"
},
"DesktopSettings": {
"enabled": true,
"deleting": false,
"connectionServerRestrictions": null,
"logoffSettings": null,
"displayProtocolSettings": null,
"flashSettings": {
"quality": "NO_CONTROL",
"throttling": "DISABLED"
},
"mirageConfigurationOverrides": null
},
"Type": "RDS",
"AutomatedDesktopSpec": null,
"ManualDesktopSpec": null,
"RdsDesktopSpec": {
"Farm": "test1"
},
"GlobalEntitlementData": null
}

View File

@@ -1,16 +0,0 @@
{
"Base": {
"Name" : "RdsJson",
"DisplayName": "TestRDSPS",
"AccessGroup": "Root",
"Description": "Testing PS"
},
"DesktopSettings": null,
"Type": "RDS",
"AutomatedDesktopSpec": null,
"ManualDesktopSpec": null,
"RdsDesktopSpec": {
"Farm": "Farm2"
},
"GlobalEntitlementData": null
}

File diff suppressed because it is too large Load Diff