License PowerCLI-Examples-Scripts repository under BSD-2 Clause (#462)
As part of the VMware open source program, we have to update this repository with the correct license and copyright information. We add the BSD-2 Clause License for this repository. We mark all source code provided by VMware with the Copyright notice under BSD-2 Clause license. * Update repository license to BSD 2-Clause License * Update Copyright
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IdentityModel.Selectors;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -29,13 +30,13 @@ namespace VMware.vSphere.SsoAdmin.Utils
|
||||
var obnMatchingServers = new List<SsoAdminServer>();
|
||||
|
||||
var ssoAdminServerVariable = engineIntrinsics.SessionState.PSVariable.GetValue("DefaultSsoAdminServers");
|
||||
|
||||
|
||||
if (ssoAdminServerVariable is PSObject ssoAdminServersPsObj &&
|
||||
ssoAdminServersPsObj.BaseObject is List<SsoAdminServer> connectedServers) {
|
||||
foreach (var server in connectedServers) {
|
||||
if (!string.IsNullOrEmpty(Regex.Match(server.ToString(), csharpObnValue)?.Value)) {
|
||||
obnMatchingServers.Add(server);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +46,9 @@ namespace VMware.vSphere.SsoAdmin.Utils
|
||||
// Non-terminating error for not matching value
|
||||
engineIntrinsics.Host.UI.WriteErrorLine($"'{obnValue}' doesn't match any objects in $global:DefaultSsoAdminServers variable");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using NUnit.Framework;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -17,9 +18,9 @@ namespace VMware.vSphere.SsoAdminClient.DataTypes
|
||||
|
||||
private SsoAdminClient _client;
|
||||
|
||||
public SsoAdminServer(string hostname,
|
||||
string user,
|
||||
SecureString password,
|
||||
public SsoAdminServer(string hostname,
|
||||
string user,
|
||||
SecureString password,
|
||||
X509CertificateValidator serverCertificateValidator) {
|
||||
|
||||
Name = hostname;
|
||||
@@ -56,7 +57,7 @@ namespace VMware.vSphere.SsoAdminClient.DataTypes
|
||||
public void Disconnect() {
|
||||
if (--RefCount == 0) {
|
||||
_client = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// **************************************************************************
|
||||
// Copyright 2020 VMware, Inc.
|
||||
// **************************************************************************
|
||||
/*
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IdentityModel.Selectors;
|
||||
@@ -21,9 +22,9 @@ namespace VMware.vSphere.SsoAdminClient
|
||||
private VmwareSecruityTokenService _stsClient;
|
||||
private SamlSecurityToken _validToken;
|
||||
public UserPassSecurityContext(
|
||||
string user,
|
||||
SecureString password,
|
||||
Uri stsUri,
|
||||
string user,
|
||||
SecureString password,
|
||||
Uri stsUri,
|
||||
X509CertificateValidator serverCertificateValidator) {
|
||||
|
||||
if (user == null) throw new ArgumentNullException(nameof(user));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
param(
|
||||
[string]
|
||||
$TestVc,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# **************************************************************************
|
||||
# Copyright 2020 VMware, Inc.
|
||||
# **************************************************************************
|
||||
<#
|
||||
Copyright 2021 VMware, Inc.
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
||||
Reference in New Issue
Block a user