Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Commit

Permalink
fixed scriptanalyzer warnings and updated manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
bgelens committed May 2, 2016
1 parent 06cf339 commit cc1dd11
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 9 deletions.
53 changes: 48 additions & 5 deletions WapTenantPublicAPI.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'WapTenantPublicAPI'

# Version number of this module.
ModuleVersion = '0.0.5.4'
ModuleVersion = '0.0.5.5'

# ID used to uniquely identify this module
GUID = 'eaa28acf-4a1e-4d0e-96dd-fa36de33a658'
Expand Down Expand Up @@ -66,16 +66,59 @@ FormatsToProcess = @('WapTenantPublicAPI.format.ps1xml')
# NestedModules = @()

# Functions to export from this module
FunctionsToExport = '*'
FunctionsToExport = @(
'Connect-WAPAPI',
'Connect-WAPVMRDP',
'Get-WAPCloud',
'Get-WAPCloudService',
'Get-WAPGalleryVMRole',
'Get-WAPLogicalNetwork',
'Get-WAPSQLDatabase',
'Get-WAPSQLOffer',
'Get-WAPSubscription',
'Get-WAPToken',
'Get-WAPVM',
'Get-WAPVMNetwork',
'Get-WAPVMNetworkSubnet',
'Get-WAPVMNetworkSubnetIPPool',
'Get-WAPVMRole',
'Get-WAPVMRoleOSDisk',
'Get-WAPVMRoleVM',
'Get-WAPVMRoleVMSize',
'Grant-WAPVMNetworkAccess',
'New-WAPCloudService',
'New-WAPSQLDatabase',
'New-WAPVMNetwork',
'New-WAPVMNetworkSubnet',
'New-WAPVMNetworkSubnetIPPool',
'New-WAPVMRoleDeployment',
'New-WAPVMRoleParameterObject',
'Remove-WAPCloudService',
'Remove-WAPSQLDatabase',
'Remove-WAPVMNetwork',
'Remove-WAPVMNetworkSubnet',
'Remove-WAPVMNetworkSubnetIPPool',
'Reset-WAPSQLDatabaseAdmin',
'Resize-WAPSQLDatabase',
'Select-WAPSQLOffer',
'Select-WAPSubscription',
'Set-WAPVMNetworkSubnetIPPool',
'Start-WAPVM',
'Stop-WAPVM',
'Test-WAPSQLDatabaseNameAvailable'
)

# Cmdlets to export from this module
CmdletsToExport = '*'
# CmdletsToExport = '*'

# Variables to export from this module
VariablesToExport = '*'
VariablesToExport = @(
'Token',
'Headers'
)

# Aliases to export from this module
AliasesToExport = '*'
# AliasesToExport = '*'

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
8 changes: 4 additions & 4 deletions WapTenantPublicAPI.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ function GetWAPSubscriptionQuota {
}
if ($Servicetype -eq 'sqlservers') {
PreFlight -IncludeConnection -IncludeSubscription -IncludeSQLOffer
$BaseQuota = (Get-WAPSubscription -Id $Subscription.SubscriptionID | Select-Object -ExpandProperty Services | ?{$_.Type -eq $Servicetype}).BaseQuotaSettings.Value | ConvertFrom-Json
$BaseQuota = (Get-WAPSubscription -Id $Subscription.SubscriptionID | Select-Object -ExpandProperty Services | Where-Object -FilterScript {$_.Type -eq $Servicetype}).BaseQuotaSettings.Value | ConvertFrom-Json
foreach ($B in $BaseQuota) {
$B
}
Expand Down Expand Up @@ -1456,7 +1456,7 @@ function Grant-WAPVMNetworkAccess {
PS C:\>Connect-WAPAPI -URL $URL
PS C:\>Get-WAPSubscription -Name 'MySubscription' | Select-WAPSubscription
PS C:\>$vnet = Get-WAPVMNetwork -Name MyNetwork
PS C:\>$vnet | Grant-WAPVMNetworkAccess -GrantToList 'b.gelens@mydomain.local_87153e0d-450b-447c-8916-f51fa49b41d6'
PS C:\>$vnet | Grant-WAPVMNetworkAccess -GrantTo 'b.gelens@mydomain.local_87153e0d-450b-447c-8916-f51fa49b41d6'
#>
[CmdletBinding(SupportsShouldProcess=$true)]
[OutputType([Void])]
Expand Down Expand Up @@ -2317,7 +2317,7 @@ function Start-WAPVM {
}

function Stop-WAPVM {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')]
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')]
[OutputType([void])]
param (
[Parameter(Mandatory, ValueFromPipeline)]
Expand Down Expand Up @@ -2728,7 +2728,7 @@ function New-WAPSQLDatabase {
$URI = '{0}:{1}/{2}/services/sqlservers/databases' -f $PublicTenantAPIUrl,$Port,$Subscription.SubscriptionId
Write-Verbose -Message "Constructed SQL Database URI: $URI"

$Quota = GetWAPSubscriptionQuota -Servicetype sqlservers | ?{$_.groupName -eq $SQLOffer.groupName}
$Quota = GetWAPSubscriptionQuota -Servicetype sqlservers | Where-Object -FilterScript {$_.groupName -eq $SQLOffer.groupName}

$DBConfig = @{
Name = $Name
Expand Down

0 comments on commit cc1dd11

Please sign in to comment.