This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.
Reason for Revert:
noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]
even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
Latest httpclient library suggests when creating Protocol object for use
with the apache common httpclient class, they should avoid using the
deprecated Protocol signature which takes in SecureProtocolSocketFactory
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
return null. Changed to retrieve the first entry in the map.
Removed the ExecutionException try catch, this would prevent the
unittest from giving accurate information on exceptions. Avoid catching
checked exceptions in a unittest, use expected keyword on @Test instead.
For static NAT rule an IP pool gets created in VNMC. In order to make the pool name unique the rule id is appended. Since static NAT rules are not stored in CS db. like PF/FW rules, the id was always set to 0.
As a result the pool was always getting overridden everytime a static NAT rule is created. Fixed it by appending the public IP address id along with a character indicating that the pool is used for static NAT rule to the pool name.
An extra public ip is acquired while implementing the vnmc element as there is a limitation where in the source nat cannot be used as asa outside ip.
As a result of this when the network gets re-implemented an additional ip is acquired every time. The fix involves checking for existing public ips
in the network and reuse it in case it is not a source nat ip for assigning to asa outside interface.
Each rule created in VNMC under a policy object needs to have an unique order value. Rules are evaluated based on this value.
Eariler order was computed based on the rule count under a policy object. This resulted in duplicate order value when rules get
deleted and recreated. Changed the logic to compute order based on the CS db id of the rule which is unique.
No longer creating firewall rule as part of PF/Static NAT rule creation. Now firewall rule needs to be configured separately.
Also made some changes to exception handling.
Ip and port pool object names in VNMC were created by appending guest vlan, public ip and id of corresponding rule for better readability. This resulted in the name exceeding max. length allowed.
Shortened the name by removing public ip part from it.
An input parameter was incorrectly interpreted during egress rule creation and so resulted in NPE. Created a new vnmc xml for handling creation of egress rule with protocol as 'All'
Due to VNMC limitation source nat ip cannot be assigned to ASA 1000v outside interface. Working around this issue by acquiring additional public ip during network implement and assigning that to outside interface of ASA. Also made changes to ensure that source nat policy comes after pf and static nat policies in terms of evaluation by assigning a high 'order' value for it.