From bb9ff77e5c519c39489c9d6b70f4270e72bf9134 Mon Sep 17 00:00:00 2001 From: Ben Claussen Date: Thu, 18 Oct 2018 12:55:43 -0400 Subject: [PATCH] Start tenancy functions --- Functions/Tenancy/Tenancy.ps1 | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Functions/Tenancy/Tenancy.ps1 diff --git a/Functions/Tenancy/Tenancy.ps1 b/Functions/Tenancy/Tenancy.ps1 new file mode 100644 index 0000000..6964cb2 --- /dev/null +++ b/Functions/Tenancy/Tenancy.ps1 @@ -0,0 +1,76 @@ +<# + .NOTES + =========================================================================== + Created with: SAPIEN Technologies, Inc., PowerShell Studio 2018 v5.5.152 + Created on: 5/29/2018 1:45 PM + Created by: Ben Claussen + Organization: NEOnet + Filename: Tenancy.ps1 + =========================================================================== + .DESCRIPTION + A description of the file. +#> + +function Get-NetboxTenancyChoices { + [CmdletBinding()] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "These are literally 'choices' in Netbox")] + param () + + $uriSegments = [System.Collections.ArrayList]::new(@('tenancy', '_choices')) + + $uri = BuildNewURI -Segments $uriSegments + + InvokeNetboxRequest -URI $uri +} + + +#region GET commands + +function Get-NetboxTenant { + [CmdletBinding()] + param + ( + [uint16]$Limit, + + [uint16]$Offset, + + [string]$Name, + + [uint16[]]$Id, + + [string]$Query, + + [string]$Group, + + [uint16]$GroupID, + + [hashtable]$CustomFields, + + [switch]$Raw + ) + + $Segments = [System.Collections.ArrayList]::new(@('tenancy', 'tenants')) + + $URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters + + $uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters + + InvokeNetboxRequest -URI $uri -Raw:$Raw +} + +#endregion GET commands + + +#region SET commands + +#endregion SET commands + + +#region ADD/NEW commands + +#endregion ADD/NEW commands + + +#region REMOVE commands + +#endregion REMOVE commands \ No newline at end of file