OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of fvanroie »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

  • Messages
  • Topics
  • Attachments

Topics - fvanroie

Pages: [1]
1
18.1 Legacy Series / 18.1-RC2 translation error
« on: January 16, 2018, 12:15:53 am »
In 18.1-RC2 the new page ui/routes/ show column header 'Beschreibung' instead of 'Description' in the English UI.
It's just a small detail I noticed while exploring the new RCs.

2
Development and Code Review / PowerShell Module for OPNsense api
« on: January 09, 2018, 07:46:41 pm »
One of the major advantages that guided me towards OPNsense is its api framework. In my quest to learn more about the OPNsense REST api, I decided to combine it with my PowerShell learning path and turn this project into an OPNsense PowerShell Module. It turns out that these two work quite well together and I currently have a development preview working with about 25% of the api call's available in PowerShell. There is still a lot of room for improvement though, but the foundation is there.

I wanted to check with the users on this forum if there is any interest in an OPNsense PowerShell Module?
I made the source code available on github, in the spirit of the OPNsense project so users can test, review and contribute. It even has a wiki  :)

For Example:
Code: [Select]
# Connect to an OPNsense
Connect-OPNsense -Url 'https://opnsense.localdomain:8080' -Credential $apiCred -WebCredential $webCred -Verbose -Debug

# Get the config.xml
$xml = Backup-OPNsenseConfig -RRDdata

# Add some packages
Install-OPNsensePackage -Name 'unixODBC','xen-guest-tools' -Verbose

# Install updates & Reboot
Update-OPNsense -Verbose

Now that PowerShell Core 6.0 is available cross platform it is possible to run PowerShell scripts on Windows, Linux and MacOS.

Even if you want to use another scripting language, this module can help you learn the api as all of the cmdlets let you use the -Verbose and -Debug parameters so you can investigate which api calls are made in the background using which parameters.

Of course any feedback is very much appreciated.

Best regards,
/fvanroie

Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2