import custom function to generate random string

used to generate a random tsm client password
removed path, ensure we have a dsm.opt

even if its emtpy, otherwise every dsmc command issues a warning that
there's no dsm.opt and the return code of dsmc is not 0.
service_ensure is needed, support setting initial password, param for dsm.opt
initial password params, config_opt, service_ensure is required
default for case, allow setting the initial password
removed unnecessary attributes
remove unnecessary attributes, refactor resource ordering
more rspec test for services
refactor the template