Giter Site home page Giter Site logo

enatec / unifitooling Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 4.0 4.24 MB

Ubiquiti UniFi Security Gateway automation via the API of the Ubiquiti UniFi Controller

License: BSD 3-Clause "New" or "Revised" License

PowerShell 96.45% HTML 3.44% Smarty 0.12%
usg api api-client powershell powershell-module ubiquiti ubiquiti-unifi-controller restful-client automation unifi-controller

unifitooling's People

Contributors

jhochwald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

unifitooling's Issues

Get-UnifiNetworkDetails should support requesting the network by name

Is your feature request related to a problem? Please describe.

Get-UnifiNetworkDetails should support requesting the network by name

Describe the solution you'd like

At the moment it has be be like this: Get-UnifiNetworkDetails -UnifiNetwork 5bfcrt65054a4e045eadbdfa instead it should be like this: Get-UnifiNetworkDetails -UnifiNetwork 'mynetwork'

Describe alternatives you've considered

Now the Get-UnifiNetworkList is used to filter (get the _id object for a given name)

Desktop/Server (optional, but better provide more details):

  • Operating System: Windows 10/Windows Serevr 2016
  • PowerShell version: 5.1/6.1.1
  • PowerShell Edition (Desktop/Core): Desktop/Core
  • Other PowerShell Modules installed:

Additional context

New Function: Get-UnifiFirewallGroupDetails

Is your feature request related to a problem? Please describe.

The command (Get-UnifiFirewallGroupDetails) should display the details for a given USG Firewall Group

Describe the solution you'd like

A bit like the Get-UnifiFirewallGroupDetails, it should return all details for a given USG Firewall Group.
And like requested #9 the new function Get-UnifiFirewallGroupDetails should support a query by the name of a USG Firewall Group and not only by the ID. Cause this is hard to remember.

Describe alternatives you've considered

None

Desktop/Server (optional, but better provide more details):

  • Operating System: Windows 10/Windows Serevr 2016
  • PowerShell version: 5.1/6.1.1
  • PowerShell Edition (Desktop/Core): Desktop/Core
  • Other PowerShell Modules installed:

Additional context

A bit related to #9 for Get-UnifiFirewallGroupDetails

Get rid of the Wrapper

In the VSCode tasks.json the wrapper is still in use.

Instead of this:

"command": "${cwd}/../build.ps1  -Project 'UniFiTooling' -Task 'Build'",

it should use:

"command": "${cwd}/../etBuildTooling.ps1  -Project 'UniFiTooling' -Task 'Build'",

Not a big deal, but build.ps1 is a legacy wrapper for the new wrapper etBuildTooling.ps1 that is used by the build server, a wrapper for a wrapper...

location of the config.json

The locations needs a bit more description!
Where does the functions search for it? How can a user change the location?

Build process has GUID Issues again

Describe the bug

The Build Process has issues with the GUID again!
Example: UniFiTooling_7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d 7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d_en-US_HelpContent.cab should be UniFiTooling_7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d_en-US_HelpContent.cab

To Reproduce

Steps to reproduce the behavior:

  1. Start a Build with a new Release

Expected behavior

UniFiTooling_7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d_en-US_HelpContent.cab instead of UniFiTooling_7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d 7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d_en-US_HelpContent.cab

Possible Solution

Drop the ModuleBuild usage. Nice, but to buggy. And the GUID issue is nothing new.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop/Server (please complete the following information):

  • Operating System: Windows 10 1809
  • PowerShell version: 5.1.17763.134
  • PowerShell Edition (Desktop/Core): Desktop
  • Other PowerShell Modules installed: N.N.

Additional context

Check Login

To prevent further misunderstandings, the Module must check if the a valid session (login) was done before issuing any command!

This could be implemented before any of the relevant commands.

Workflow:

  1. Call Check-UnifiConnection.ps1
  2. Call PROTO://URI:PORT/api/s/default/self (as a simple get)
  3. Check Result

Negative:

{
  "data": [],
  "meta": {
    "msg": "api.err.LoginRequired",
    "rc": "error"
  }
}

Positive:

{
  "data": [
{
/* REMOVED */
}
  ],
  "meta": {
    "rc": "ok"
  }
}

If the result is not meta.rc: ok, then the Invoke-UniFiApiLogin is called! With a forced Invoke-UniFiApiLogout before the call

In this case the call must be:

# No error message and NO stop on error ;-)
$null = (Invoke-UniFiApiLogout -ErrorAction SilentlyContinue)

Will be private (not exported), name will be Check-UnifiConnection.ps1

Helper Function: Create a new config file

Is your feature request related to a problem? Please describe.

Create a new config file would be great.

Describe the solution you'd like

The function should ask for everything it need to create a new config.json file.

Describe alternatives you've considered

A GUI might also be an option (not a helper, more like a tool)

Desktop/Server (optional, but better provide more details):

  • Operating System: Windows 10/Server 2016 (or newer)
  • PowerShell version: 5, or newer
  • PowerShell Edition (Desktop/Core): Desktop and Core
  • Other PowerShell Modules installed: NN

Additional context

NN

Merge Invoke-UniFiCidrWorkaroundV6 and Invoke-UniFiCidrWorkaround

Is your feature request related to a problem? Please describe.

Merge the two functions Invoke-UniFiCidrWorkaroundV6 and Invoke-UniFiCidrWorkaround into one.

Describe the solution you'd like

A -IPv6 parameter for Invoke-UniFiCidrWorkaround.

Describe alternatives you've considered

Any other idea?

Desktop/Server (optional, but better provide more details):

  • Operating System: Windows 10
  • PowerShell version: 5.1
  • PowerShell Edition (Desktop/Core): Desktop/Core
  • Other PowerShell Modules installed: NN

Additional context

NN

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.