default Security rule doesn't apply to system VMs since nic.getIsolationUri is not set

use to.setSecurityGroupEnabled to indicate if securitygroup is enabled on this NIC

CLOUDSTACK-983: default Security rule doesn't apply to system VMs
We need to catch PermissionDeniedException in checking if command is
available to an user.
Summary: Adding apache license headers to various devcloud configs

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358284904 -0700
Updating the RAT exclude list to no longer exclude devcloud .cfg files
Signed-off-by: Chip Childers <chip.childers@gmail.com>
Summary: Allow ssh keypairs to be created if developer flag set and user ! cloud

Detail: Previously in the code we allowed the configuration to create ssh
keypairs and put them in the configuration table so that systemvms could have
ssh key auth and work properly if the user was 'cloud' or if the developer
configuration item was set to true. It got changed to requiring both the cloud
user and the developer flag (using an || on a negative) somwhere along the way.
This changes it back to && on a negative to allow us to run as non-cloud users
with the dev flag set, and for cloud to deploy properly without the developer
flag.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358285190 -0700
CLOUDSTACK-985: Revert "Using different MAC for a pair of redundant routers"

The different MAC address for a pair of redundant router have issues when short
time network outrage happened. When this happened:

1. BACKUP(r-2) cannot receive the broadcast from MASTER(r-1).
2. Then r-2 would announce it's MASTER after 3 seconds, and send gratuitous ARP
to the gateway of public ip(usually a rack router).
3. The gateway of public ip would update it's ARP cache to associate the public
ip of the network to the MAC of r-2.
4. In the meantime, r-1 still sending out VRRP broadcast(due to network issue,
the broadcast never arrived at r-2), and acting as MASTER.
5. After network outrage, r-2 would receive the higher priority VRRP broadcast
from MASTER again, then receded as BACKUP.
6. But the public gateway would still associate public ip with MAC of r-2, thus
caused the issue. r-1 would no longer able to receive any packets from public
network.

And there is no way for r-1 to send gratuitous ARP again, because it's always
consider itself as MASTER, no state changed, and no hook existed for receiving
lower priority broadcast.

So I would revert this change, and introduce another commit to ensure the newly
create redundant router would share the same MAC as the first one.

This reverts commit 9f257aa60b62f24193bba3f7c902e7779632e01e.
CLOUDSTACK-985: Make sure RvR would always have same MAC address

Even with newly created RvR using "restartNetwork&cleanup=false" API.
ApiDiscovery: Use UserContext getCallerUser, do a lazy eval to get account service

Impl. and use UserContext to get User.
CloudStack's @Inject is horrible, it may sometimes fail to inject account service
during startup. Do a lazy injection using ComponentLocator when needed.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Consolidate RuntimeCloudException and CloudRuntimeException into one
class CloudRuntimeException, and removed RuntimeCloudException to avoid
confusion.
Remove unused CloudExecutionException.
reverting the earlier commit 432ea9c7d4aff3f7e682f2951f49ed3e95778d9f
done for bug CLOUDSTACK-265 due to IP clearence issues.
Revert "Summary: partical check-in for L4-L7 network services in the shared"

Reverting due to IP clearance issued for the commit done as part of
CLOUDSTACK-312

This reverts commit d4c604cfd8ec6b385de7abf694a936e89add0f38.
Revert "  Summary: check-in for L4-L7 network services in the shared network in"

This reverts commit 7fcfcdf91e49d64375171c9ae7fe61067aa59b6e.

Reverting due to IP clearance issued for the commit done as part of CLOUDSTACK-312
Revert "Summary: partical check-in for L4-L7 network services in the shared"

This reverts commit 6657246cd44629c30e6ea21cc4bbd43a42788e12.

Reverting due to IP clearance issued for the commit done as part of CLOUDSTACK-312
Revert "Summary: partical check-in for L4-L7 network services in the
shared"

This reverts commits 0de5a145e4f06420a4eb1867309af674c16ace7c,
28bbf6c52798c9bd298952844250fbc3cb92dce0

Reverting due to IP clearance issues for the commits done as part of CLOUDSTACK-312
Summary: Change template details in devcloud-kvm sql file

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358357054 -0700
Summary: Modifying integration tests to use 128MB service offerings

Detail: The default devcloud tiny template is set up via devcloud.sql to have
at least 100MB RAM, changing the tests as well. This will also allow the builtin
devcloud-kvm tiny template to work for tests as it requires a bit more.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358357431 -0700
CLOUDSTACK-972:The template will disappear after reordering in template section