Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Memory #57

Closed
fre4ki opened this issue Feb 21, 2022 · 6 comments
Closed

Write Memory #57

fre4ki opened this issue Feb 21, 2022 · 6 comments

Comments

@fre4ki
Copy link

fre4ki commented Feb 21, 2022

Hey Alexis,

how can i intiate a "write memory" after i created some stuff?

Thank you!

Andy

@alagoutte
Copy link
Contributor

it is WIP (#44)

but you can use copy the running on the startup

Invoke-ArubaCXRestMethod "/configs/startup-config?from=%2Frest%2Fv10.09%2Fconfigs%2Frunning-config" -method "PUT"

@fre4ki
Copy link
Author

fre4ki commented Feb 21, 2022

Will not work, the message is:

Exception: C:\Users\username\Documents\PowerShell\Modules\PowerArubaCX\0.5.0\Private\RestMethod.ps1:80
Line |
80 | … Throw "Not Connected. Connect to the Switch with Connect- …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Not Connected. Connect to the Switch with Connect-ArubaCX
<<<

But i add a vlan with the command before, which was successful?

I'm, using variables, which i ask the steps before

Add-ArubaCXVlans -id $vlan_id -Name $vlan_name -connection $acx01

I tried this commands (installed switch-version FL.10.07.0061):

Invoke-ArubaCXRestMethod "/configs/startup-config?from=%2Frest%2Fv10.09%2Fconfigs%2Frunning-config" -method "PUT"
and
Invoke-ArubaCXRestMethod "/configs/startup-config?from=%2Frest%2Fv10.07%2Fconfigs%2Frunning-config" -method "PUT"

@fre4ki
Copy link
Author

fre4ki commented Feb 21, 2022

ok, maybe i forgotten the -connection parameter for the Invoke-ArubaCXRestMethod command (-DefaultConnection:$false)

Now i get:

Exception: C:\Users\username\Documents\PowerShell\Modules\PowerArubaCX\0.5.0\Private\RestMethod.ps1:134
Line |
134 | throw "Unable to use ArubaCX API"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Unable to use ArubaCX API
<<<

I tried:

Invoke-ArubaCXRestMethod "/configs/startup-config?from=%2Frest%2Fv10.09%2Fconfigs%2Frunning-config" -method "PUT" -connection $acx01

and

Invoke-ArubaCXRestMethod "/configs/startup-config?from=%2Frest%2Fv10.07%2Fconfigs%2Frunning-config" -method "PUT" -connection $acx01

Is this command supported with Firmware 10.07?

@alagoutte
Copy link
Contributor

What PowerShell release ?

I will check with firmware 10.07...

@alagoutte
Copy link
Contributor

Ok, there is no config with 10.07 but fullconfigs...

can you try

Invoke-ArubaCXRestMethod "fullconfigs/startup-config?from=%2Frest%2Fv10.04%2Ffullconfigs%2Frunning-config" -method "PUT"

@fre4ki
Copy link
Author

fre4ki commented Feb 21, 2022

Great, it works. Thank you!!

@fre4ki fre4ki closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants