Giter Club home page Giter Club logo

bconnect's People

Contributors

friedrichweinmann avatar mueller-tobias avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

davemail

bconnect's Issues

Edit-bConnectApplication dosn't work

Edit-bConnectApplication was never working correctly. The original function just passed the whole Application Object to the Rest API. This generates an error, because the application controller, just like the endpoint controller only acceppt an object with the changed properties.

Post Migration Headache: Guid Validation

I have just finished migrating the entire code-base into this new project.
One of the things I encountered that were ... questionable but wasn't able to verify one way or the other was the validation on Guids.
Virtually all instances validate for strings that contain a valid guid, not for strings that are a valid guid!

The common pattern used was this:

'\b[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}\b'

This will match a guid correctly:

(New-Guid) -match '\b[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}\b'

but also something like this:

$text = "This is my story of {0} and his seven friends" -f (New-Guid)
$text -match '\b[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}\b'

with $text containing something like this:

This is my story of 2a3642e1-cc34-4554-8591-6752664f8af7 and his seven friends

Proposed solution

If this is not intended and pure Guids are required, I recommend changing validation to test for end of text, not end of word:

'^[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}$'

This will still validate any guid correctly:

(New-Guid) -match '^[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}$'

New-bConnectApplication.ps1 - ConsistencyChecks does not respect CR and/or LF

Hi Developers,
the ConsistencyChecks field in the baramundi application object consists of a text object which has/allows CR and LF. If i read out an object with Get-bConnectApplication.ps1, those white spaces are read in a clean way as it should be.
However, if i try to import a ConsistencyChecks field with CR, LF or any other special chars, they are not interpreted at all.
Please check the code in the JSON implementation and tell us, if there is bug.
And how to submit such characters the right way true bConnect.

BR, Nick

Missing exported cmdlets

Hi Friedrich,

Could you please add the following line to the file bConnect.psd1: 'Get-bConnectAllOrgUnits',
This is a very simple missing command with big impact on our scripts speed. I could search or translate OUs locally instead of connecting to the Baramundi server for each and every OU ID I need to get info about.

Thanks a lot!

Assert-bConnectConnection dosn't terminate when required Version is false

Through an typo in Assert-bConnectConnection ($connectVersion vs $_connectVersion) i recognized that the Stop-PSFunction dosnt't terminate the calling script when the version requirements aren't meet.

I realized that throwing an error inside the try/catch would trigger the Catch Block what wasn't supposed, so i moved the If block below the try/catch block

Although even outside the try/catch block Stop-PSFunction dosn't throw an terminating error, but throw does.

Dosn't work:
Stop-PSFFunction -Message "bConnect has not the Required Version: $MinVersion" -EnableException $true -Cmdlet $PSCmdlet
Works:
Throw "bConnect has not the Required Version: $MinVersion"

Stop-PSFFunction seems to be only working when $ErrorActionPreference is "Stop", while Throw is also terminating with the Default Value "Continue"

Assert-bConnectConnection.txt

Problem with the Edit-bConnectXX.ps1 functions

We try to update objects with the Edit-bConnect... functions.
It looks like they do not work at all.
We tested Edit-bConnectApplication.ps1 + Edit-bConnectEndpoint.ps1
One can edit the properties, according to the reference and everything looks good on the PS-side, but those changes are never really written to the BMS.
E.g. Application:Comment or Endpoint:DisplayName
If i try the same with a handmade XML-body and a direct Invoke-RestMethod call, it works as expected.

Install.ps1 doesn't Install

I have tried to install the bConnect Modul with the Install.ps1 Skript.
The Installation didnt't work because the $BaseUrl is written wrong.

image

New-bConnectApplication.ps1 has wrong Parameter "ParentGuid"

Hi Developers,
there is a wrong parameter in the function "New-bConnectApplication" called "ParentGuid".
That leads to behaviour, that the objects are always written to the root of "Applications".
This parameter must be called "ParentId", according to the baramundi Connect Reference on page 75.
And i could proof it. As soon as i change it to "ParentId" in the PS1 file, the function starts to work as it should.

BR, Nick

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.