CLOUDSTACK-6062: nic device ids don't always correspond to
'eth' device numbers, but vpc scripts require it. Now we match
based on mac.
cleanup in LibvirtComputingResource

- minor resource leak cleaned up
- cpu-speed reading method extracted
- test added
- logging added in case of exception

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
removed unused variables

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
safely close resource with java 1.7 resource block

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
replaced Integer reference comparsion with .equals

By default only the Integers between -128..127 are cached (unless overridden by java.lang.Integer.IntegerCache.high system property)
If the inbound or outbound values are higher, the reference comparison won't work.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
removed self-assignment

It must have been a copy-paste from the other constructor.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
String concatenation cleanup

Replaced string concatenation in loop with StringBuilder

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Minor Boolean expression simplification

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Boolean expression simplification

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Replaced String concatenation in loop

Replaced String concatenation in loop with StringBuilder
Unit test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Cleanup in UriUtils.encodeURIComponent

- StringBuffer replaced with StringBuilder
- nullcheck of tokens array removed since String.split does not return null
- unit test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Temporarily ignore getCpuSpeed test

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
CLOUDSTACK-6053: While adding a primary or secondary of type smb the password wasn't
encoded. This cause createStoragePool or addImageStore command to fail if special
characters were present. Updated the code to pass user, password and domain as part
of details while adding primary or secondary. Also made changes on server side to
handle it.
CLOUDSTACK-5959: Fixed cascading failures in portable IP test cases
CLOUDSTACK-5978: Changes in get_template function to make it
 independent of ostype passed through test case
CLOUDSTACK-6040: Updated the ip addr validation in create port forwarding
Revert "Temporarily ignore getCpuSpeed test"

This reverts commit e4a91d3610fc8d7ce7718817fbc88318c5fe1e88.
Remove assertion

The assertion is built on the assumption that cpuinfo_max_freq is readable by user, which may not be universaly true.
Disable root disk size field -- not supported in backend
Resource metadata: by default, all metadata is set with display=true (meaning that the detail is avaialble for display to the regular user). If admin wants to set a specific detail to be false, he has to specify it explicitly in addResourceDetail command