Chrome update removes VRA submit and cancel buttons – fix

Deployment forms are missing the Submit, Next and Cancel buttons when using Chrome 75.

Fixes included downgrading to Chrome 74, running a VRA update.

https://kb.vmware.com/s/article/70879

However it seems that updating to chrome 76 also fixes the issue

Happy Days

Advertisements

Temporary Lower Certificate security to connect VRA VRO

PowerVRA and PowerVRO do a fantastic job at assisting with connecting to VRO and VRA. When working with Self Signed certificates, using the switch “–IgnoreCertRequirements” will usually allow connection to proceed. Occasionally a more drastic approach is required. 

I often use the following bit of code to enable the connection. I do apologise for not being state the source of this, I have had it save in my library for quite a while and usually use it as is.

if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
{
$certCallback = @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
    {
        public static void Ignore()
        {
            if(ServicePointManager.ServerCertificateValidationCallback ==null)
            {
                ServicePointManager.ServerCertificateValidationCallback += 
                    delegate
                    (
                        Object obj, 
                        X509Certificate certificate, 
                        X509Chain chain, 
                        SslPolicyErrors errors
                    )
                    {
                        return true;
                    };
            }
        }
    }
"@
    Add-Type $certCallback
 }
[ServerCertificateValidationCallback]::Ignore()

$SecurityProtocols = @(
        [System.Net.SecurityProtocolType]::Ssl3,
        [System.Net.SecurityProtocolType]::Tls,
        [System.Net.SecurityProtocolType]::Tls12
    )
    [System.Net.ServicePointManager]::SecurityProtocol = $SecurityProtocols -join ","


API Creation of VRA Network profiles with Infoblox Endpoint

PowerVRA cmdlets for creating external network profiles don’t directly allow for creation of Infoblox connected network profiles. You can still make use of the Invoke-VraRestMethod, but you will need to source some of the required information yourself.

Firstly you will need to get the provider ID for the IPAM endpoint. An easy way to do this is to look at an example network profile that has been connected to the target Infoblox.

$sampleNetworkName = "testnetwork"
$EndpointId = (Get-vRAExternalNetworkProfile -Name $sampleNetworkName).IPAMEndpointId

Now you need to draw back a list of all the Possible ranges from Infoblox

$ranges = Invoke-vRARestMethod -Method GET -URI "/ipam-service/api/providers/$EndpointId/ip-ranges?limit=1000"
$ranges = $ranges.content | select-object name, description,externalId

Personally I then filter the list for only what is needed

You can obviously filter the list to whatever is required, but for this scenario, just going to create a new network profile for each range.

The entire code base together is as follow

$URI = "/iaas-proxy-provider/api/network/profiles"

$sampleNetworkName = "testnetwork"

$EndpointId = (Get-vRAExternalNetworkProfile -Name $sampleNetworkName).IPAMEndpointId

$ranges = Invoke-vRARestMethod -Method GET -URI "/ipam-service/api/providers/$EndpointId/ip-ranges?limit=1000"
$ranges = $ranges.content | select-object name, description,externalId


$Template = @"
    {
        "profileType" : "EXTERNAL",
        "id" : null,
        "@type" : "ExternalNetworkProfile",
        "name" : "External IPAM",
        "IPAMEndpointId" : "f55e372a-0b6e-46a7-9243-4fd8526e3566",
        "addressSpaceExternalId" : "",
        "description" : "my description",
        "definedRanges" : [{
			"externalId" : "network-1",
			"name" : "192.168.1.0/24",
			"description" : "Created by vRO package stub workflow",
			"state" : "UNALLOCATED",
			"beginIPv4Address" : null,
			"endIPv4Address" : null
		}
	]
    }
"@

$Template = $Template | ConvertFrom-Json

$Template.IPAMEndpointId = $EndpointId

foreach ($range in $ranges){
    $Template.name = $range.name
    $Template.description = $range.description
    $Template.definedRanges[0].externalId = $range.externalId
    $Template.definedRanges[0].name = $range.name
    $Template.definedRanges[0].description = $range.description
    
    Invoke-vRARestMethod -Method POST -URI $URI -Body ($Template | ConvertTo-Json)
}

This creates a network profile for every available range in Infoblox