6.5

Table Of Contents
vSphere SDK for Perl Programming Guide
64 VMware, Inc.
add_password
Createsacredentialstorefileifnoneexistsandstoresthepasswordforagivenserverandusername.
Ifapasswordalreadyexistsforthatserverandusername,add_password overwritesthatpassword.
Parameters
Returns
Returns1ifapasswordforthisserveranduserdoesnotexists;otherwise,returnszero.
remove_password
Removesthepasswordforagivenserverandusername.Ifnopasswordexists,thismethodhasnoeffect.
Parameters
Returns
Returns1ifthepasswordexistedandwassuccessfullyremoved;otherwise,returnszero.
clear_passwords
Removesallpasswords.
Parameters
Noparameters.
Returns
Returnsnothing.
get_hosts
Returnsalistofallserversthathaveentriesinthecredentialstore.
Parameters
Noparameters.
Returns
Returnsalistofallserversinthecredentialstore.
get_usernames
Foragivenserver,returnsallusernamesthathaveanassociatedpasswordstoredinthecredentialstore.
Parameter Description
server Serverforthenewentry.CanbeanESX/ESXiorvCenterServersystem.
username Usernameforthenewentry.VMwarerecommendsthatyoucreateauserwithappropriate
privilegesandstorethecorrespondingusernameandpasswordinthecredentialstore.Donot
usetherootoradministratoruserand
thecorrespondingpassword.
password Passwordforthenewentry.
Parameter Description
server Serverfromwhichthepasswordforthespecifieduserisremoved.CanbeanESX/ESXior
vCenterServersystem.
username Usernameforwhichtheassociatedpasswordisremoved.