pwfile: passwd

#Default target Storage Image ID

#If the -dev parameter is needed in a command then it will default to the value here

#"devid" is equivalent to "-dev storage_image_ID"

#the default server that DS CLI commands will be run on is 2105 800 23953

devid: IBM.2105-23953

If you don’t want to create an encrypted password file, or do not have access to a simulator or the real S-HMC, then you can specify the userid and password in plain text. This is done either at the command line or in a script or in the profile. This is not recommended since the password itself is now not as secure. An example of a profile that contains plain text authentication details is shown in Example 11-16.

Example 11-16 Example of a DS CLI profile that specifies the username and password

#DS CLI Profile

#hmc1 is cluster 1 of 2105 800 23953 hmc1:10.0.0.1

#The username to log onto the ESS username: csadmin

#The password for csadmin: password: passw0rd

#Default target Storage Image ID devid: IBM.2105-23953

An example of a command where the password is entered in plain text is shown in Example 11-17.In this example the lsuser command is issued directly to an S-HMC. Note that the password will still be sent using SSL so a network sniffer would not be able to view it easily. Note also that the syntax between the command and the profile is slightly different.

Example 11-17 Example of a DS CLI command that specifies the username and password

C:\Program Files\IBM\dscli>dscli -hmc1 10.0.0.1 -user admin -passwd passw0rd lsuser Name Group

=============

admin admin

csadmin op_copy_services exit status of dscli = 0

C:\Program Files\IBM\dscli>

Issuing a DS CLI command and scripting it

Having created a userid and preferably a password file, and then having edited the default profile, it is now possible to issue DS CLI commands without logging onto the DS CLI interpreter. An example is shown in Example 11-18.

Example 11-18 Establishing a FlashCopy with a single command

anthony@aixsrv:/opt/ibm/dscli > dscli mkflash -nocp 1004:1005 CMUC00137I mkflash: FlashCopy pair 1004:1005 successfully created. exit status of dscli = 0

250DS8000 Series: Concepts and Architecture

Page 272
Image 272
IBM DS8000 manual Issuing a DS CLI command and scripting it, Example 11-18 Establishing a FlashCopy with a single command