mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 01:42:28 +00:00
* Add `OPTIONS` method validation * Remove parameter validation as workaround for CHOICES API endpoint until further testing * Add help block for Get-NetboxTenant * SkipConnectedCheck for Get-NetboxAPIDefinition * Correct help block for New-NetboxIPAMAddress * Add parameter position 0 for 'Address' in Get-NetboxIPAMAddress * Allow pipeline input for Address parameter in New-NetboxIPAMAddress * Update parameter types * Add parameter sets and logic for ID/Query searches * Add Get-NetboxDCIMSite * Update psproj * Update deploy.ps1 * Move Get-NetboxCircuit * Add Circuit cmdlets - New-NetboxCircuit - Get-NetboxCircuitProvider - Get-NetboxCircuitTermination - Get-NetboxCircuitType * Update deploy script output path * Update Set-NetboxIPAMAddress - Replace Interface parameter with Assigned_Object_Type and Assigned_Object_Id - Add validation logic for Assigned_Object_ parameters - Change Status parameter to string * Add Get-ModelDefinition function * Update psproj * Update deploy.ps1 variables * Update exported files * Remove references to `_choices` API calls * Add Postman collection * Add Postman collection * Update deploy.ps1 * Add Set-NetboxIPAMPrefix function * Increment version to 1.3.0 Co-authored-by: Ben Claussen <claussen@neonet.org>
94 lines
No EOL
2.3 KiB
PowerShell
94 lines
No EOL
2.3 KiB
PowerShell
<#
|
|
.NOTES
|
|
===========================================================================
|
|
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
|
|
Created on: 3/19/2020 12:47
|
|
Created by: Claussen
|
|
Organization: NEOnet
|
|
Filename: Get-NetboxVirtualMachineInterface.ps1
|
|
===========================================================================
|
|
.DESCRIPTION
|
|
A description of the file.
|
|
#>
|
|
|
|
|
|
function Get-NetboxVirtualMachineInterface {
|
|
<#
|
|
.SYNOPSIS
|
|
Gets VM interfaces
|
|
|
|
.DESCRIPTION
|
|
Obtains the interface objects for one or more VMs
|
|
|
|
.PARAMETER Limit
|
|
Number of results to return per page.
|
|
|
|
.PARAMETER Offset
|
|
The initial index from which to return the results.
|
|
|
|
.PARAMETER Id
|
|
Database ID of the interface
|
|
|
|
.PARAMETER Name
|
|
Name of the interface
|
|
|
|
.PARAMETER Enabled
|
|
True/False if the interface is enabled
|
|
|
|
.PARAMETER MTU
|
|
Maximum Transmission Unit size. Generally 1500 or 9000
|
|
|
|
.PARAMETER Virtual_Machine_Id
|
|
ID of the virtual machine to which the interface(s) are assigned.
|
|
|
|
.PARAMETER Virtual_Machine
|
|
Name of the virtual machine to get interfaces
|
|
|
|
.PARAMETER MAC_Address
|
|
MAC address assigned to the interface
|
|
|
|
.PARAMETER Raw
|
|
A description of the Raw parameter.
|
|
|
|
.EXAMPLE
|
|
PS C:\> Get-NetboxVirtualMachineInterface
|
|
|
|
.NOTES
|
|
Additional information about the function.
|
|
#>
|
|
|
|
[CmdletBinding()]
|
|
param
|
|
(
|
|
[Parameter(ValueFromPipeline = $true)]
|
|
[uint16]$Id,
|
|
|
|
[string]$Name,
|
|
|
|
[string]$Query,
|
|
|
|
[boolean]$Enabled,
|
|
|
|
[uint16]$MTU,
|
|
|
|
[uint16]$Virtual_Machine_Id,
|
|
|
|
[string]$Virtual_Machine,
|
|
|
|
[string]$MAC_Address,
|
|
|
|
[uint16]$Limit,
|
|
|
|
[uint16]$Offset,
|
|
|
|
[switch]$Raw
|
|
)
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('virtualization', 'interfaces'))
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
|
|
|
$uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
|
|
|
InvokeNetboxRequest -URI $uri -Raw:$Raw
|
|
} |