en-US/about_Appliance_Connections.help.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
TOPIC
 
    about_Appliance_Connections
 
SHORT DESCRIPTION
 
    Explains how Multiple Appliance Connections are handled with the
    HPE OneView 2.00 and newer PowerShell Library.
 
LONG DESCRIPTION
 
    In the HPE OneView 2.0 or newer PowerShell library is the ability to
    initiate multiple appliance connections to script or automate operations.
    To support this capability, the library utilizes three features:
 
    -- When using Connect-OVMgmt, an [HPEOneView.Appliance.Connection] object
       is returned to the caller.
 
    -- The [HPEOneView.Appliance.Connection] object is stored in a global variable
       accessible by any caller: $ConnectedSessions
 
    -- Within the [HPEOneView.Appliance.Connection] object is a property called
       Default. This boolean value is what controls which appliance
       to execute against if the caller does not specify which appliance
       connection to use.
 
GLBOAL CONNECTION TRACKING OBJECT
 
    Contained in the $ConnectedSessions Global varilable, will be each
    successful appliance connection object, HPEOneView.Appliance.Connection.
    The object contains the following properties:
 
    -- ConnectID - Unique per PowerShell library session
    -- Name - Hostname of the appliance connection, specified by the
       'Hostname' parameter in Connect-OVMgmt.
    -- SessionID - Appliance API Auth session ID
    -- UserName - Username that was authenticated with to the appliance
    -- AuthLoginDomain - Authentication Directory resource name used to
       authenticate user.
    -- Default - Boolean value that tracks which connection is the default.
       Use the Set-OVApplianceDefaultConnection Cmdlet to control the value
    -- SSLChecked - library specific property to handle SSL certificate
       verification. (DEPRECATED and no longer valid)
    -- ApplianceType - Indicates connected appliance type. Used for cetain
       Cmdlet validation.
    -- AuthType - Credential or Certificate/Two-Factor authentication.
    -- ActivePermissions - A collection of HPOnewView.Appliance.ConnectionPermission
       objects that contain the Scope and Role available to the authenticated
       user.
    -- ApplianceSecurityRoles - The allowed roles by the connected appliance.
       Property value is used to validate roles when assigning to Directory
       groups or local user accounts.
    -- Default - used to define which connection is the 'default' for Cmdlet
       processing. Use the Set-OVApplianceDefaultConnection Cmdlet to modify
       this value.
 
    After successfully authenticating to an appliance, the
    HPEOneView.Appliance.Connection object is added to the global session
    tracker, $ConnectedSessions.
 
HOW TO USE CONNECTION IN CMDLETS
 
    The PowerShell user can store the returned HPEOneView.Appliance.Connection
    object in their own local, script-runspace variable, and pass it as the
    ApplianceConnection parameter value in supported CMDLETs.
 
    Some CMDLETs will default to using all connections within $ConnectedSessions,
    and can be overridden by referencing the specific connection Name or
    object.
 
    For instance, Get-OVNetwork will default to processing all appliance
    connections, as the -ApplianceConnection parameter default value is
    $ConnectedSessions. To override its default value, you can either specify
    the object, or the appliance connection Name property value.
 
 
    This example shows how to use the connection 'object':
 
    PS C:\> $Connection1 = Connect-OVMgmt hpov1.domain.com administrator MyPassw0rd
    PS C:\> $Connection2 = Connect-OVMgmt hpov2.domain.com administrator MyPassw0rd
    PS C:\> $ConnectedSessions
 
    ConnectionID Name UserName AuthLoginDomain Default
    ------------ ---- -------- --------------- -------
    1 hpov1.domain.com Administrator LOCAL True
    2 hpov2.domain.com Administrator LOCAL False
 
    PS C:\> Get-OVNetwork -ApplianceConnection $Connection1
    ...
 
 
    This example shows how to use the connection 'name':
 
    PS C:\> $Connection1 = Connect-OVMgmt hpov1.domain.com administrator MyPassw0rd
    PS C:\> $Connection2 = Connect-OVMgmt hpov2.domain.com administrator MyPassw0rd
    PS C:\> $ConnectedSessions
 
    ConnectionID Name UserName AuthLoginDomain Default
    ------------ ---- -------- --------------- -------
    1 hpov1.domain.com Administrator LOCAL True
    2 hpov2.domain.com Administrator LOCAL False
 
    PS C:\> Get-OVNetwork -ApplianceConnection hpov1.domain.com
    ...
 
SETTING DEFAULT APPLIANCE CONNECTION
 
    When authenticating to your first appliance, the 'Default' property is automatically
    set to True. Additional Appliance Connections are candidates to set as your new
    default appliance connection. To do this, use the Set-OVApplianceDefaultConnection
    Cmdlet. You will specify either an HPEOneView.Appliance.Connection object (either from
    ${Global:ConnectedSessions} or the saved object returned from Connect-OVMgmt) or
    connection Name.
 
    This example shows how to modify your default appliance connection after successfully
    authenticating to them:
 
    PS C:\> $Connection1 = Connect-OVMgmt hpov1.domain.com administrator MyPassw0rd
    PS C:\> $Connection2 = Connect-OVMgmt hpov2.domain.com administrator MyPassw0rd
    PS C:\> $ConnectedSessions
 
    ConnectionID Name UserName AuthLoginDomain Default
    ------------ ---- -------- --------------- -------
    1 hpov1.domain.com Administrator LOCAL True
    2 hpov2.domain.com Administrator LOCAL False
 
    PS C:\> $Connection2 | Set-OVApplianceDefaultConnection
 
    ConnectionID Name UserName AuthLoginDomain Default
    ------------ ---- -------- --------------- -------
    1 hpov1.domain.com Administrator LOCAL False
    2 hpov2.domain.com Administrator LOCAL True
 
APPLIANCECONNECTION PROPERTY VALUE IN OBJECTS
 
    When using the various CMDLETs, the returned resource object(s) will contain a
    property called ApplianceConnection [HPEOneView.Library.ApplianceConnection]:
 
    -----------------------
    | ApplianceConnection |
    -----------------------
            |
            | ----------------------
            |---| [int] ConnectionID |
            | ----------------------
            | -----------------
            |---| [string] Name |
            | -----------------
 
    The 'ConnectionID' and 'Name' sub-properties reference the Appliance Connection
    contained within ${Global:ConnectedSessions}. These are used to identify resources
    that originate from the correct appliance, as each object is unique per appliance.
    To use these properties with Send-OVRequest, they can be referenced with their dot
    name reference (e.g. $ServerProfile.ApplianceConnection.Name).
 
SEE ALSO
 
    https://github.com/HewlettPackard/POSH-HPOneView
    http://hp.com/go/oneviewcommunity
    Get-Help about_HPEOneView.500
    Get-Help about_Appliance_Connection_Permissions