Skip to content

Commit 4254268

Browse files
authored
Merge pull request #12 from alagoutte/readme
Update README(.md)
2 parents 0f2641d + b485296 commit 4254268

File tree

1 file changed

+59
-37
lines changed

1 file changed

+59
-37
lines changed

Diff for: README.md

+59-37
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11

2-
3-
Last release: [![GitHub version](https://badge.fury.io/gh/PowerAruba/powerarubacp.svg)](https://badge.fury.io/gh/PowerAruba/powerarubacp)
4-
52
# PowerArubaCP
63

74
This is a Powershell module for configure a Aruba ClearPass (CPPM).
85

9-
With this module (version 0.1.0) you can manage:
6+
With this module (version 0.2.0) you can manage:
107

8+
- Network Device (Add / Get / Remove a NAS)
119
- Invoke API using Invoke-ArubaCPRestMethod
1210

1311
More functionality will be added later.
@@ -17,12 +15,11 @@ Tested with Aruba ClearPass (using release 6.7.x)
1715
# Usage
1816

1917
All resource management functions are available with the Powershell verbs GET, ADD, SET, REMOVE.
20-
<!-- For example, you can manage Vlans with the following commands:
21-
- `Get-ArubaSWVlans`
22-
- `Add-ArubaSWVlans`
23-
- `Set-ArubaSWVlans`
24-
- `Remove-ArubaSWVlans`
25-
-->
18+
For example, you can manage NAS (NetworkDevice) with the following commands:
19+
- `Get-ArubaCPNetworkDevice`
20+
- `Add-ArubaCPNetworkDevice`
21+
<!--- `Set-ArubaSWVlans`-->
22+
- `Remove-ArubaCPNetworkDevice`
2623

2724
# Requirements
2825

@@ -42,7 +39,7 @@ All resource management functions are available with the Powershell verbs GET, A
4239
Get-Command -Module PowerArubaCP
4340
4441
# Get help
45-
Get-Help Connect-ArubaCP -Full
42+
Get-Help Add-ArubaCPArubaNetwork -Full
4643
```
4744

4845
# Examples
@@ -97,49 +94,74 @@ for example to get ClearPass version
9794
eval_license : False
9895
cloud_mode : False
9996
```
97+
98+
if you get a warning about `Unable to connect` Look [Issue](#Issue)
99+
100100
to get API uri, go to ClearPass Swagger (https://CPPM-IP/api-docs)
101101
![](./Medias/CPPM_API_Docs.PNG)
102102

103103
And choice a service (for example Platform)
104104
![](./Medias/CPPM_API_Docs_platform.PNG)
105105

106-
<!--
107-
### NAD Management
106+
### NAS Management
108107

109-
You can create a new LUN `Add-ArubaSWVlans`, retrieve its information `Get-ArubaSWVlans`, modify its properties `Set-ArubaSWVLans`, or delete it `Remove-ArubaSWVlans`.
108+
You can create a new NAS `Add-ArubaCPNetworkDevice`, retrieve its information `Get-ArubaCPNetworkDevice`,<!-- modify its properties `Set-ArubaSWVLans`,--> or delete it `Remove-ArubaCPNetwork`.
110109

111110
```powershell
112-
# Create a vlan
113-
Add-ArubaSWVlans -id 85 -Name 'PowerArubaSW' -is_voice_enabled
114-
115-
uri : /vlans/85
116-
vlan_id : 85
117-
name : PowerArubaSW
118-
status : VS_PORT_BASED
119-
type : VT_STATIC
120-
is_voice_enabled : False
121-
is_jumbo_enabled : True
122-
is_dsnoop_enabled : False
111+
# Create a NAS
112+
Add-ArubaCPNetworkDevice -name SW1 -ip_address 192.0.2.1 -radius_secret MySecurePassword -vendor Aruba -description "Add by PowerArubaCP"
113+
114+
id : 3004
115+
name : SW1
116+
description : Add by PowerArubaCP
117+
ip_address : 192.0.2.1
118+
radius_secret :
119+
tacacs_secret :
120+
vendor_name : Aruba
121+
coa_capable : False
122+
coa_port : 3799
123+
attributes :
124+
_links : @{self=}
125+
126+
127+
# Get information about NAS
128+
Get-ArubaCPNetworkDevice -name SW1 | Format-Table
129+
130+
id name description ip_address radius_secret tacacs_secret vendor_name coa_capable coa_port attributes
131+
-- ---- ----------- ---------- ------------- ------------- ----------- ----------- -------- ----------
132+
3004 SW1 Add by PowerArubaCP 192.0.2.1 Aruba False 3799
133+
134+
# Remove a NAS
135+
$nad = Get-ArubaCPNetworkDevice -name SW1
136+
$nad | Remove-ArubaCPNetworkDevice -noconfirm
137+
```
123138

139+
### Disconnecting
124140

125-
# Get information about vlan
126-
Get-ArubaSWVlans -name PowerArubaSW | ft
141+
```powershell
142+
# Disconnect from the Aruba ClearPass
143+
Disconnect-ArubaCP
144+
```
127145

128-
uri vlan_id name status type is_voice_enabled is_jumbo_enabled is_dsnoop_enabled is_management_vlan
129-
--- ------- ---- ------ ---- ---------------- ---------------- ----------------- ------------------
130-
/vlans/85 85 PowerArubaSW VS_PORT_BASED VT_STATIC False True False False
146+
# Issue
131147

148+
## Unable to connect (certificate)
149+
if you use `Connect-ArubaCP` and get `Unable to Connect (certificate)`
132150

133-
# Remove a vlan
134-
Remove-ArubaSWVlans -id 85
135-
```
136-
-->
151+
The issue coming from use Self-Signed or Expired Certificate for switch management
137152

138-
### Disconnecting
153+
Try to connect using `Connect-ArubaCP -SkipCertificateCheck`
139154

155+
# List of available command
140156
```powershell
141-
# Disconnect from the Aruba ClearPass
142-
Disconnect-ArubaCP
157+
Add-ArubaCPNetworkDevice
158+
Connect-ArubaCP
159+
Disconnect-ArubaCP
160+
Get-ArubaCPNetworkDevice
161+
Invoke-ArubaCPRestMethod
162+
Remove-ArubaCPNetworkDevice
163+
Set-ArubaCPCipherSSL
164+
Set-ArubaCPuntrustedSSL
143165
```
144166

145167
# Author

0 commit comments

Comments
 (0)