Closed T0biii closed 2 years ago
i tried to add New-bConnectIpNetwork(https://github.com/baramundisoftware/PS-bConnect/pull/43/commits/3c8b335b1ca8bf9c00e5364fcf18c9c49615eaf7) but i get an error: Client:
Invoke-bConnectPost : Failed to create ip network object. Check baramundi Server Log for more details
Hashtable: {
"DuplicateWolToThisNetwork": {
"IsPresent": false
},
"Scopes": [
{
"NetworkAddress": "10.10.10.0",
"SubnetMask": "255.255.255.0"
},
{
"NetworkAddress": "10.10.12.0",
"SubnetMask": "255.255.255.0"
}
],
"Name": "test1",
"MaxBandwidthKbits": 0
}
Server:
ERROR Failed to create ip network object.(...) [Process=bServer, Thread=138, Module=baramundi.bMS.Server.Connector.Rest.BConnect.Controller.IpNetworks.IpNetworksController]
NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
--------------------------------------------------------------------------------
*** Stacktrace ***
bei Baramundi.Bms.Server.Connector.Rest.BConnect.Controller.IpNetworks.IpNetworksController.ValidateIpNetwork(ThirdPartyIpNetwork ipNetwork, String idString, Boolean isPostRequest)
bei Baramundi.Bms.Server.Connector.Rest.BConnect.Controller.IpNetworks.IpNetworksController.DoCreateIpNetwork(HttpRequestMessage request, ThirdPartyIpNetwork ipNetwork)
this is the code snipped i used
$scopes = @{NetworkAddress = "10.10.10.0";SubnetMask = "255.255.255.0"}
$scopes2 = @{NetworkAddress = "10.10.12.0";SubnetMask = "255.255.255.0"}
$myObject = [pscustomobject]$scopes
$myObject2 = [pscustomobject]$scopes2
$myarray = New-Object System.Collections.ArrayList
$myarray.Add($myObject)
$myarray.Add($myObject2)
New-bConnectIpNetwork -Name "test1" -Scopes $myarray
maybe @baramundi-ahaugk knows a solution?
ping @baramundi-ahaugk any suggestions?
Had no time for investigation. Perhaps in the next weeks.
@baramundi-lkersten could you try to reproduce this issue?
@T0biii found the problem -> should work fine now
Thx you for the investigation. I am going to test it soon
EDIT: Works now, but now it is always true EDIT2: ah it should be "$DuplicateWolToThisNetwork.IsPresent"
xD oh
do you want to use this? effd66a
(#43)
do you want to use this?
effd66a
(#43)
yes
there you go
Search-bConnectIpNetworkyou are welcome to get involved here
(At the end this Pull Requeste should be squashed and merged)