You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/11/28 19:03:15 UTC

[01/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Repository: cloudstack
Updated Branches:
  refs/heads/useraccount-refactoring eb8fba3e0 -> 1e25886bd (forced update)


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
new file mode 100644
index 0000000..843b8d0
--- /dev/null
+++ b/setup/db/db/schema-442to450.sql
@@ -0,0 +1,770 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+--
+-- Schema upgrade from 4.4.2 to 4.5.0
+--
+
+-- Disable foreign key checking
+-- SET foreign_key_checks = 0;
+
+DROP VIEW IF EXISTS `cloud`.`storage_tag_view`;
+CREATE VIEW `cloud`.`storage_tag_view` AS
+    select
+        storage_pool_details.id,
+        storage_pool_details.pool_id,
+        storage_pool_details.name
+    from
+        `cloud`.`storage_pool_details`
+    where
+        value='true';
+
+ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
+
+DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
+CREATE VIEW `cloud`.`disk_offering_view` AS
+    select
+        disk_offering.id,
+        disk_offering.uuid,
+        disk_offering.name,
+        disk_offering.display_text,
+        disk_offering.provisioning_type,
+        disk_offering.disk_size,
+        disk_offering.min_iops,
+        disk_offering.max_iops,
+        disk_offering.created,
+        disk_offering.tags,
+        disk_offering.customized,
+        disk_offering.customized_iops,
+        disk_offering.removed,
+        disk_offering.use_local_storage,
+        disk_offering.system_use,
+        disk_offering.hv_ss_reserve,
+        disk_offering.bytes_read_rate,
+        disk_offering.bytes_write_rate,
+        disk_offering.iops_read_rate,
+        disk_offering.iops_write_rate,
+        disk_offering.cache_mode,
+        disk_offering.sort_key,
+        disk_offering.type,
+        disk_offering.display_offering,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path
+    from
+        `cloud`.`disk_offering`
+            left join
+        `cloud`.`domain` ON disk_offering.domain_id = domain.id
+    where
+        disk_offering.state='ACTIVE';
+
+DROP TABLE IF EXISTS `cloud`.`external_nuage_vsp_devices`;
+CREATE TABLE `cloud`.`external_nuage_vsp_devices` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `uuid` varchar(255) UNIQUE,
+  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which nuage vsp is added',
+  `provider_name` varchar(255) NOT NULL COMMENT 'the service provider name corresponding to this nuage vsp device',
+  `device_name` varchar(255) NOT NULL COMMENT 'the name of the nuage vsp device',
+  `host_id` bigint unsigned NOT NULL COMMENT 'host id corresponding to the external nuage vsp device',
+  PRIMARY KEY (`id`),
+  CONSTRAINT `fk_external_nuage_vsp_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_external_nuage_vsp_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+DROP VIEW IF EXISTS `cloud`.`service_offering_view`;
+CREATE VIEW `cloud`.`service_offering_view` AS
+    select
+        service_offering.id,
+        disk_offering.uuid,
+        disk_offering.name,
+        disk_offering.display_text,
+        disk_offering.provisioning_type,
+        disk_offering.created,
+        disk_offering.tags,
+        disk_offering.removed,
+        disk_offering.use_local_storage,
+        disk_offering.system_use,
+        disk_offering.customized_iops,
+        disk_offering.min_iops,
+        disk_offering.max_iops,
+        disk_offering.hv_ss_reserve,
+        disk_offering.bytes_read_rate,
+        disk_offering.bytes_write_rate,
+        disk_offering.iops_read_rate,
+        disk_offering.iops_write_rate,
+        disk_offering.cache_mode,
+        service_offering.cpu,
+        service_offering.speed,
+        service_offering.ram_size,
+        service_offering.nw_rate,
+        service_offering.mc_rate,
+        service_offering.ha_enabled,
+        service_offering.limit_cpu_use,
+        service_offering.host_tag,
+        service_offering.default_use,
+        service_offering.vm_type,
+        service_offering.sort_key,
+        service_offering.is_volatile,
+        service_offering.deployment_planner,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path
+    from
+        `cloud`.`service_offering`
+            inner join
+        `cloud`.`disk_offering` ON service_offering.id = disk_offering.id
+            left join
+        `cloud`.`domain` ON disk_offering.domain_id = domain.id
+    where
+        disk_offering.state='Active';
+
+DROP VIEW IF EXISTS `cloud`.`volume_view`;
+CREATE VIEW `cloud`.`volume_view` AS
+    select
+        volumes.id,
+        volumes.uuid,
+        volumes.name,
+        volumes.device_id,
+        volumes.volume_type,
+        volumes.provisioning_type,
+        volumes.size,
+        volumes.min_iops,
+        volumes.max_iops,
+        volumes.created,
+        volumes.state,
+        volumes.attached,
+        volumes.removed,
+        volumes.pod_id,
+        volumes.display_volume,
+        volumes.format,
+        volumes.path,
+        volumes.chain_info,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        vm_instance.id vm_id,
+        vm_instance.uuid vm_uuid,
+        vm_instance.name vm_name,
+        vm_instance.state vm_state,
+        vm_instance.vm_type,
+        user_vm.display_name vm_display_name,
+        volume_store_ref.size volume_store_size,
+        volume_store_ref.download_pct,
+        volume_store_ref.download_state,
+        volume_store_ref.error_str,
+        volume_store_ref.created created_on_store,
+        disk_offering.id disk_offering_id,
+        disk_offering.uuid disk_offering_uuid,
+        disk_offering.name disk_offering_name,
+        disk_offering.display_text disk_offering_display_text,
+        disk_offering.use_local_storage,
+        disk_offering.system_use,
+        disk_offering.bytes_read_rate,
+        disk_offering.bytes_write_rate,
+        disk_offering.iops_read_rate,
+        disk_offering.iops_write_rate,
+        disk_offering.cache_mode,
+        storage_pool.id pool_id,
+        storage_pool.uuid pool_uuid,
+        storage_pool.name pool_name,
+        cluster.hypervisor_type,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        vm_template.extractable,
+        vm_template.type template_type,
+        vm_template.name template_name,
+        vm_template.display_text template_display_text,
+        iso.id iso_id,
+        iso.uuid iso_uuid,
+        iso.name iso_name,
+        iso.display_text iso_display_text,
+        resource_tags.id tag_id,
+        resource_tags.uuid tag_uuid,
+        resource_tags.key tag_key,
+        resource_tags.value tag_value,
+        resource_tags.domain_id tag_domain_id,
+        resource_tags.account_id tag_account_id,
+        resource_tags.resource_id tag_resource_id,
+        resource_tags.resource_uuid tag_resource_uuid,
+        resource_tags.resource_type tag_resource_type,
+        resource_tags.customer tag_customer,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`volumes`
+            inner join
+        `cloud`.`account` ON volumes.account_id = account.id
+            inner join
+        `cloud`.`domain` ON volumes.domain_id = domain.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`data_center` ON volumes.data_center_id = data_center.id
+            left join
+        `cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id
+            left join
+        `cloud`.`user_vm` ON user_vm.id = vm_instance.id
+            left join
+        `cloud`.`volume_store_ref` ON volumes.id = volume_store_ref.volume_id
+            left join
+        `cloud`.`disk_offering` ON volumes.disk_offering_id = disk_offering.id
+            left join
+        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+            left join
+        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+            left join
+        `cloud`.`vm_template` ON volumes.template_id = vm_template.id
+            left join
+        `cloud`.`vm_template` iso ON iso.id = volumes.iso_id
+            left join
+        `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id
+            and resource_tags.resource_type = 'Volume'
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = volumes.id
+            and async_job.instance_type = 'Volume'
+            and async_job.job_status = 0;
+
+CREATE TABLE `cloud`.`external_brocade_vcs_devices` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `uuid` varchar(255) UNIQUE,
+  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which brocade vcs switch is added',
+  `provider_name` varchar(255) NOT NULL COMMENT 'Service Provider name corresponding to this brocade vcs switch',
+  `device_name` varchar(255) NOT NULL COMMENT 'name of the brocade vcs switch',
+  `host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the external brocade vcs switch',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_external_brocade_vcs_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_external_brocade_vcs_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`brocade_network_vlan_map` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `network_id` bigint unsigned NOT NULL COMMENT 'id of the network',
+  `vlan_id` int(10) COMMENT 'vlan id of the network',
+  PRIMARY KEY  (`id`),
+   CONSTRAINT `fk_brocade_network_vlan_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+/* As part of the separation of Xen and XenServer, update the column for the network labels */
+ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE `xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host';
+
+ALTER TABLE `cloud`.`volumes` CHANGE COLUMN `iso_id` `iso_id` bigint(20) unsigned COMMENT 'The id of the iso from which the volume was created';
+
+DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
+CREATE VIEW `cloud`.`storage_pool_view` AS
+    select
+        storage_pool.id,
+        storage_pool.uuid,
+        storage_pool.name,
+        storage_pool.status,
+        storage_pool.path,
+        storage_pool.pool_type,
+        storage_pool.host_address,
+        storage_pool.created,
+        storage_pool.removed,
+        storage_pool.capacity_bytes,
+        storage_pool.capacity_iops,
+        storage_pool.scope,
+        storage_pool.hypervisor,
+        storage_pool.storage_provider_name,
+        cluster.id cluster_id,
+        cluster.uuid cluster_uuid,
+        cluster.name cluster_name,
+        cluster.cluster_type,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        host_pod_ref.id pod_id,
+        host_pod_ref.uuid pod_uuid,
+        host_pod_ref.name pod_name,
+        storage_pool_details.name tag,
+        op_host_capacity.used_capacity disk_used_capacity,
+        op_host_capacity.reserved_capacity disk_reserved_capacity,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`storage_pool`
+            left join
+        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+            left join
+        `cloud`.`data_center` ON storage_pool.data_center_id = data_center.id
+            left join
+        `cloud`.`host_pod_ref` ON storage_pool.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`storage_pool_details` ON storage_pool_details.pool_id = storage_pool.id
+            and storage_pool_details.value = 'true'
+            left join
+        `cloud`.`op_host_capacity` ON storage_pool.id = op_host_capacity.host_id
+            and op_host_capacity.capacity_type in (3,9)
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = storage_pool.id
+            and async_job.instance_type = 'StoragePool'
+            and async_job.job_status = 0;
+
+
+DROP VIEW IF EXISTS `cloud`.`template_view`;
+CREATE VIEW `cloud`.`template_view` AS
+    select
+        vm_template.id,
+        vm_template.uuid,
+        vm_template.unique_name,
+        vm_template.name,
+        vm_template.public,
+        vm_template.featured,
+        vm_template.type,
+        vm_template.hvm,
+        vm_template.bits,
+        vm_template.url,
+        vm_template.format,
+        vm_template.created,
+        vm_template.checksum,
+        vm_template.display_text,
+        vm_template.enable_password,
+        vm_template.dynamically_scalable,
+        vm_template.state template_state,
+        vm_template.guest_os_id,
+        guest_os.uuid guest_os_uuid,
+        guest_os.display_name guest_os_name,
+        vm_template.bootable,
+        vm_template.prepopulate,
+        vm_template.cross_zones,
+        vm_template.hypervisor_type,
+        vm_template.extractable,
+        vm_template.template_tag,
+        vm_template.sort_key,
+        vm_template.removed,
+        vm_template.enable_sshkey,
+        source_template.id source_template_id,
+        source_template.uuid source_template_uuid,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        launch_permission.account_id lp_account_id,
+        template_store_ref.store_id,
+        image_store.scope as store_scope,
+        template_store_ref.state,
+        template_store_ref.download_state,
+        template_store_ref.download_pct,
+        template_store_ref.error_str,
+        template_store_ref.size,
+        template_store_ref.destroyed,
+        template_store_ref.created created_on_store,
+        vm_template_details.name detail_name,
+        vm_template_details.value detail_value,
+        resource_tags.id tag_id,
+        resource_tags.uuid tag_uuid,
+        resource_tags.key tag_key,
+        resource_tags.value tag_value,
+        resource_tags.domain_id tag_domain_id,
+        resource_tags.account_id tag_account_id,
+        resource_tags.resource_id tag_resource_id,
+        resource_tags.resource_uuid tag_resource_uuid,
+        resource_tags.resource_type tag_resource_type,
+        resource_tags.customer tag_customer,
+        CONCAT(vm_template.id, '_', IFNULL(data_center.id, 0)) as temp_zone_pair
+    from
+        `cloud`.`vm_template`
+            inner join
+        `cloud`.`guest_os` ON guest_os.id = vm_template.guest_os_id
+            inner join
+        `cloud`.`account` ON account.id = vm_template.account_id
+            inner join
+        `cloud`.`domain` ON domain.id = account.domain_id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`vm_template_details` ON vm_template_details.template_id = vm_template.id
+            left join
+        `cloud`.`vm_template` source_template ON source_template.id = vm_template.source_template_id
+            left join
+        `cloud`.`template_store_ref` ON template_store_ref.template_id = vm_template.id and template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
+            left join
+        `cloud`.`image_store` ON image_store.removed is NULL AND template_store_ref.store_id is not NULL AND image_store.id = template_store_ref.store_id
+            left join
+        `cloud`.`template_zone_ref` ON template_zone_ref.template_id = vm_template.id AND template_store_ref.store_id is NULL AND template_zone_ref.removed is null
+            left join
+        `cloud`.`data_center` ON (image_store.data_center_id = data_center.id OR template_zone_ref.zone_id = data_center.id)
+            left join
+        `cloud`.`launch_permission` ON launch_permission.template_id = vm_template.id
+            left join
+        `cloud`.`resource_tags` ON resource_tags.resource_id = vm_template.id
+            and (resource_tags.resource_type = 'Template' or resource_tags.resource_type='ISO');
+
+
+UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC,Hyperv' WHERE name='hypervisor.list';
+UPDATE `cloud`.`configuration` SET description="If set to true, will set guest VM's name as it appears on the hypervisor, to its hostname. The flag is supported for VMware hypervisor only" WHERE name='vm.instancename.flag';
+INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'implicit.host.tags', 'GPU', 'Tag hosts at the time of host disovery based on the host properties/capabilities ', 'GPU');
+
+DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
+CREATE VIEW `cloud`.`domain_router_view` AS
+    select
+        vm_instance.id id,
+        vm_instance.name name,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        vm_instance.uuid uuid,
+        vm_instance.created created,
+        vm_instance.state state,
+        vm_instance.removed removed,
+        vm_instance.pod_id pod_id,
+        vm_instance.instance_name instance_name,
+        host_pod_ref.uuid pod_uuid,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        data_center.dns1 dns1,
+        data_center.dns2 dns2,
+        data_center.ip6_dns1 ip6_dns1,
+        data_center.ip6_dns2 ip6_dns2,
+        host.id host_id,
+        host.uuid host_uuid,
+        host.name host_name,
+	host.hypervisor_type,
+        host.cluster_id cluster_id,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        service_offering.id service_offering_id,
+        disk_offering.uuid service_offering_uuid,
+        disk_offering.name service_offering_name,
+        nics.id nic_id,
+        nics.uuid nic_uuid,
+        nics.network_id network_id,
+        nics.ip4_address ip_address,
+        nics.ip6_address ip6_address,
+        nics.ip6_gateway ip6_gateway,
+        nics.ip6_cidr ip6_cidr,
+        nics.default_nic is_default_nic,
+        nics.gateway gateway,
+        nics.netmask netmask,
+        nics.mac_address mac_address,
+        nics.broadcast_uri broadcast_uri,
+        nics.isolation_uri isolation_uri,
+        vpc.id vpc_id,
+        vpc.uuid vpc_uuid,
+        networks.uuid network_uuid,
+        networks.name network_name,
+        networks.network_domain network_domain,
+        networks.traffic_type traffic_type,
+        networks.guest_type guest_type,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id,
+        domain_router.template_version template_version,
+        domain_router.scripts_version scripts_version,
+        domain_router.is_redundant_router is_redundant_router,
+        domain_router.redundant_state redundant_state,
+        domain_router.stop_pending stop_pending,
+        domain_router.role role
+    from
+        `cloud`.`domain_router`
+            inner join
+        `cloud`.`vm_instance` ON vm_instance.id = domain_router.id
+            inner join
+        `cloud`.`account` ON vm_instance.account_id = account.id
+            inner join
+        `cloud`.`domain` ON vm_instance.domain_id = domain.id
+            left join
+        `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+            left join
+        `cloud`.`host` ON vm_instance.host_id = host.id
+            left join
+        `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+            left join
+        `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+            left join
+        `cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
+            left join
+        `cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
+            left join
+        `cloud`.`networks` ON nics.network_id = networks.id
+            left join
+        `cloud`.`vpc` ON domain_router.vpc_id = vpc.id and vpc.removed is null
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+            and async_job.instance_type = 'DomainRouter'
+            and async_job.job_status = 0;
+
+
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (231, UUID(), 1, 'CentOS 5 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (232, UUID(), 1, 'CentOS 5 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (233, UUID(), 3, 'Oracle Enterprise Linux 5 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (234, UUID(), 3, 'Oracle Enterprise Linux 5 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (235, UUID(), 3, 'Oracle Enterprise Linux 6 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (236, UUID(), 3, 'Oracle Enterprise Linux 6 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (237, UUID(), 4, 'Red Hat Enterprise Linux 5 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (238, UUID(), 4, 'Red Hat Enterprise Linux 5 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (239, UUID(), 4, 'Red Hat Enterprise Linux 6 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (240, UUID(), 4, 'Red Hat Enterprise Linux 6 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (241, UUID(), 10, 'Ubuntu 14.04', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (244, UUID(), 5, 'SUSE Linux Enterprise Server 12 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (245, UUID(), 4, 'Red Hat Enterprise Linux 7', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (246, UUID(), 1, 'CentOS 7', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (247, UUID(), 3, 'Oracle Linux 7', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (248, UUID(), 1, 'CentOS 6 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (249, UUID(), 1, 'CentOS 6 (64-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (250, UUID(), 3, 'Oracle Enterprise Linux 6.5 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (251, UUID(), 3, 'Oracle Enterprise Linux 6.5 (64-bit)', utc_timestamp());
+
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.5 (32-bit)', 1, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.6 (32-bit)', 2, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.7 (32-bit)', 3, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.8 (32-bit)', 4, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 5, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 6, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 7, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 8, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 9, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 10, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 11, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 12, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 13, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 14, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 111, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 112, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 141, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 142, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 161, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 162, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 173, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 174, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 175, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 176, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 231, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 232, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 139, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 140, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 143, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 144, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 177, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 178, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 179, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 180, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 171, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 172, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 181, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 182, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 227, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 228, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 248, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 249, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 7', 246, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (32-bit)', 132, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (64-bit)', 133, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (32-bit)', 183, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (64-bit)', 184, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 16, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 17, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 18, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 19, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 20, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 21, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 22, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 23, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 24, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 25, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 134, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 135, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 145, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 146, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 207, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 208, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 209, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 210, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 211, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 212, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 233, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 234, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 147, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 148, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 213, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 214, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 215, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 216, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 217, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 218, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 219, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 220, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 235, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 236, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 250, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 251, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Linux 7', 247, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.5 (32-bit)', 26, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.6 (32-bit)', 27, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.7 (32-bit)', 28, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.8 (32-bit)', 29, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 30, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 31, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 32, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 33, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 34, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 35, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 36, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 37, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 38, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 39, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 113, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 114, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 149, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 150, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 189, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 190, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 191, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 192, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 193, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 194, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 237, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 238, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 136, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 137, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 195, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 196, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 197, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 198, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 199, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 204, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 205, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 206, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 239, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 240, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 7', 245, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP1 (32-bit)', 41, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP1 (64-bit)', 42, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP2 (32-bit)', 43, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP2 (64-bit)', 44, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP3 (32-bit)', 151, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP3 (64-bit)', 45, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP4 (32-bit)', 153, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP4 (64-bit)', 152, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 (32-bit)', 46, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 (64-bit)', 47, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP1 (32-bit)', 155, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP1 (64-bit)', 154, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP2 (32-bit)', 186, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP2 (64-bit)', 185, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP3 (32-bit)', 188, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP3 (32-bit)', 187, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 12 (64-bit)', 244, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 7 (32-bit)', 48, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 7 (64-bit)', 49, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 8 (32-bit)', 165, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 8 (64-bit)', 166, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 50, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 51, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 87, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 88, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 89, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 90, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 (32-bit)', 52, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 (64-bit)', 53, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 R2 (64-bit)', 54, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2012 (64-bit)', 167, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2012 R2 (64-bit)', 168, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows XP SP3 (32-bit)', 58, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Lucid Lynx 10.04 (32-bit)', 121, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Lucid Lynx 10.04 (64-bit)', 126, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)', 156, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)', 157, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Precise Pangolin 12.04 (32-bit)', 163, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Precise Pangolin 12.04 (64-bit)', 164, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Trusty Tahr 14.04', 241, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 169, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 170, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 98, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 99, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 60, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 103, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 200, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 201, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 59, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 100, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 202, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 203, utc_timestamp(), 0);
+
+
+INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, storage_motion_supported) VALUES (UUID(), 'XenServer', '6.5.0', 500, 1, 13, 1);
+
+update vlan set vlan_id=concat('vlan://', vlan_id) where vlan_type = "VirtualNetwork" and vlan_id not like "vlan://%";
+
+CREATE TABLE `cloud`.`baremetal_rct` (
+  `id` bigint unsigned UNIQUE AUTO_INCREMENT,
+  `uuid` varchar(40) UNIQUE NOT NULL,
+  `url` varchar(2048) NOT NULL,
+  `rct` text NOT NULL,
+   PRIMARY KEY (`id`)
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+
+--Remove duplicates from guest_os_hypervisor table
+DELETE t1 FROM guest_os_hypervisor t1, guest_os_hypervisor t2 WHERE (t1.hypervisor_type = t2.hypervisor_type AND t1.hypervisor_version = t2.hypervisor_version AND t1.guest_os_id = t2.guest_os_id AND t1.id > t2.id AND t1.is_user_defined=0);
+
+-- Set as removed built-in CentOS 5.3 template (if any) for XenServer, since CentOS 5.6 template already exists
+UPDATE `cloud`.`vm_template` SET removed=NOW() WHERE unique_name="centos53-x86_64" AND hypervisor_type="XenServer";
+
+ALTER TABLE `cloud_usage`.`usage_vpn_user` CHANGE `user_name` `user_name` VARCHAR(255);
+
+--Increase key value size generated from RSA-8192 to be stored.
+ALTER TABLE `cloud`.`user_vm_details` MODIFY `value` VARCHAR(5120);
+
+UPDATE `cloud`.`host` SET resource = REPLACE(resource, 'com.cloud.hypervisor.xen.resource', 'com.cloud.hypervisor.xenserver.resource') WHERE hypervisor_type='XenServer' AND REMOVED IS NULL;
+
+INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured, cross_zones, hypervisor_type, extractable, state)
+    VALUES (11, UUID(), 'centos7-x86_64-lxc', 'CentOS 7(64-bit) no GUI (LXC)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/templates/builtin/centos-7-x86_64.tar.gz', 'c2c4fa2d0978121c7977db571f132d6e', 0, 'CentOS 7(64-bit) no GUI (LXC)', 'TAR', 246, 1, 1, 'LXC', 1, 'Active');


[16/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_lb_algo.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_algo.py b/test/integration/component/test_netscaler_lb_algo.py
index 0d571b4..bafecd0 100644
--- a/test/integration/component/test_netscaler_lb_algo.py
+++ b/test/integration/component/test_netscaler_lb_algo.py
@@ -31,83 +31,8 @@ from marvin.lib.base import (Account,
 from marvin.lib.common import (get_zone,
                                get_domain,
                                get_template,
-                               list_configurations,
-                               GetNetscalerInfoFromConfig,
                                add_netscaler)
 from marvin.sshClient import SshClient
-import time
-
-
-class Services:
-
-    """Test netscaler services
-    """
-
-    def __init__(self):
-        self.services = {
-            "account": {
-                "email": "test@test.com",
-                "firstname": "Test",
-                "lastname": "User",
-                "username": "test",
-                # Random characters are appended for unique
-                # username
-                "password": "password",
-            },
-            "service_offering": {
-                "name": "Tiny Instance",
-                "displaytext": "Tiny Instance",
-                "cpunumber": 1,
-                "cpuspeed": 100,  # in MHz
-                "memory": 128,  # In MBs
-            },
-            "virtual_machine": {
-                "displayname": "TestVM",
-                "username": "root",
-                "password": "password",
-                "ssh_port": 22,
-                "hypervisor": 'XenServer',
-                "privateport": 22,
-                "publicport": 22,
-                "protocol": 'TCP',
-            },
-            "network_offering": {
-                "name": 'Netscaler',
-                "displaytext": 'Netscaler',
-                "guestiptype": 'Isolated',
-                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                "traffictype": 'GUEST',
-                "availability": 'Optional',
-                "serviceProviderList": {
-                    "Dhcp": 'VirtualRouter',
-                    "Dns": 'VirtualRouter',
-                    "SourceNat": 'VirtualRouter',
-                    "PortForwarding": 'VirtualRouter',
-                    "Vpn": 'VirtualRouter',
-                    "Firewall": 'VirtualRouter',
-                    "Lb": 'Netscaler',
-                    "UserData": 'VirtualRouter',
-                    "StaticNat": 'VirtualRouter',
-                },
-            },
-            "network": {
-                "name": "Netscaler",
-                "displaytext": "Netscaler"
-            },
-            "lbrule": {
-                "name": "SSH",
-                "alg": "leastconn",
-                # Algorithm used for load balancing
-                "privateport": 22,
-                "publicport": 22,
-                "openfirewall": False,
-            },
-            "ostype": 'CentOS 5.3 (64-bit)',
-            # Cent OS 5.3 (64 bit)
-            "sleep": 60,
-            "timeout": 10,
-            "mode": 'advanced'
-        }
 
 
 class TestLbWithRoundRobin(cloudstackTestCase):
@@ -118,40 +43,37 @@ class TestLbWithRoundRobin(cloudstackTestCase):
         cls.testClient = super(TestLbWithRoundRobin, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         cls._cleanup = []
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
+
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -172,7 +94,7 @@ class TestLbWithRoundRobin(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -184,17 +106,6 @@ class TestLbWithRoundRobin(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = list_configurations(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = list_configurations(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -217,7 +128,7 @@ class TestLbWithRoundRobin(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -230,7 +141,7 @@ class TestLbWithRoundRobin(cloudstackTestCase):
         # Spawn an instance in that network
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -277,10 +188,10 @@ class TestLbWithRoundRobin(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             ip_with_lb_rule.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -304,13 +215,13 @@ class TestLbWithRoundRobin(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 ip_with_lb_rule.ipaddress.ipaddress,
@@ -328,7 +239,7 @@ class TestLbWithRoundRobin(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -340,41 +251,37 @@ class TestLbWithLeastConn(cloudstackTestCase):
         cls.testClient = super(TestLbWithLeastConn, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
 
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
         except Exception as e:
@@ -397,7 +304,7 @@ class TestLbWithLeastConn(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -409,17 +316,6 @@ class TestLbWithLeastConn(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = list_configurations(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = list_configurations(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -442,7 +338,7 @@ class TestLbWithLeastConn(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -455,7 +351,7 @@ class TestLbWithLeastConn(cloudstackTestCase):
         # Spawn an instance in that network
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -509,10 +405,10 @@ class TestLbWithLeastConn(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             ip_with_lb_rule.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["alg"] = 'leastconn'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -537,13 +433,13 @@ class TestLbWithLeastConn(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 ip_with_lb_rule.ipaddress.ipaddress,
@@ -561,7 +457,7 @@ class TestLbWithLeastConn(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -572,41 +468,37 @@ class TestLbWithSourceIp(cloudstackTestCase):
         cls.testClient = super(TestLbWithSourceIp, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         cls._cleanup = []
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
         except Exception as e:
@@ -628,7 +520,7 @@ class TestLbWithSourceIp(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -640,17 +532,6 @@ class TestLbWithSourceIp(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = list_configurations(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = list_configurations(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -673,7 +554,7 @@ class TestLbWithSourceIp(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -686,7 +567,7 @@ class TestLbWithSourceIp(cloudstackTestCase):
         # Spawn an instance in that network
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -733,10 +614,10 @@ class TestLbWithSourceIp(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             ip_with_lb_rule.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["alg"] = 'source'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -761,13 +642,13 @@ class TestLbWithSourceIp(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 ip_with_lb_rule.ipaddress.ipaddress,
@@ -785,7 +666,7 @@ class TestLbWithSourceIp(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -797,62 +678,58 @@ class TestLbAlgoRrLc(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoRrLc, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -914,10 +791,10 @@ class TestLbAlgoRrLc(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -944,13 +821,13 @@ class TestLbAlgoRrLc(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -967,7 +844,7 @@ class TestLbAlgoRrLc(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
 
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
@@ -978,13 +855,13 @@ class TestLbAlgoRrLc(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1001,7 +878,7 @@ class TestLbAlgoRrLc(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1013,62 +890,58 @@ class TestLbAlgoLcRr(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoLcRr, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -1106,7 +979,6 @@ class TestLbAlgoLcRr(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1130,10 +1002,10 @@ class TestLbAlgoLcRr(cloudstackTestCase):
             "Creating LB rule for IP address: %s with least conn algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["alg"] = 'leastconn'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1158,13 +1030,13 @@ class TestLbAlgoLcRr(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1181,7 +1053,7 @@ class TestLbAlgoLcRr(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
 
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
@@ -1191,13 +1063,13 @@ class TestLbAlgoLcRr(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1214,7 +1086,7 @@ class TestLbAlgoLcRr(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1226,62 +1098,58 @@ class TestLbAlgoRrSb(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoRrSb, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -1320,7 +1188,6 @@ class TestLbAlgoRrSb(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1344,10 +1211,10 @@ class TestLbAlgoRrSb(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1372,13 +1239,13 @@ class TestLbAlgoRrSb(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1395,7 +1262,7 @@ class TestLbAlgoRrSb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
 
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
@@ -1406,13 +1273,13 @@ class TestLbAlgoRrSb(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1430,7 +1297,7 @@ class TestLbAlgoRrSb(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1442,30 +1309,28 @@ class TestLbAlgoSbRr(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoSbRr, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+        # Get Zone, Domain and templates
+
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
@@ -1473,32 +1338,32 @@ class TestLbAlgoSbRr(cloudstackTestCase):
 
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -1537,7 +1402,6 @@ class TestLbAlgoSbRr(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1561,10 +1425,10 @@ class TestLbAlgoSbRr(cloudstackTestCase):
             "Creating LB rule for IP address: %s with source algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["alg"] = 'source'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1591,13 +1455,13 @@ class TestLbAlgoSbRr(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1615,7 +1479,7 @@ class TestLbAlgoSbRr(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
 
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
@@ -1626,13 +1490,13 @@ class TestLbAlgoSbRr(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1649,7 +1513,7 @@ class TestLbAlgoSbRr(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1661,30 +1525,26 @@ class TestLbAlgoSbLc(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoSbLc, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
@@ -1692,32 +1552,32 @@ class TestLbAlgoSbLc(cloudstackTestCase):
 
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -1756,7 +1616,6 @@ class TestLbAlgoSbLc(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1780,10 +1639,10 @@ class TestLbAlgoSbLc(cloudstackTestCase):
             "Creating LB rule for IP address: %s with source algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["alg"] = 'source'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1810,13 +1669,13 @@ class TestLbAlgoSbLc(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1834,7 +1693,7 @@ class TestLbAlgoSbLc(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
                 lb_rule.name,
@@ -1844,13 +1703,13 @@ class TestLbAlgoSbLc(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1867,7 +1726,7 @@ class TestLbAlgoSbLc(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1879,30 +1738,28 @@ class TestLbAlgoLcSb(cloudstackTestCase):
         cls.testClient = super(TestLbAlgoLcSb, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+        # Get Zone, Domain and templates
+
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
-                conservemode=True
+                cls.testdata["nw_off_isolated_netscaler"],
+                conservemode="True"
             )
             cls._cleanup.append(cls.network_offering)
             # Enable Network offering
@@ -1910,32 +1767,32 @@ class TestLbAlgoLcSb(cloudstackTestCase):
 
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
             cls._cleanup.insert(0, cls.account)
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
                 zoneid=cls.zone.id
             )
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls._cleanup.append(cls.service_offering)
 
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -1973,7 +1830,6 @@ class TestLbAlgoLcSb(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1997,10 +1853,10 @@ class TestLbAlgoLcSb(cloudstackTestCase):
             "Creating LB rule for IP address: %s with leastconn algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["alg"] = 'leastconn'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -2026,13 +1882,13 @@ class TestLbAlgoLcSb(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -2049,7 +1905,7 @@ class TestLbAlgoLcSb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
 
         self.debug(
             "Updating LB rule: %s with new algorithm: %s" % (
@@ -2060,13 +1916,13 @@ class TestLbAlgoLcSb(cloudstackTestCase):
         self.debug(
             "SSH into Netscaler to check whether algorithm is configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -2084,5 +1940,5 @@ class TestLbAlgoLcSb(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return


[14/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/19d73fe6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19d73fe6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19d73fe6

Branch: refs/heads/useraccount-refactoring
Commit: 19d73fe67d6c43ec4ef7c4a8e76c09e15e05a830
Parents: 4f82528
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 25 18:27:21 2014 +0530

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index cf9f661..6cc6abc 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -64,7 +64,7 @@ export CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
     echo -n $"Starting $PROGNAME: "
     if hostname --fqdn >/dev/null 2>&1 ; then
-        $JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+        $JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
             -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
         RETVAL=$?
         echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
index 7e4e7d0..a3f2ae9 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
     wait_for_network
 
-    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+    if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" -Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
         RETVAL=$?
     then
         rc=0


[07/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
VM detail view: Disable 'change service offering' action per CLOUDSTACK-4200


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/73087bc3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/73087bc3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/73087bc3

Branch: refs/heads/useraccount-refactoring
Commit: 73087bc3ffed4200e4e0a298b9e5539e248449a1
Parents: fff3b9e
Author: Brian Federle <br...@citrix.com>
Authored: Mon Nov 24 13:19:59 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Nov 24 13:19:59 2014 -0800

----------------------------------------------------------------------
 ui/scripts/instances.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/73087bc3/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 11aa725..7ee5db4 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1459,6 +1459,9 @@
 
                     scaleUp: {
                         label: 'label.change.service.offering',
+                        preFilter: function() {
+                            return false;
+                        },
                         createForm: {
                             title: 'label.change.service.offering',
                             desc: function(args) {


[15/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_lb_sticky.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_sticky.py b/test/integration/component/test_netscaler_lb_sticky.py
index a5f55a8..3494eae 100644
--- a/test/integration/component/test_netscaler_lb_sticky.py
+++ b/test/integration/component/test_netscaler_lb_sticky.py
@@ -31,83 +31,10 @@ from marvin.lib.base import (Account,
 from marvin.lib.common import (get_domain,
                                get_zone,
                                get_template,
-                               add_netscaler,
-                               GetNetscalerInfoFromConfig)
+                               add_netscaler)
 from marvin.sshClient import SshClient
 
 
-class Services:
-
-    """Test netscaler services
-    """
-
-    def __init__(self):
-        self.services = {
-            "account": {
-                "email": "test@test.com",
-                "firstname": "Test",
-                "lastname": "User",
-                "username": "test",
-                # Random characters are appended for unique
-                # username
-                "password": "password",
-            },
-            "service_offering": {
-                "name": "Tiny Instance",
-                "displaytext": "Tiny Instance",
-                "cpunumber": 1,
-                "cpuspeed": 100,  # in MHz
-                "memory": 128,  # In MBs
-            },
-            "virtual_machine": {
-                "displayname": "TestVM",
-                "username": "root",
-                "password": "password",
-                "ssh_port": 22,
-                "hypervisor": 'XenServer',
-                "privateport": 22,
-                "publicport": 22,
-                "protocol": 'TCP',
-            },
-            "network_offering": {
-                "name": 'Netscaler',
-                "displaytext": 'Netscaler',
-                "guestiptype": 'Isolated',
-                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                "traffictype": 'GUEST',
-                "availability": 'Optional',
-                "serviceProviderList": {
-                    "Dhcp": 'VirtualRouter',
-                    "Dns": 'VirtualRouter',
-                    "SourceNat": 'VirtualRouter',
-                    "PortForwarding": 'VirtualRouter',
-                    "Vpn": 'VirtualRouter',
-                    "Firewall": 'VirtualRouter',
-                    "Lb": 'Netscaler',
-                    "UserData": 'VirtualRouter',
-                    "StaticNat": 'VirtualRouter',
-                },
-            },
-            "network": {
-                "name": "Netscaler",
-                "displaytext": "Netscaler",
-            },
-            "lbrule": {
-                "name": "SSH",
-                "alg": "roundrobin",
-                # Algorithm used for load balancing
-                "privateport": 22,
-                "publicport": 22,
-                "openfirewall": False,
-            },
-            "ostype": 'CentOS 5.3 (64-bit)',
-            # Cent OS 5.3 (64 bit)
-            "sleep": 60,
-            "timeout": 10,
-            "mode": 'advanced'
-        }
-
-
 class TestLbStickyPolicy(cloudstackTestCase):
 
     @classmethod
@@ -116,46 +43,42 @@ class TestLbStickyPolicy(cloudstackTestCase):
         cls.testClient = super(TestLbStickyPolicy, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
             cls.netscaler = add_netscaler(
                 cls.api_client,
                 cls.zone.id,
-                cls.services["netscaler"])
+                cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
@@ -163,7 +86,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
             # Creating network using the network offering created
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
@@ -173,7 +96,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -211,7 +134,6 @@ class TestLbStickyPolicy(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -238,7 +160,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -274,13 +196,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy configured\
                     properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -304,7 +226,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -327,10 +249,10 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with source algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["alg"] = 'source'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -366,13 +288,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -396,7 +318,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -418,10 +340,10 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with leastconn algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["alg"] = 'leastconn'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -457,13 +379,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy configured\
                     properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -487,7 +409,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -509,12 +431,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with roundrobin algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -550,13 +472,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -580,7 +502,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -602,12 +524,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with source algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -643,13 +565,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -673,7 +595,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -695,12 +617,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with leastconn algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -736,13 +658,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -766,7 +688,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -788,12 +710,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with roundrobin algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -829,13 +751,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -859,7 +781,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -881,12 +803,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with source algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'source'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'source'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -922,13 +844,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -952,7 +874,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -974,12 +896,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "Creating LB rule for IP address: %s with leastconn algo" %
             self.public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'leastconn'
-        self.services["lbrule"]["publicport"] = 80
-        self.services["lbrule"]["privateport"] = 80
+        self.testdata["lbrule"]["alg"] = 'leastconn'
+        self.testdata["lbrule"]["publicport"] = 80
+        self.testdata["lbrule"]["privateport"] = 80
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1015,13 +937,13 @@ class TestLbStickyPolicy(cloudstackTestCase):
             "SSH into Netscaler to check whether sticky policy\
                     configured properly or not?")
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -1045,5 +967,5 @@ class TestLbStickyPolicy(cloudstackTestCase):
 
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_persistent_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_persistent_networks.py b/test/integration/component/test_persistent_networks.py
index ff563df..4b1bc7a 100644
--- a/test/integration/component/test_persistent_networks.py
+++ b/test/integration/component/test_persistent_networks.py
@@ -40,8 +40,7 @@ from marvin.lib.common import (get_domain,
                                get_template,
                                verifyNetworkState,
                                add_netscaler,
-                               wait_for_cleanup,
-                               GetNetscalerInfoFromConfig)
+                               wait_for_cleanup)
 from nose.plugins.attrib import attr
 from marvin.codes import PASS, FAIL, FAILED
 from marvin.sshClient import SshClient
@@ -98,12 +97,7 @@ class TestPersistentNetworks(cloudstackTestCase):
         cls.isolated_network_offering_netscaler = cls.createNetworkOffering(
             "nw_off_isolated_netscaler")
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.services["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         # Configure Netscaler device
         # If configuration succeeds, set ns_configured to True so that
@@ -113,7 +107,7 @@ class TestPersistentNetworks(cloudstackTestCase):
             cls.netscaler = add_netscaler(
                 cls.api_client,
                 cls.zone.id,
-                cls.services["netscaler"])
+                cls.services["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.ns_configured = True
         except Exception:
@@ -1508,12 +1502,7 @@ class TestAssignVirtualMachine(cloudstackTestCase):
         cls.persistent_network_offering_netscaler = cls.createNetworkOffering(
             "nw_off_isolated_persistent_netscaler")
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.services["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         # Configure Netscaler device
         # If configuration succeeds, set ns_configured to True so that
@@ -1523,7 +1512,7 @@ class TestAssignVirtualMachine(cloudstackTestCase):
             cls.netscaler = add_netscaler(
                 cls.api_client,
                 cls.zone.id,
-                cls.services["netscaler"])
+                cls.services["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.ns_configured = True
         except Exception:
@@ -1979,12 +1968,7 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
             cls.api_client,
             state="enabled")
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.services["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         # Configure Netscaler device
         # If configuration succeeds, set ns_configured to True so that
@@ -1994,7 +1978,7 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
             cls.netscaler = add_netscaler(
                 cls.api_client,
                 cls.zone.id,
-                cls.services["netscaler"])
+                cls.services["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.ns_configured = True
         except Exception:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py
index cf0cb3b..6bdc61a 100644
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@ -37,115 +37,11 @@ from marvin.lib.common import (get_zone,
                                get_domain,
                                get_region,
                                get_pod,
-                               isIpInDesiredState,
-                               getPortableIpRangeServices)
+                               isIpInDesiredState)
 from netaddr import IPAddress
 from marvin.sshClient import SshClient
-from marvin.codes import FAILED
 from nose.plugins.attrib import attr
 
-class Services:
-    """Test Multiple IP Ranges
-    """
-    def __init__(self):
-        self.services = {
-                        "account": {
-                                    "email": "test@test.com",
-                                    "firstname": "Test",
-                                    "lastname": "User",
-                                    "username": "test",
-                                    # Random characters are appended for unique
-                                    # username
-                                    "password": "password",
-                        },
-                        "service_offering": {
-                                    "name": "Tiny Instance",
-                                    "displaytext": "Tiny Instance",
-                                    "cpunumber": 1,
-                                    "cpuspeed": 200,    # in MHz
-                                    "memory": 256,      # In MBs
-                        },
-                        "network_offering": {
-                                    "name": 'Network offering portable ip',
-                                    "displaytext": 'Network offering-VR services',
-                                    "guestiptype": 'Isolated',
-                                    "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                    "traffictype": 'GUEST',
-                                    "availability": 'Optional',
-                                    "serviceProviderList": {
-                                            "Dhcp": 'VirtualRouter',
-                                            "Dns": 'VirtualRouter',
-                                            "SourceNat": 'VirtualRouter',
-                                            "PortForwarding": 'VirtualRouter',
-                                            "Vpn": 'VirtualRouter',
-                                            "Firewall": 'VirtualRouter',
-                                            "Lb": 'VirtualRouter',
-                                            "UserData": 'VirtualRouter',
-                                            "StaticNat": 'VirtualRouter',
-                                        },
-                        },
-                        "network": {
-                                  "name": "Test Network - Portable IP",
-                                  "displaytext": "Test Network - Portable IP",
-                        },
-                        "network1": {
-                                  "name": "Test Network 1 - Portable IP",
-                                  "displaytext": "Test Network 1 - Portable IP",
-                        },
-                        "network2": {
-                                  "name": "Test Network 2 - Portable IP",
-                                  "displaytext": "Test Network 2 - Portable IP",
-                        },
-                        "disk_offering": {
-                                    "displaytext": "Small Disk",
-                                    "name": "Small Disk",
-                                    "disksize": 1
-                        },
-                        "natrule": {
-                                    "privateport": 22,
-                                    "publicport": 22,
-                                    "protocol": "TCP",
-                                    "cidr" : '0.0.0.0/0',
-                        },
-                        "small":
-                                # Create a small virtual machine instance with disk offering
-                                {
-                                 "displayname": "testserver",
-                                  "username": "root", # VM creds for SSH
-                                  "password": "password",
-                                  "ssh_port": 22,
-                                  "hypervisor": 'XenServer',
-                                  "privateport": 22,
-                                  "publicport": 22,
-                                  "protocol": 'TCP',
-                        },
-                        "vm1":
-                                # Create a small virtual machine instance with disk offering
-                                {
-                                 "displayname": "vm1",
-                                  "username": "root", # VM creds for SSH
-                                  "password": "password",
-                                  "ssh_port": 22,
-                                  "hypervisor": 'XenServer',
-                                  "privateport": 22,
-                                  "publicport": 22,
-                                  "protocol": 'TCP',
-                        },
-                        "vm2":
-                                # Create a small virtual machine instance with disk offering
-                                {
-                                 "displayname": "vm2",
-                                  "username": "root", # VM creds for SSH
-                                  "password": "password",
-                                  "ssh_port": 22,
-                                  "hypervisor": 'XenServer',
-                                  "privateport": 22,
-                                  "publicport": 22,
-                                  "protocol": 'TCP',
-                        },
-                        "ostype": 'CentOS 5.3 (64-bit)'
-          }
-
 class TestCreatePortablePublicIpRanges(cloudstackTestCase):
     """Test Create Portable IP Ranges
     """
@@ -156,16 +52,16 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
         cls.testClient = super(TestCreatePortablePublicIpRanges, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         cls._cleanup = []
         return
@@ -201,16 +97,12 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
         # 1. Create new portable ip range with root admin api
         # 2. Portable ip range should be created successfully
 
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        portable_ip_range_services["regionid"] = self.region.id
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
         try:
             #create new portable ip range
             new_portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             portable_ip_range_services)
+                                                             self.testdata["configurableData"]["portableIpRange"])
 
             self.cleanup.append(new_portable_ip_range)
         except Exception as e:
@@ -224,15 +116,10 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
         # 1. Create new portable ip range with non root admin api client
         # 2. Portable ip range should not be created
 
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
         try:
             self.account = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id
                             )
             self.cleanup.append(self.account)
@@ -242,12 +129,12 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
                                             DomainName=self.account.domain
                                             )
 
-            portable_ip_range_services["regionid"] = self.region.id
+            self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
             self.debug("Trying to create portable ip range with non root-admin api client, should raise exception")
             with self.assertRaises(Exception):
                 portable_ip_range = PortablePublicIpRange.create(self.api_client_user,
-                                         portable_ip_range_services)
+                                         self.testdata["configurableData"]["portableIpRange"])
                 self.cleanup.append(portable_ip_range)
         except Exception as e:
             self.fail(e)
@@ -260,20 +147,14 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
 
         # 1. Try to create new portable ip range with invalid region id
         # 2. Portable ip range creation should fail
-
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        portable_ip_range_services["regionid"] = -1
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = -1
 
         #create new portable ip range
         self.debug("Trying to create portable ip range with wrong region id")
 
         with self.assertRaises(Exception):
             portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                         portable_ip_range_services)
+                                         self.testdata["configurableData"]["portableIpRange"])
             self.cleanup.append(portable_ip_range)
 
         return
@@ -288,16 +169,16 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
         cls.testClient = super(TestDeletePortablePublicIpRanges, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         cls._cleanup = []
         return
@@ -315,16 +196,11 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
 
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        portable_ip_range_services["regionid"] = self.region.id
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
         #create new portable ip range
         self.portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             portable_ip_range_services)
+                                                             self.testdata["configurableData"]["portableIpRange"])
 
         self.cleanup = []
         return
@@ -357,7 +233,7 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
         try:
             self.account = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id
                             )
 
@@ -390,14 +266,14 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
         try:
             self.account = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id
                             )
 
             self.cleanup.append(self.account)
             self.network_offering = NetworkOffering.create(
                                             self.apiclient,
-                                            self.services["network_offering"],
+                                            self.testdata["isolated_network_offering"],
                                             conservemode=False
                                             )
             # Enable Network offering
@@ -405,7 +281,7 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
 
             self.network = Network.create(
                                     self.apiclient,
-                                    self.services["network"],
+                                    self.testdata["network"],
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
@@ -446,16 +322,16 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
         cls.testClient = super(TestListPortablePublicIpRanges, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         cls._cleanup = []
         return
@@ -473,21 +349,15 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
 
-        #create new portable ip range
-        self.portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if self.portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        self.portable_ip_range_services["regionid"] = self.region.id
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
         self.debug("Creating new portable IP range with startip:%s and endip:%s" %
-                    (str(self.portable_ip_range_services["startip"]),
-                     str(self.portable_ip_range_services["endip"])))
+                    (str(self.testdata["configurableData"]["portableIpRange"]["startip"]),
+                     str(self.testdata["configurableData"]["portableIpRange"]["endip"])))
 
         #create new portable ip range
         self.portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             self.portable_ip_range_services)
+                                                              self.testdata["configurableData"]["portableIpRange"])
 
         self.debug("Created new portable IP range with startip:%s and endip:%s and id:%s" %
                     (self.portable_ip_range.startip,
@@ -524,16 +394,16 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
 
         portable_ip_range = list_portable_ip_range[0]
 
-        self.assertEqual(str(portable_ip_range.startip), str(self.portable_ip_range_services["startip"]),
+        self.assertEqual(str(portable_ip_range.startip), str(self.testdata["configurableData"]["portableIpRange"]["startip"]),
                          "Listed startip not matching with the startip of created public ip range")
 
-        self.assertEqual(str(portable_ip_range.endip), str(self.portable_ip_range_services["endip"]),
+        self.assertEqual(str(portable_ip_range.endip), str(self.testdata["configurableData"]["portableIpRange"]["endip"]),
                          "Listed endip not matching with the endip of created public ip range")
 
-        self.assertEqual(str(portable_ip_range.gateway), str(self.portable_ip_range_services["gateway"]),
+        self.assertEqual(str(portable_ip_range.gateway), str(self.testdata["configurableData"]["portableIpRange"]["gateway"]),
                          "Listed gateway not matching with the gateway of created public ip range")
 
-        self.assertEqual(str(portable_ip_range.netmask), str(self.portable_ip_range_services["netmask"]),
+        self.assertEqual(str(portable_ip_range.netmask), str(self.testdata["configurableData"]["portableIpRange"]["netmask"]),
                          "Listed netmask not matching with the netmask of created public ip range")
         return
 
@@ -547,7 +417,7 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
 
         self.account = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id
                             )
 
@@ -572,29 +442,29 @@ class TestAssociatePublicIp(cloudstackTestCase):
         cls.testClient = super(TestAssociatePublicIp, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
         # Set Zones and disk offerings
-        cls.services["small"]["zoneid"] = cls.zone.id
-        cls.services["small"]["template"] = template.id
+        cls.testdata["small"]["zoneid"] = cls.zone.id
+        cls.testdata["small"]["template"] = template.id
 
         cls.account = Account.create(
                             cls.api_client,
-                            cls.services["account"],
+                            cls.testdata["account"],
                             domainid=cls.domain.id,
                             admin=True
                             )
@@ -602,7 +472,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
         cls.network_offering = NetworkOffering.create(
                                             cls.api_client,
-                                            cls.services["network_offering"],
+                                            cls.testdata["isolated_network_offering"],
                                             conservemode=False
                                             )
 
@@ -611,7 +481,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
         cls.network = Network.create(
                                     cls.api_client,
-                                    cls.services["network"],
+                                    cls.testdata["network"],
                                     accountid=cls.account.name,
                                     domainid=cls.account.domainid,
                                     networkofferingid=cls.network_offering.id,
@@ -635,17 +505,10 @@ class TestAssociatePublicIp(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
 
         self.cleanup = []
-
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        portable_ip_range_services["regionid"] = self.region.id
-
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
         #create new portable ip range
         self.portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             portable_ip_range_services)
+                                                             self.testdata["configurableData"]["portableIpRange"])
         self.cleanup.append(self.portable_ip_range)
         return
 
@@ -741,7 +604,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
         self.service_offering = ServiceOffering.create(
             self.apiclient,
-            self.services["service_offering"]
+            self.testdata["service_offering"]
         )
 
         self.cleanup.append(self.service_offering)
@@ -751,12 +614,12 @@ class TestAssociatePublicIp(cloudstackTestCase):
             self.debug("DeployingVirtual Machine")
             self.virtual_machine = VirtualMachine.create(
                                             self.apiclient,
-                                            self.services["small"],
+                                            self.testdata["small"],
                                             accountid=self.account.name,
                                             domainid=self.account.domainid,
                                             serviceofferingid=self.service_offering.id,
                                             networkids = [self.network.id],
-                                            mode=self.services['mode']
+                                            mode=self.testdata['mode']
                                             )
             self.debug("Created virtual machine instance: %s with ssh_ip: %s" %
                         (self.virtual_machine.id, self.virtual_machine.ssh_ip))
@@ -788,10 +651,10 @@ class TestAssociatePublicIp(cloudstackTestCase):
             fw_rule = FireWallRule.create(
                             self.apiclient,
                             ipaddressid=portableip.ipaddress.id,
-                            protocol=self.services["natrule"]["protocol"],
-                            cidrlist=[self.services["natrule"]["cidr"]],
-                            startport=self.services["natrule"]["publicport"],
-                            endport=self.services["natrule"]["publicport"]
+                            protocol=self.testdata["natrule"]["protocol"],
+                            cidrlist=["0.0.0.0/0"],
+                            startport=self.testdata["natrule"]["publicport"],
+                            endport=self.testdata["natrule"]["publicport"]
                             )
 
             #Create NAT rule
@@ -799,7 +662,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
             nat_rule = NATRule.create(
                         self.apiclient,
                         self.virtual_machine,
-                        self.services["natrule"],
+                        self.testdata["natrule"],
                         portableip.ipaddress.id
                         )
         except Exception as e:
@@ -810,7 +673,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
             self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress)
             SshClient(portableip.ipaddress.ipaddress,
-                      self.services['natrule']["publicport"],
+                      self.testdata['natrule']["publicport"],
                       self.virtual_machine.username,
                       self.virtual_machine.password
                       )
@@ -888,30 +751,30 @@ class TestDisassociatePublicIp(cloudstackTestCase):
         cls.testClient = super(TestDisassociatePublicIp, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
         # Set Zones and disk offerings
-        cls.services["small"]["zoneid"] = cls.zone.id
-        cls.services["small"]["template"] = template.id
+        cls.testdata["small"]["zoneid"] = cls.zone.id
+        cls.testdata["small"]["template"] = template.id
         cls._cleanup = []
 
         cls.account = Account.create(
                             cls.api_client,
-                            cls.services["account"],
+                            cls.testdata["account"],
                             domainid=cls.domain.id,
                             admin=True
                             )
@@ -919,13 +782,13 @@ class TestDisassociatePublicIp(cloudstackTestCase):
 
         cls.service_offering = ServiceOffering.create(
             cls.api_client,
-            cls.services["service_offering"]
+            cls.testdata["service_offering"]
         )
         cls._cleanup.append(cls.service_offering)
 
         cls.network_offering = NetworkOffering.create(
                                             cls.api_client,
-                                            cls.services["network_offering"],
+                                            cls.testdata["isolated_network_offering"],
                                             conservemode=False
                                             )
 
@@ -935,7 +798,7 @@ class TestDisassociatePublicIp(cloudstackTestCase):
 
         cls.network = Network.create(
                                     cls.api_client,
-                                    cls.services["network"],
+                                    cls.testdata["network"],
                                     accountid=cls.account.name,
                                     domainid=cls.account.domainid,
                                     networkofferingid=cls.network_offering.id,
@@ -944,12 +807,12 @@ class TestDisassociatePublicIp(cloudstackTestCase):
 
         cls.virtual_machine = VirtualMachine.create(
                                                     cls.api_client,
-                                                    cls.services["small"],
+                                                    cls.testdata["small"],
                                                     accountid=cls.account.name,
                                                     domainid=cls.account.domainid,
                                                     serviceofferingid=cls.service_offering.id,
                                                     networkids = [cls.network.id],
-                                                    mode=cls.services['mode']
+                                                    mode=cls.testdata['mode']
                                                     )
         return
 
@@ -969,16 +832,11 @@ class TestDisassociatePublicIp(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.cleanup = []
 
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        portable_ip_range_services["regionid"] = self.region.id
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
         #create new portable ip range
         new_portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             portable_ip_range_services)
+                                                             self.testdata["configurableData"]["portableIpRange"])
         self.cleanup.append(new_portable_ip_range)
         return
 
@@ -1047,10 +905,10 @@ class TestDisassociatePublicIp(cloudstackTestCase):
             FireWallRule.create(
                             self.apiclient,
                             ipaddressid=portableip.ipaddress.id,
-                            protocol=self.services["natrule"]["protocol"],
-                            cidrlist=[self.services["natrule"]["cidr"]],
-                            startport=self.services["natrule"]["publicport"],
-                            endport=self.services["natrule"]["publicport"]
+                            protocol=self.testdata["natrule"]["protocol"],
+                            cidrlist=["0.0.0.0/0"],
+                            startport=self.testdata["natrule"]["publicport"],
+                            endport=self.testdata["natrule"]["publicport"]
                             )
 
             #Create NAT rule
@@ -1058,7 +916,7 @@ class TestDisassociatePublicIp(cloudstackTestCase):
             NATRule.create(
                         self.apiclient,
                         self.virtual_machine,
-                        self.services["natrule"],
+                        self.testdata["natrule"],
                         portableip.ipaddress.id
                         )
         except Exception as e:
@@ -1096,7 +954,7 @@ class TestDisassociatePublicIp(cloudstackTestCase):
         try:
             self.otherAccount = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id
                             )
             self.cleanup.append(self.otherAccount)
@@ -1127,25 +985,24 @@ class TestDeleteAccount(cloudstackTestCase):
         cls.testClient = super(TestDeleteAccount, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
-        cls.services['mode'] = cls.zone.networktype
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
         template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
         # Set Zones and disk offerings
-        cls.services["small"]["zoneid"] = cls.zone.id
-        cls.services["small"]["template"] = template.id
+        cls.testdata["small"]["zoneid"] = cls.zone.id
+        cls.testdata["small"]["template"] = template.id
 
         cls._cleanup = []
         return
@@ -1163,27 +1020,23 @@ class TestDeleteAccount(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
 
-        portable_ip_range_services = getPortableIpRangeServices(self.config)
-        if portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
         self.cleanup = []
         try:
             self.account = Account.create(
                             self.apiclient,
-                            self.services["account"],
+                            self.testdata["account"],
                             domainid=self.domain.id,
                             admin=True
                             )
             self.cleanup.append(self.account)
-            portable_ip_range_services["regionid"] = self.region.id
+            self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
             #create new portable ip range
             new_portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             portable_ip_range_services)
+                                                             self.testdata["configurableData"]["portableIpRange"])
             self.cleanup.append(new_portable_ip_range)
             self.network_offering = NetworkOffering.create(
                                             self.apiclient,
-                                            self.services["network_offering"],
+                                            self.testdata["isolated_network_offering"],
                                             conservemode=False
                                             )
             # Enable Network offering
@@ -1191,7 +1044,7 @@ class TestDeleteAccount(cloudstackTestCase):
 
             self.network = Network.create(
                                     self.apiclient,
-                                    self.services["network"],
+                                    self.testdata["network"],
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
@@ -1243,7 +1096,7 @@ class TestDeleteAccount(cloudstackTestCase):
 
         self.service_offering = ServiceOffering.create(
             self.apiclient,
-            self.services["service_offering"]
+            self.testdata["service_offering"]
         )
 
         self.cleanup.append(self.service_offering)
@@ -1251,11 +1104,11 @@ class TestDeleteAccount(cloudstackTestCase):
         self.debug("Deploying Virtual Machine")
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
-            self.services["small"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
-            mode=self.services['mode']
+            mode=self.testdata['mode']
         )
         self.debug("Created virtual machine instance: %s" % self.virtual_machine.id)
 
@@ -1284,10 +1137,10 @@ class TestDeleteAccount(cloudstackTestCase):
             FireWallRule.create(
                             self.apiclient,
                             ipaddressid=portableip.ipaddress.id,
-                            protocol=self.services["natrule"]["protocol"],
-                            cidrlist=[self.services["natrule"]["cidr"]],
-                            startport=self.services["natrule"]["publicport"],
-                            endport=self.services["natrule"]["publicport"]
+                            protocol=self.testdata["natrule"]["protocol"],
+                            cidrlist=["0.0.0.0/0"],
+                            startport=self.testdata["natrule"]["publicport"],
+                            endport=self.testdata["natrule"]["publicport"]
                             )
 
             #Create NAT rule
@@ -1295,7 +1148,7 @@ class TestDeleteAccount(cloudstackTestCase):
             NATRule.create(
                         self.apiclient,
                         self.virtual_machine,
-                        self.services["natrule"],
+                        self.testdata["natrule"],
                         portableip.ipaddress.id
                         )
         except Exception as e:
@@ -1325,34 +1178,32 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
         cls.testClient = super(TestPortableIpTransferAcrossNetworks, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
-        cls.services['mode'] = cls.zone.networktype
-        cls.services["domainid"] = cls.domain.id
-        cls.services["zoneid"] = cls.zone.id
-        cls.services["regionid"] = cls.region.id
+        cls.testdata['mode'] = cls.zone.networktype
+        cls.testdata["regionid"] = cls.region.id
 
         template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
         # Set Zones and disk offerings
-        cls.services["vm1"]["zoneid"] = cls.zone.id
-        cls.services["vm1"]["template"] = template.id
-        cls.services["vm2"]["zoneid"] = cls.zone.id
-        cls.services["vm2"]["template"] = template.id
+        cls.testdata["small"]["zoneid"] = cls.zone.id
+        cls.testdata["small"]["template"] = template.id
 
         cls._cleanup = []
 
         # Set Zones and Network offerings
         cls.account = Account.create(
                             cls.api_client,
-                            cls.services["account"],
+                            cls.testdata["account"],
                             domainid=cls.domain.id,
                             admin=True
                             )
@@ -1360,7 +1211,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
 
         cls.network_offering = NetworkOffering.create(
                                             cls.api_client,
-                                            cls.services["network_offering"],
+                                            cls.testdata["isolated_network_offering"],
                                             conservemode=False
                                             )
         cls._cleanup.append(cls.network_offering)
@@ -1369,12 +1220,12 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
         cls.network_offering.update(cls.api_client, state='Enabled')
         cls.service_offering = ServiceOffering.create(
             cls.api_client,
-            cls.services["service_offering"]
+            cls.testdata["service_offering"]
         )
 
         cls.network1 = Network.create(
                                     cls.api_client,
-                                    cls.services["network1"],
+                                    cls.testdata["network"],
                                     accountid=cls.account.name,
                                     domainid=cls.account.domainid,
                                     networkofferingid=cls.network_offering.id,
@@ -1383,7 +1234,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
 
         cls.virtual_machine1 = VirtualMachine.create(
                                             cls.api_client,
-                                            cls.services["vm1"],
+                                            cls.testdata["small"],
                                             accountid=cls.account.name,
                                             domainid=cls.account.domainid,
                                             serviceofferingid=cls.service_offering.id,
@@ -1391,7 +1242,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
                                           )
         cls.network2 = Network.create(
                                     cls.api_client,
-                                    cls.services["network2"],
+                                    cls.testdata["network"],
                                     accountid=cls.account.name,
                                     domainid=cls.account.domainid,
                                     networkofferingid=cls.network_offering.id,
@@ -1399,7 +1250,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
                                     )
         cls.virtual_machine2 = VirtualMachine.create(
                                             cls.api_client,
-                                            cls.services["vm2"],
+                                            cls.testdata["small"],
                                             accountid=cls.account.name,
                                             domainid=cls.account.domainid,
                                             serviceofferingid=cls.service_offering.id,
@@ -1420,17 +1271,11 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
 
-        #create new portable ip range
-        self.portable_ip_range_services = getPortableIpRangeServices(self.config)
-
-        if self.portable_ip_range_services is FAILED:
-            self.skipTest('Failed to read config values related to portable ip range')
-
-        self.portable_ip_range_services["regionid"] = self.region.id
+        self.testdata["configurableData"]["portableIpRange"]["regionid"] = self.region.id
 
         #create new portable ip range
         self.portable_ip_range = PortablePublicIpRange.create(self.apiclient,
-                                                             self.portable_ip_range_services)
+                                                              self.testdata["configurableData"]["portableIpRange"])
 
         self.cleanup = [self.portable_ip_range, ]
         return
@@ -1488,10 +1333,10 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
             FireWallRule.create(
                             self.apiclient,
                             ipaddressid=portableip.ipaddress.id,
-                            protocol=self.services["natrule"]["protocol"],
-                            cidrlist=[self.services["natrule"]["cidr"]],
-                            startport=self.services["natrule"]["publicport"],
-                            endport=self.services["natrule"]["publicport"]
+                            protocol=self.testdata["natrule"]["protocol"],
+                            cidrlist=["0.0.0.0/0"],
+                            startport=self.testdata["natrule"]["publicport"],
+                            endport=self.testdata["natrule"]["publicport"]
                             )
         except Exception as e:
             portableip.delete(self.apiclient)
@@ -1517,7 +1362,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
 
             self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress)
             SshClient(portableip.ipaddress.ipaddress,
-                      self.services['natrule']["publicport"],
+                      self.testdata['natrule']["publicport"],
                       self.virtual_machine2.username,
                       self.virtual_machine2.password
                       )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py
index 310afca..8221225 100644
--- a/test/integration/smoke/test_primary_storage.py
+++ b/test/integration/smoke/test_primary_storage.py
@@ -190,7 +190,7 @@ class TestPrimaryStorageServices(cloudstackTestCase):
 
 
             storage = StoragePool.create(self.apiclient,
-                                         self.services["iscsi"],
+                                         self.services["configurableData"]["iscsi"],
                                          clusterid=cluster.id,
                                          zoneid=self.zone.id,
                                          podid=self.pod.id

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index 2f97d5f..f0802a5 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -190,24 +190,23 @@ test_data = {
         },
     },
     "nw_off_isolated_netscaler": {
-        "name": "Network offering-ns services",
-        "displaytext": "Network offering-ns services",
-        "guestiptype": "Isolated",
-        "supportedservices":
-        "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
-        "traffictype": "GUEST",
-        "availability": "Optional'",
-        "serviceProviderList": {
-            "Dhcp": "VirtualRouter",
-            "Dns": "VirtualRouter",
-            "SourceNat": "VirtualRouter",
-            "PortForwarding": "VirtualRouter",
-            "Vpn": "VirtualRouter",
-            "Firewall": "VirtualRouter",
-            "Lb": "NetScaler",
-            "UserData": "VirtualRouter",
-            "StaticNat": "VirtualRouter"
-        }
+                "name": 'Netscaler',
+                "displaytext": 'Netscaler',
+                "guestiptype": 'Isolated',
+                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
+                "traffictype": 'GUEST',
+                "availability": 'Optional',
+                "serviceProviderList": {
+                    "Dhcp": 'VirtualRouter',
+                    "Dns": 'VirtualRouter',
+                    "SourceNat": 'VirtualRouter',
+                    "PortForwarding": 'VirtualRouter',
+                    "Vpn": 'VirtualRouter',
+                    "Firewall": 'VirtualRouter',
+                    "Lb": 'Netscaler',
+                    "UserData": 'VirtualRouter',
+                    "StaticNat": 'VirtualRouter',
+                },
     },
     "nw_off_isolated_persistent": {
         "name": 'Test Nw off isolated persistent',
@@ -1419,4 +1418,30 @@ test_data = {
               }
           ]
       },
+    "configurableData":
+    {
+        "portableIpRange": {
+            "gateway": "",
+            "netmask": "",
+            "startip": "",
+            "endip": "",
+            "vlan": ""
+        },
+        "netscaler": {
+            "ipaddress": "",
+            "username": "",
+            "password": "",
+            "networkdevicetype": "",
+            "publicinterface": "",
+            "privateinterface": "",
+            "numretries": "",
+            "lbdevicededicated": "False",
+            "lbdevicecapacity": 2,
+            "port": 22
+        },
+        "iscsi": {
+            "url": "",
+            "name": "Primary iSCSI"
+        },
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/tools/marvin/marvin/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py
index 63662b9..9e3d40c 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -1376,21 +1376,3 @@ def isNetworkDeleted(apiclient, networkid, timeout=600):
         time.sleep(60)
     #end while
     return networkDeleted
-
-def GetNetscalerInfoFromConfig(config):
-    """ Read netscaler data from config file and
-        return it
-
-    Input: Config
-    Output: [netscalerInfoDict, isExceptionOccured]
-    """
-    try:
-        netscalerInfo = config.__dict__[
-                "netscalerDevice"].__dict__
-        return [netscalerInfo, None]
-    except KeyError:
-        exceptionMessage = "Please make sure you have included netscalerDevice\
-                    dict in your config file"
-        return [None, exceptionMessage]
-    except Exception as e:
-        return [None, e]


[19/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7963: Fixed test case in test_dedicate_guest_vlan_ranges.py

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1db2d144
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1db2d144
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1db2d144

Branch: refs/heads/useraccount-refactoring
Commit: 1db2d144229f5e69331c49b7b8922750984b78be
Parents: 684268f
Author: Ashutosh K <as...@clogeny.com>
Authored: Mon Nov 24 11:29:40 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:35:13 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_dedicate_guest_vlan_ranges.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1db2d144/test/integration/component/test_dedicate_guest_vlan_ranges.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_dedicate_guest_vlan_ranges.py b/test/integration/component/test_dedicate_guest_vlan_ranges.py
index efba229..29bc280 100644
--- a/test/integration/component/test_dedicate_guest_vlan_ranges.py
+++ b/test/integration/component/test_dedicate_guest_vlan_ranges.py
@@ -1221,7 +1221,7 @@ class TestDeleteVlanRange(cloudstackTestCase):
                                    self.testdata["isolated_network"],
                                    self.account1.name,
                                    self.account1.domainid,
-                                   networkofferingid=self.isolated_network_offering.id)
+                                   networkofferingid=self.isolated_persistent_network_offering.id)
 
         networks = Network.list(self.apiclient, id=isolated_network.id)
         self.assertEqual(validateList(networks)[0], PASS, "networks list validation failed")


[43/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
The template for the system VM is Wheezy 7 not Wheezy 7.0 on XenServer 6.4.99


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/612b4ae6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/612b4ae6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/612b4ae6

Branch: refs/heads/useraccount-refactoring
Commit: 612b4ae6d9588bceca38b8022d017cb93aae2673
Parents: 4e7af26
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Nov 27 10:27:57 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Nov 27 10:27:57 2014 +0100

----------------------------------------------------------------------
 setup/db/db/schema-442to450.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/612b4ae6/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 107f10c..f84bca6 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -801,8 +801,8 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervis
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 7', 246, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (32-bit)', 132, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (64-bit)', 133, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (32-bit)', 183, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (64-bit)', 184, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7 (32-bit)', 183, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7 (64-bit)', 184, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 16, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 17, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 18, utc_timestamp(), 0);


[18/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7938: Marvin - Create a new section in test_data.py for configurable data and change test cases accordingly

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/684268f4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/684268f4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/684268f4

Branch: refs/heads/useraccount-refactoring
Commit: 684268f4c3a6be1441f1f47df2979185c91bfcaf
Parents: 19d73fe
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Fri Nov 21 17:07:37 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:30:33 2014 +0530

----------------------------------------------------------------------
 .../component/test_lb_secondary_ip.py           |  14 +-
 .../component/test_netscaler_configs.py         | 122 ++--
 test/integration/component/test_netscaler_lb.py | 652 +++++++------------
 .../component/test_netscaler_lb_algo.py         | 604 +++++++----------
 .../component/test_netscaler_lb_sticky.py       | 270 +++-----
 .../component/test_persistent_networks.py       |  30 +-
 test/integration/component/test_portable_ip.py  | 405 ++++--------
 test/integration/smoke/test_primary_storage.py  |   2 +-
 tools/marvin/marvin/config/test_data.py         |  61 +-
 tools/marvin/marvin/lib/common.py               |  18 -
 10 files changed, 785 insertions(+), 1393 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_lb_secondary_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_lb_secondary_ip.py b/test/integration/component/test_lb_secondary_ip.py
index 841257f..c76ab2c 100644
--- a/test/integration/component/test_lb_secondary_ip.py
+++ b/test/integration/component/test_lb_secondary_ip.py
@@ -49,8 +49,7 @@ from marvin.lib.common import (get_domain,
                                get_template,
                                verifyNetworkState,
                                wait_for_cleanup,
-                               add_netscaler,
-                               GetNetscalerInfoFromConfig
+                               add_netscaler
                                )
 
 from marvin.lib.utils import (validateList,
@@ -1775,19 +1774,14 @@ class TestExternalLoadBalancer(cloudstackTestCase):
         cls.testdata["virtual_machine"]["zoneid"] = cls.zone.id
         cls.testdata["virtual_machine"]["template"] = template.id
         cls._cleanup = []
-
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.testdata["netscaler"] = response[0]
-        cls.testdata["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["configurableData"]\
+        ["netscaler"]["lbdevicededicated"] = False
 
         try:
             cls.netscaler = add_netscaler(
                 cls.api_client,
                 cls.zone.id,
-                cls.testdata["netscaler"])
+                cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
         except Exception as e:
             raise unittest.SkipTest("Failed to add netscaler device: %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_configs.py b/test/integration/component/test_netscaler_configs.py
index 91fb85b..3bbd68a 100644
--- a/test/integration/component/test_netscaler_configs.py
+++ b/test/integration/component/test_netscaler_configs.py
@@ -20,7 +20,6 @@
 #Import Local Modules
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import cloudstackTestCase
-#from marvin.cloudstackAPI import *
 from marvin.lib.utils import (cleanup_resources,
                               random_gen)
 from marvin.lib.base import (VirtualMachine,
@@ -159,8 +158,8 @@ class TestAddNetScaler(_NetScalerAddBase):
         #    Balancing feature.
         # 2. Netscaler should be configured successfully.
         self.debug("Adding netscaler device: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
-        netscaler_config = dict(self.services["netscaler_VPX"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
+        netscaler_config = dict(self.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "False"})
         netscaler = NetScaler.add(
                                   self.apiclient,
@@ -236,7 +235,7 @@ class TestInvalidParametersNetscaler(_NetScalerAddBase):
         # 2. Netscaler API should throw error
 
         self.debug("Passing invalid credential for NetScaler")
-        netscaler_config = dict(self.services["netscaler_VPX"])
+        netscaler_config = dict(self.services["configurableData"]["netscaler"])
         netscaler_config.update({'username': random_gen(), 'password': random_gen()})
         self.debug("Adding netscaler device: %s" %
                                     netscaler_config["ipaddress"])
@@ -264,7 +263,7 @@ class TestInvalidParametersNetscaler(_NetScalerAddBase):
         # 2. Netscaler API should throw error
 
         self.debug("Passing invalid public interface for NetScaler")
-        netscaler_config = dict(self.services["netscaler_VPX"])
+        netscaler_config = dict(self.services["configurableData"]["netscaler"])
         netscaler_config.update({'publicinterface': random_gen()})
         self.debug("Adding netscaler device: %s" %
                                     netscaler_config["ipaddress"])
@@ -288,7 +287,7 @@ class TestInvalidParametersNetscaler(_NetScalerAddBase):
         # 1. Add Netscaler device into a Zone by providing valid log in
         #    credentials , public interface and invalid private interface
         # 2. Netscaler API should throw error
-        netscaler_config = dict(self.services["netscaler_VPX"])
+        netscaler_config = dict(self.services["configurableData"]["netscaler"])
         netscaler_config.update({'privateinterface': random_gen()})
         self.debug("Adding netscaler device: %s" %
                                     netscaler_config["ipaddress"])
@@ -329,17 +328,6 @@ class _NetScalerDeployVMBase(_NetScalerBase):
             self.debug("Cleaning up the resources")
             #Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                                    self.apiclient,
-                                    name='network.gc.interval'
-                                    )
-            wait = Configurations.list(
-                                    self.apiclient,
-                                    name='network.gc.wait'
-                                    )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
 
@@ -360,7 +348,7 @@ class TestNetScalerDedicated(_NetScalerDeployVMBase):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "True"})
         cls._addNetScaler(netscaler_config)
 
@@ -517,7 +505,7 @@ class TestNetScalerShared(_NetScalerDeployVMBase):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 
@@ -713,7 +701,7 @@ class TestNetScalerCustomCapacity(_NetScalerCapacity):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicecapacity': 3, 'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 
@@ -932,7 +920,7 @@ class TestNetScalerNoCapacity(_NetScalerCapacity):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicecapacity': 2, 'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 
@@ -1129,7 +1117,7 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 
@@ -1249,13 +1237,13 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                                     )
         nw = network_list[0]
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1271,7 +1259,7 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags = ["advancedns","test"])
@@ -1392,7 +1380,7 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                             "VM state should be running after deployment"
                         )
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             # Find Network vlan used
             network_list = Network.list(
@@ -1402,10 +1390,10 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                                     )
             nw = network_list[0]
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1441,7 +1429,7 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags = ["advancedns","test"])
@@ -1561,13 +1549,13 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
         time.sleep(int(interval[0].value) + int(wait[0].value))
 
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1598,7 +1586,7 @@ class TestGuestNetworkWithNetScaler(_NetScalerDeployVMBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1621,7 +1609,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                             cls.services["ostype"]
                             )
         try:
-           netscaler_config = dict(cls.services["netscaler_VPX"])
+           netscaler_config = dict(cls.services["configurableData"]["netscaler"])
            netscaler_config.update({'lbdevicededicated': "False"})
            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, netscaler_config)
            cls._cleanup.append(cls.netscaler)
@@ -1738,13 +1726,13 @@ class TestGuestNetworkShutDown(_NetScalerBase):
         time.sleep((int(interval[0].value) + int(wait[0].value)) * 2)
 
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1775,7 +1763,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags = ["advancedns","test"])
@@ -1816,7 +1804,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                         )
 
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             # Find Network vlan used
             network_list = Network.list(
@@ -1826,10 +1814,10 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                                     )
             nw = network_list[0]
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1860,7 +1848,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags = ["advancedns","test"])
@@ -1878,7 +1866,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
         self.network.restart(self.apiclient, cleanup=False)
 
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             # Find Network vlan used
             network_list = Network.list(
@@ -1888,10 +1876,10 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                                     )
             nw = network_list[0]
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1922,7 +1910,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags = ["advancedns","test"])
@@ -1940,7 +1928,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
         self.network.restart(self.apiclient, cleanup=True)
 
         self.debug("SSH into netscaler: %s" %
-                                    self.services["netscaler_VPX"]["ipaddress"])
+                                    self.services["configurableData"]["netscaler"]["ipaddress"])
         try:
             # Find Network vlan used
             network_list = Network.list(
@@ -1950,10 +1938,10 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                                     )
             nw = network_list[0]
             ssh_client = SshClient(
-                                    self.services["netscaler_VPX"]["ipaddress"],
-                                    self.services["netscaler_VPX"]["port"],
-                                    self.services["netscaler_VPX"]["username"],
-                                    self.services["netscaler_VPX"]["password"],
+                                    self.services["configurableData"]["netscaler"]["ipaddress"],
+                                    self.services["configurableData"]["netscaler"]["port"],
+                                    self.services["configurableData"]["netscaler"]["username"],
+                                    self.services["configurableData"]["netscaler"]["password"],
                                     )
             cmd = "show vlan %s" % (nw.vlan)
             self.debug("command: %s" % cmd)
@@ -1984,7 +1972,7 @@ class TestGuestNetworkShutDown(_NetScalerBase):
                     )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" % \
-                      (self.services["netscaler_VPX"]["ipaddress"], e))
+                      (self.services["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -2006,7 +1994,7 @@ class TestServiceProvider(_NetScalerDeployVMBase):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 
@@ -2258,7 +2246,7 @@ class TestDeleteNetscaler(_NetScalerDeployVMBase):
                             cls.services["ostype"]
                             )
 
-        netscaler_config = dict(cls.services["netscaler_VPX"])
+        netscaler_config = dict(cls.services["configurableData"]["netscaler"])
         netscaler_config.update({'lbdevicededicated': "False"})
         cls._addNetScaler(netscaler_config)
 


[37/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7976 : Param validation for global params involving domain name


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/95ea2039
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/95ea2039
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/95ea2039

Branch: refs/heads/useraccount-refactoring
Commit: 95ea20390739a24dad92895b8db712282be31bbb
Parents: 86895ec
Author: amoghvk <am...@citrix.com>
Authored: Wed Nov 26 14:54:42 2014 -0800
Committer: amoghvk <am...@citrix.com>
Committed: Wed Nov 26 14:54:42 2014 -0800

----------------------------------------------------------------------
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95ea2039/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 9d25b30..714e6fc 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -327,7 +327,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
 
     private int _maxVolumeSizeInGb = Integer.parseInt(Config.MaxVolumeSize.getDefaultValue());
     private long _defaultPageSize = Long.parseLong(Config.DefaultPageSize.getDefaultValue());
-    private static final String DOMAIN_NAME_PATTERN = "^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$";
+    private static final String DOMAIN_NAME_PATTERN = "^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{1,63}$";
     protected Set<String> configValuesForValidation;
     private Set<String> weightBasedParametersForValidation;
     private Set<String> overprovisioningFactorsForValidation;
@@ -844,7 +844,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if (value.startsWith("*")) {
                     domainName = value.substring(2); //skip the "*."
                 }
-                if (!domainName.matches(DOMAIN_NAME_PATTERN)) {
+                //max length for FQDN is 253 + 2, code adds xxx-xxx-xxx-xxx to domain name when creating URL
+                if (domainName.length() >= 238 || !domainName.matches(DOMAIN_NAME_PATTERN)) {
                     return "Please enter a valid string for domain name, prefixed with '*.' if applicable";
                 }
             } else if (range.equals("routes")) {


[45/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7412: Can't create proper template from VM on S3 secondary storage environment

Signed-off-by: Rajani Karuturi <ra...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9d31e59d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d31e59d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d31e59d

Branch: refs/heads/useraccount-refactoring
Commit: 9d31e59d5b54ef64475e6e8ea36c3e2fc2e7f379
Parents: 488c178
Author: Hiroki Ohashi <hi...@aist.go.jp>
Authored: Thu Nov 27 19:13:36 2014 +0900
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Thu Nov 27 17:07:27 2014 +0530

----------------------------------------------------------------------
 .../storage/motion/AncientDataMotionStrategy.java | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d31e59d/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index 5b01f95..203cfa4 100644
--- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -174,15 +174,29 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
             }
 
             if (cacheData != null) {
-                if (srcData.getType() == DataObjectType.VOLUME && destData.getType() == DataObjectType.VOLUME) {
-                    // volume transfer from primary to secondary or vice versa. Volume transfer between primary pools are already handled by copyVolumeBetweenPools
+                final Long cacheId = cacheData.getId();
+                final String cacheType = cacheData.getType().toString();
+                final String cacheUuid = cacheData.getUuid().toString();
+
+                if (srcData.getType() == DataObjectType.VOLUME &&
+                    (destData.getType() == DataObjectType.VOLUME ||
+                     destData.getType() == DataObjectType.TEMPLATE)) {
+                    // volume transfer from primary to secondary. Volume transfer between primary pools are already handled by copyVolumeBetweenPools
+                    // Delete cache in order to certainly transfer a latest image.
+                    s_logger.debug("Delete " + cacheType + " cache(id: " + cacheId +
+                                   ", uuid: " + cacheUuid + ")");
                     cacheMgr.deleteCacheObject(srcForCopy);
                 } else {
                     // for template, we want to leave it on cache for performance reason
                     if ((answer == null || !answer.getResult()) && srcForCopy.getRefCount() < 2) {
                         // cache object created by this copy, not already there
+                        s_logger.warn("Copy may not be handled correctly by agent(id: " + ep.getId() + ")." +
+                                      " Delete " + cacheType + " cache(id: " + cacheId +
+                                      ", uuid: " + cacheUuid + ")");
                         cacheMgr.deleteCacheObject(srcForCopy);
                     } else {
+                        s_logger.debug("Decrease reference count of " + cacheType +
+                                       " cache(id: " + cacheId + ", uuid: " + cacheUuid + ")");
                         cacheMgr.releaseCacheObject(srcForCopy);
                     }
                 }


[42/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7980 : Fixed the script '/maint/test_egress_rules_host_maintenance.py' - Zone Network Type Information should to be passed to VirtualMachine create method


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d5761ea6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d5761ea6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d5761ea6

Branch: refs/heads/useraccount-refactoring
Commit: d5761ea65ba6cffecc2f79af2b76cbce380a4547
Parents: 4f87993
Author: Chandan Purushothama <Ch...@citrix.com>
Authored: Wed Nov 26 16:16:37 2014 -0800
Committer: Sangeetha Hariharan <sa...@citrix.com>
Committed: Wed Nov 26 19:33:23 2014 -0800

----------------------------------------------------------------------
 .../component/maint/test_egress_rules_host_maintenance.py         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5761ea6/test/integration/component/maint/test_egress_rules_host_maintenance.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/test_egress_rules_host_maintenance.py b/test/integration/component/maint/test_egress_rules_host_maintenance.py
index a27ada3..5018a14 100644
--- a/test/integration/component/maint/test_egress_rules_host_maintenance.py
+++ b/test/integration/component/maint/test_egress_rules_host_maintenance.py
@@ -234,7 +234,8 @@ class TestEgressAfterHostMaintenance(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services["mode"]
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 


[50/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
packaging: add license to missing cloud.limits

I think Hugo/Daan forgot to add license header on one of the new centos7
packaging :)

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0128d629
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0128d629
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0128d629

Branch: refs/heads/useraccount-refactoring
Commit: 0128d62992028f1de6b42bc0679fa1cb0322c9b8
Parents: 21a6bef
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Nov 28 16:10:37 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Nov 28 16:10:37 2014 +0530

----------------------------------------------------------------------
 packaging/centos7/cloud.limits | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0128d629/packaging/centos7/cloud.limits
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.limits b/packaging/centos7/cloud.limits
index fe85be4..7debeb2 100644
--- a/packaging/centos7/cloud.limits
+++ b/packaging/centos7/cloud.limits
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 cloud hard nofile 4096
 cloud soft nofile 4096


[22/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7942: Fixing account permission issue in test_template.py

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/30a2ade1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/30a2ade1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/30a2ade1

Branch: refs/heads/useraccount-refactoring
Commit: 30a2ade17ac3bcdfe26351d0c86f28194c381b7a
Parents: 6eb4a40
Author: Ashutosh K <as...@clogeny.com>
Authored: Wed Nov 19 17:20:57 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:48:53 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_templates.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30a2ade1/test/integration/component/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py
index 769848d..753e71a 100644
--- a/test/integration/component/test_templates.py
+++ b/test/integration/component/test_templates.py
@@ -495,8 +495,12 @@ class TestTemplates(cloudstackTestCase):
         # 4. Deploy Virtual machine using this template
         # 5. VM should be in running state
 
+        userapiclient = self.testClient.getUserApiClient(
+                                    UserName=self.account.name,
+                                    DomainName=self.account.domain)
+
         volumes = Volume.list(
-                        self.apiclient,
+                        userapiclient,
                         virtualmachineid=self.virtual_machine.id,
                         type='ROOT',
                         listall=True
@@ -506,7 +510,7 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Creating a snapshot from volume: %s" % volume.id)
         #Create a snapshot of volume
         snapshot = Snapshot.create(
-                                   self.apiclient,
+                                   userapiclient,
                                    volume.id,
                                    account=self.account.name,
                                    domainid=self.account.domainid
@@ -514,14 +518,14 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Creating a template from snapshot: %s" % snapshot.id)
         # Generate template from the snapshot
         template = Template.create_from_snapshot(
-                                    self.apiclient,
+                                    userapiclient,
                                     snapshot,
                                     self.services["template"]
                                     )
         self.cleanup.append(template)
         # Verify created template
         templates = Template.list(
-                                self.apiclient,
+                                userapiclient,
                                 templatefilter=\
                                 self.services["template"]["templatefilter"],
                                 id=template.id
@@ -540,7 +544,7 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Deploying a VM from template: %s" % template.id)
         # Deploy new virtual machine using template
         virtual_machine = VirtualMachine.create(
-                                    self.apiclient,
+                                    userapiclient,
                                     self.services["virtual_machine"],
                                     templateid=template.id,
                                     accountid=self.account.name,
@@ -550,7 +554,7 @@ class TestTemplates(cloudstackTestCase):
         self.cleanup.append(virtual_machine)
 
         vm_response = VirtualMachine.list(
-                                        self.apiclient,
+                                        userapiclient,
                                         id=virtual_machine.id,
                                         account=self.account.name,
                                         domainid=self.account.domainid


[29/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7973: Proper handler for FenceCommand in simulator
Added a proper handler for FenceCommand in simulator


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bf565845
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bf565845
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bf565845

Branch: refs/heads/useraccount-refactoring
Commit: bf565845285c2e47ef362a39a278eec9dd599680
Parents: a45ddb5
Author: Koushik Das <ko...@apache.org>
Authored: Wed Nov 26 15:58:47 2014 +0530
Committer: Koushik Das <ko...@apache.org>
Committed: Wed Nov 26 17:30:33 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/agent/manager/SimulatorManagerImpl.java         | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf565845/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
index 0ea6855..b0c0bc6 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
@@ -56,6 +56,7 @@ import com.cloud.agent.api.CreateVMSnapshotCommand;
 import com.cloud.agent.api.CreateVolumeFromSnapshotCommand;
 import com.cloud.agent.api.DeleteStoragePoolCommand;
 import com.cloud.agent.api.DeleteVMSnapshotCommand;
+import com.cloud.agent.api.FenceCommand;
 import com.cloud.agent.api.GetDomRVersionCmd;
 import com.cloud.agent.api.GetHostStatsCommand;
 import com.cloud.agent.api.GetStorageStatsCommand;
@@ -419,6 +420,8 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage
                     answer = _mockNetworkMgr.setupPVLAN((PvlanSetupCommand)cmd);
                 } else if (cmd instanceof StorageSubSystemCommand) {
                     answer = this.storageHandler.handleStorageCommands((StorageSubSystemCommand)cmd);
+                } else if (cmd instanceof FenceCommand) {
+                    answer = _mockVmMgr.fence((FenceCommand)cmd);
                 } else if (cmd instanceof GetRouterAlertsCommand || cmd instanceof VpnUsersCfgCommand || cmd instanceof RemoteAccessVpnCfgCommand || cmd instanceof SetMonitorServiceCommand || cmd instanceof AggregationControlCommand ||
                         cmd instanceof SecStorageFirewallCfgCommand) {
                     answer = new Answer(cmd);


[12/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-6465: vmware.reserve.mem is missing from cluster level settings

Signed-off-by: Rajani Karuturi <ra...@gmail.com>
(cherry picked from commit eae733817b3670b0151410c027325f78013392ad)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9585aa0b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9585aa0b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9585aa0b

Branch: refs/heads/useraccount-refactoring
Commit: 9585aa0b51a571d5ea3c33c98bec13f5230ecf4a
Parents: 93f8213
Author: Harikrishna Patnala <ha...@citrix.com>
Authored: Mon Nov 10 14:30:42 2014 +0530
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Tue Nov 25 15:55:54 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/guru/VMwareGuru.java |  8 ++++----
 .../vmware/manager/VmwareManagerImpl.java         | 13 -------------
 .../vmware/resource/VmwareResource.java           | 18 ++++--------------
 server/src/com/cloud/configuration/Config.java    | 16 ----------------
 4 files changed, 8 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index 7c23699..c0711f2 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -149,11 +149,11 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
         super();
     }
 
-    static final ConfigKey<Boolean> VmwareReserveCpu = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
+    public static final ConfigKey<Boolean> VmwareReserveCpu = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
         "Specify whether or not to reserve CPU when not overprovisioning, In case of cpu overprovisioning we will always reserve cpu.", true, ConfigKey.Scope.Cluster,
         null);
 
-    static final ConfigKey<Boolean> VmwareReserveMemory = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
+    public static final ConfigKey<Boolean> VmwareReserveMemory = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.mem", "Advanced", "false",
         "Specify whether or not to reserve memory when not overprovisioning, In case of memory overprovisioning we will always reserve memory.", true,
         ConfigKey.Scope.Cluster, null);
 
@@ -221,8 +221,8 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
         }
 
         long clusterId = getClusterId(vm.getId());
-        details.put(Config.VmwareReserveCpu.key(), VmwareReserveCpu.valueIn(clusterId).toString());
-        details.put(Config.VmwareReserveMem.key(), VmwareReserveMemory.valueIn(clusterId).toString());
+        details.put(VmwareReserveCpu.key(), VmwareReserveCpu.valueIn(clusterId).toString());
+        details.put(VmwareReserveMemory.key(), VmwareReserveMemory.valueIn(clusterId).toString());
         to.setDetails(details);
 
         if (vmType.equals(VirtualMachine.Type.DomainRouter)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 4f24882..3b2c73f 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -183,10 +183,6 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
     private int _routerExtraPublicNics = 2;
     private int _vCenterSessionTimeout = 1200000; // Timeout in milliseconds
 
-    private String _reserveCpu = "false";
-
-    private String _reserveMem = "false";
-
     private String _rootDiskController = DiskControllerType.ide.toString();
 
     private final Map<String, String> _storageMounts = new HashMap<String, String>();
@@ -284,15 +280,6 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
         _vCenterSessionTimeout = NumbersUtil.parseInt(_configDao.getValue(Config.VmwareVcenterSessionTimeout.key()), 1200) * 1000;
         s_logger.info("VmwareManagerImpl config - vmware.vcenter.session.timeout: " + _vCenterSessionTimeout);
 
-        _reserveCpu = _configDao.getValue(Config.VmwareReserveCpu.key());
-        if (_reserveCpu == null || _reserveCpu.isEmpty()) {
-            _reserveCpu = "false";
-        }
-        _reserveMem = _configDao.getValue(Config.VmwareReserveMem.key());
-        if (_reserveMem == null || _reserveMem.isEmpty()) {
-            _reserveMem = "false";
-        }
-
         _recycleHungWorker = _configDao.getValue(Config.VmwareRecycleHungWorker.key());
         if (_recycleHungWorker == null || _recycleHungWorker.isEmpty()) {
             _recycleHungWorker = "false";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 6596057..7e1b7cc 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -207,12 +207,12 @@ import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.agent.api.to.VolumeTO;
 import com.cloud.agent.resource.virtualnetwork.VirtualRouterDeployer;
 import com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource;
-import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.Vlan;
 import com.cloud.exception.CloudException;
 import com.cloud.exception.InternalErrorException;
 import com.cloud.host.Host.Type;
+import com.cloud.hypervisor.guru.VMwareGuru;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.hypervisor.vmware.manager.VmwareHostService;
 import com.cloud.hypervisor.vmware.manager.VmwareManager;
@@ -304,8 +304,6 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     protected int _portsPerDvPortGroup;
     protected boolean _fullCloneFlag = false;
     protected boolean _instanceNameFlag = false;
-    protected boolean _reserveCpu;
-    protected boolean _reserveMem;
 
     protected boolean _recycleHungWorker = false;
     protected DiskControllerType _rootDiskController = DiskControllerType.ide;
@@ -1759,14 +1757,14 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     }
 
     int getReservedMemoryMb(VirtualMachineTO vmSpec) {
-         if (vmSpec.getDetails().get(Config.VmwareReserveMem.key()).equalsIgnoreCase("true")) {
+         if (vmSpec.getDetails().get(VMwareGuru.VmwareReserveMemory.key()).equalsIgnoreCase("true")) {
              return  (int) (vmSpec.getMinRam() / (1024 * 1024));
          }
          return 0;
     }
 
     int getReservedCpuMHZ(VirtualMachineTO vmSpec) {
-         if (vmSpec.getDetails().get(Config.VmwareReserveCpu.key()).equalsIgnoreCase("true")) {
+         if (vmSpec.getDetails().get(VMwareGuru.VmwareReserveCpu.key()).equalsIgnoreCase("true")) {
              return vmSpec.getMinSpeed();
          }
          return 0;
@@ -4735,18 +4733,10 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 _privateNetworkVSwitchName = (String)params.get("private.network.vswitch.name");
             }
 
-            String value = (String)params.get("vmware.reserve.cpu");
-            if (value != null && value.equalsIgnoreCase("true"))
-                _reserveCpu = true;
-
-            value = (String)params.get("vmware.recycle.hung.wokervm");
+            String value = (String)params.get("vmware.recycle.hung.wokervm");
             if (value != null && value.equalsIgnoreCase("true"))
                 _recycleHungWorker = true;
 
-            value = (String)params.get("vmware.reserve.mem");
-            if (value != null && value.equalsIgnoreCase("true"))
-                _reserveMem = true;
-
             value = (String)params.get("vmware.root.disk.controller");
             if (value != null && value.equalsIgnoreCase("scsi"))
                 _rootDiskController = DiskControllerType.scsi;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 435b0d8..0ef0e25 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -1190,22 +1190,6 @@ public enum Config {
             "Start port number of additional VNC port range",
             null),
     //VmwareGuestNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.guest.nic.device.type", "E1000", "Ethernet card type used in guest VM, valid values are E1000, PCNet32, Vmxnet2, Vmxnet3", null),
-    VmwareReserveCpu(
-            "Advanced",
-            ManagementServer.class,
-            Boolean.class,
-            "vmware.reserve.cpu",
-            "false",
-            "Specify whether or not to reserve CPU based on CPU overprovisioning factor",
-            null),
-    VmwareReserveMem(
-            "Advanced",
-            ManagementServer.class,
-            Boolean.class,
-            "vmware.reserve.mem",
-            "false",
-            "Specify whether or not to reserve memory based on memory overprovisioning factor",
-            null),
     VmwareRootDiskControllerType(
             "Advanced",
             ManagementServer.class,


[20/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7953: Fixed time wait period for verifying snapshot policy

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50ab04dc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50ab04dc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50ab04dc

Branch: refs/heads/useraccount-refactoring
Commit: 50ab04dc0d73c0192c0693d62c047cfaffc73e99
Parents: 1db2d14
Author: Ashutosh K <as...@clogeny.com>
Authored: Thu Nov 20 16:43:09 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:39:43 2014 +0530

----------------------------------------------------------------------
 .../component/test_snapshot_limits.py           | 22 +++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50ab04dc/test/integration/component/test_snapshot_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py
index 18a1c65..40849ee 100644
--- a/test/integration/component/test_snapshot_limits.py
+++ b/test/integration/component/test_snapshot_limits.py
@@ -16,13 +16,21 @@
 # under the License.
 
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.lib.utils import *
-from marvin.lib.base import *
-from marvin.lib.common import *
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+#from marvin.cloudstackAPI import *
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Account,
+                             VirtualMachine,
+                             SnapshotPolicy,
+                             ServiceOffering)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_volumes,
+                               list_snapshots,
+                               list_snapshot_policy)
 from marvin.lib.utils import is_snapshot_on_nfs
-import os
+import time
 
 
 class Services:
@@ -262,7 +270,7 @@ class TestSnapshotLimit(cloudstackTestCase):
         # Sleep for (maxsnaps+1) hours to verify
         # only maxsnaps snapshots are retained
         time.sleep(
-            (self.services["recurring_snapshot"]["maxsnaps"]) * 3600
+            (int(self.services["recurring_snapshot"]["maxsnaps"]) + 1) * 3600
             )
 
         # Verify the snapshot was created or not


[24/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7933: test_escalations_instances.py - Fixed test_13_vm_nics for Vmware

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d0ca2d5d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d0ca2d5d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d0ca2d5d

Branch: refs/heads/useraccount-refactoring
Commit: d0ca2d5d8b1575bf8c7d1b6566cea15c8a2264bb
Parents: 2fbef67
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Tue Nov 18 11:49:38 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:58:00 2014 +0530

----------------------------------------------------------------------
 .../component/test_escalations_instances.py     | 74 ++++++++++++++------
 1 file changed, 51 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d0ca2d5d/test/integration/component/test_escalations_instances.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_escalations_instances.py b/test/integration/component/test_escalations_instances.py
index fd25bb9..cc1f78b 100644
--- a/test/integration/component/test_escalations_instances.py
+++ b/test/integration/component/test_escalations_instances.py
@@ -1781,6 +1781,12 @@ class TestListInstances(cloudstackTestCase):
             raise unittest.SkipTest(
                 "This feature is not supported on existing hypervisor.\
                         Hence, skipping the test")
+
+        hypervisorIsVmware = False
+
+        if self.hypervisor.lower() == "vmware":
+            hypervisorIsVmware = True
+
         # Listing all the VM's for a User
         list_vms_before = VirtualMachine.list(
             self.userapiclient,
@@ -1797,6 +1803,7 @@ class TestListInstances(cloudstackTestCase):
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
+            mode=self.zone.networktype if hypervisorIsVmware else "default"
         )
         self.assertIsNotNone(
             vm_created,
@@ -2002,40 +2009,61 @@ class TestListInstances(cloudstackTestCase):
             default_nic.networkid,
             "Default NIC is not matching for VM"
         )
-        # Deleting non default NIC
-        vm_created.remove_nic(
-            self.userapiclient,
-            non_default_nic.id
-        )
-        # Listing the Vm details again
-        list_vms_after = VirtualMachine.list(
-            self.userapiclient,
-            id=vm_created.id
-        )
-        status = validateList(list_vms_after)
-        self.assertEquals(
+
+        # If hypervisor is Vmware, then check if
+        # the vmware tools are installed and the process is running
+        # Vmware tools are necessary for remove nic operations (vmware 5.5+)
+        isVmwareToolInstalled = False
+        if hypervisorIsVmware:
+            sshClient = vm_created.get_ssh_client()
+            result = str(
+                sshClient.execute("service vmware-tools status")).lower()
+            self.debug("and result is: %s" % result)
+            if "running" in result:
+                isVmwareToolInstalled = True
+
+        goForUnplugOperation = True
+        # If Vmware tools are not installed in case of vmware hypervisor
+        # then don't go further for unplug operation (remove nic) as it won't
+        # be supported
+        if hypervisorIsVmware and not isVmwareToolInstalled:
+            goForUnplugOperation = False
+
+        if goForUnplugOperation:
+            # Deleting non default NIC
+            vm_created.remove_nic(
+                self.userapiclient,
+                non_default_nic.id
+            )
+            # Listing the Vm details again
+            list_vms_after = VirtualMachine.list(
+                self.userapiclient,
+                id=vm_created.id
+            )
+            status = validateList(list_vms_after)
+            self.assertEquals(
             PASS,
             status[0],
             "Listing of VM failed"
-        )
-        vm = list_vms_after[0]
-        # Verifying that VM nics size is 1 now
-        vm_nics_after = vm.nic
-        self.assertIsNotNone(
+            )
+            vm = list_vms_after[0]
+            # Verifying that VM nics size is 1 now
+            vm_nics_after = vm.nic
+            self.assertIsNotNone(
             vm_nics_after,
             "Nic not found for the deployed VM"
-        )
-        self.assertEquals(
+            )
+            self.assertEquals(
             1,
             len(vm_nics_after),
             "VM NIC's count is not matching"
-        )
-        # Verifying the nic network is same as the default nic network
-        self.assertEquals(
+            )
+            # Verifying the nic network is same as the default nic network
+            self.assertEquals(
             network2.id,
             vm_nics_after[0].networkid,
             "VM NIC is not same as expected"
-        )
+            )
         return
 
 


[40/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7978 : Fixed the script 'test_egress_rules.py' - Zone Network Type Information should to be passed to VirtualMachine create method


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b81cf5ea
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b81cf5ea
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b81cf5ea

Branch: refs/heads/useraccount-refactoring
Commit: b81cf5eab19a00b12c2c39c105442f8c12d5cd82
Parents: 960b7bb
Author: Chandan Purushothama <Ch...@citrix.com>
Authored: Wed Nov 26 16:06:26 2014 -0800
Committer: Sangeetha Hariharan <sa...@citrix.com>
Committed: Wed Nov 26 19:32:46 2014 -0800

----------------------------------------------------------------------
 test/integration/component/test_egress_rules.py | 21 +++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b81cf5ea/test/integration/component/test_egress_rules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py
index 0f05c07..138c765 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -412,7 +412,8 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
@@ -586,7 +587,8 @@ class TestDefaultGroupEgress(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -766,7 +768,8 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -982,7 +985,8 @@ class TestRevokeEgressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -1379,7 +1383,8 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase):
                                     accountid=self.accountA.name,
                                     domainid=self.accountA.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.cleanup.append(self.virtual_machineA)
         self.debug("Deploying VM in account: %s" % self.accountA.name)
@@ -1650,7 +1655,8 @@ class TestMultipleAccountsEgressRule(cloudstackTestCase):
                                     accountid=self.accountA.name,
                                     domainid=self.accountA.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_groupA.id]
+                                    securitygroupids=[security_groupA.id],
+                                    mode=self.services['mode']
                                 )
         self.cleanup.append(self.virtual_machineA)
         self.debug("Deploying VM in account: %s" % self.accountA.name)
@@ -1880,7 +1886,8 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 


[44/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-6075: Increase the ram size for router service offering

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/488c1785
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/488c1785
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/488c1785

Branch: refs/heads/useraccount-refactoring
Commit: 488c17858f17f548d907cd72df54e0abdfd439b2
Parents: 612b4ae
Author: Harikrishna Patnala <ha...@citrix.com>
Authored: Thu Nov 27 12:41:22 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Nov 27 16:04:59 2014 +0530

----------------------------------------------------------------------
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 85 ++++++++++++++++++++
 .../lb/InternalLoadBalancerVMManager.java       |  2 +-
 server/src/com/cloud/configuration/Config.java  |  2 +-
 .../router/VirtualNetworkApplianceManager.java  |  2 +-
 setup/db/db/schema-442to450.sql                 |  2 +
 5 files changed, 90 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
index dc1057f..aeb44a1 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
@@ -68,8 +68,93 @@ public class Upgrade442to450 implements DbUpgrade {
         updateSystemVmTemplates(conn);
         dropInvalidKeyFromStoragePoolTable(conn);
         dropDuplicatedForeignKeyFromAsyncJobTable(conn);
+        upgradeMemoryOfVirtualRoutervmOffering(conn);
+        upgradeMemoryOfInternalLoadBalancervmOffering(conn);
     }
 
+    private void upgradeMemoryOfVirtualRoutervmOffering(Connection conn) {
+        PreparedStatement updatePstmt = null;
+        PreparedStatement selectPstmt = null;
+        ResultSet selectResultSet = null;
+        int newRamSize = 256; //256MB
+        long serviceOfferingId = 0;
+
+        /**
+         * Pick first row in service_offering table which has system vm type as domainrouter. User added offerings would start from 2nd row onwards.
+         * We should not update/modify any user-defined offering.
+         */
+
+        try {
+            selectPstmt = conn.prepareStatement("SELECT id FROM `cloud`.`service_offering` WHERE vm_type='domainrouter'");
+            updatePstmt = conn.prepareStatement("UPDATE `cloud`.`service_offering` SET ram_size=? WHERE id=?");
+            selectResultSet = selectPstmt.executeQuery();
+            if(selectResultSet.next()) {
+                serviceOfferingId = selectResultSet.getLong("id");
+            }
+
+            updatePstmt.setInt(1, newRamSize);
+            updatePstmt.setLong(2, serviceOfferingId);
+            updatePstmt.executeUpdate();
+        } catch (SQLException e) {
+            throw new CloudRuntimeException("Unable to upgrade ram_size of service offering for domain router. ", e);
+        } finally {
+            try {
+                if (selectPstmt != null) {
+                    selectPstmt.close();
+                }
+                if (selectResultSet != null) {
+                    selectResultSet.close();
+                }
+                if (updatePstmt != null) {
+                    updatePstmt.close();
+                }
+            } catch (SQLException e) {
+            }
+        }
+        s_logger.debug("Done upgrading RAM for service offering of domain router to " + newRamSize);
+    }
+
+    private void upgradeMemoryOfInternalLoadBalancervmOffering(Connection conn) {
+        PreparedStatement updatePstmt = null;
+        PreparedStatement selectPstmt = null;
+        ResultSet selectResultSet = null;
+        int newRamSize = 256; //256MB
+        long serviceOfferingId = 0;
+
+        /**
+         * Pick first row in service_offering table which has system vm type as internalloadbalancervm. User added offerings would start from 2nd row onwards.
+         * We should not update/modify any user-defined offering.
+         */
+
+        try {
+            selectPstmt = conn.prepareStatement("SELECT id FROM `cloud`.`service_offering` WHERE vm_type='internalloadbalancervm'");
+            updatePstmt = conn.prepareStatement("UPDATE `cloud`.`service_offering` SET ram_size=? WHERE id=?");
+            selectResultSet = selectPstmt.executeQuery();
+            if(selectResultSet.next()) {
+                serviceOfferingId = selectResultSet.getLong("id");
+            }
+
+            updatePstmt.setInt(1, newRamSize);
+            updatePstmt.setLong(2, serviceOfferingId);
+            updatePstmt.executeUpdate();
+        } catch (SQLException e) {
+            throw new CloudRuntimeException("Unable to upgrade ram_size of service offering for internal loadbalancer vm. ", e);
+        } finally {
+            try {
+                if (selectPstmt != null) {
+                    selectPstmt.close();
+                }
+                if (selectResultSet != null) {
+                    selectResultSet.close();
+                }
+                if (updatePstmt != null) {
+                    updatePstmt.close();
+                }
+            } catch (SQLException e) {
+            }
+        }
+        s_logger.debug("Done upgrading RAM for service offering of internal loadbalancer vm to " + newRamSize);
+    }
 
     @Override
     public File[] getCleanupScripts() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManager.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManager.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManager.java
index 803d3a5..339b0c1 100644
--- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManager.java
+++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManager.java
@@ -32,7 +32,7 @@ import com.cloud.vm.VirtualMachineProfile.Param;
 
 public interface InternalLoadBalancerVMManager {
     //RAM/CPU for the system offering used by Internal LB VMs
-    public static final int DEFAULT_INTERNALLB_VM_RAMSIZE = 128;            // 128 MB
+    public static final int DEFAULT_INTERNALLB_VM_RAMSIZE = 256;            // 256 MB
     public static final int DEFAULT_INTERNALLB_VM_CPU_MHZ = 256;            // 256 MHz
 
     /**

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index cd0824e..281d99c 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -1452,7 +1452,7 @@ public enum Config {
             "SAML2 IDP Metadata Downloading and parsing etc. activity timeout in milliseconds",
             null),
     //NetworkType("Hidden", ManagementServer.class, String.class, "network.type", "vlan", "The type of network that this deployment will use.", "vlan,direct"),
-    RouterRamSize("Hidden", NetworkOrchestrationService.class, Integer.class, "router.ram.size", "128", "Default RAM for router VM (in MB).", null),
+    RouterRamSize("Hidden", NetworkOrchestrationService.class, Integer.class, "router.ram.size", "256", "Default RAM for router VM (in MB).", null),
 
     DefaultPageSize("Advanced", ManagementServer.class, Long.class, "default.page.size", "500", "Default page size for API list* commands", null),
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
index 9fb47fd..989dd84 100644
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
@@ -61,7 +61,7 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA
     static final ConfigKey<Integer> RouterAlertsCheckInterval = new ConfigKey<Integer>(Integer.class, RouterAlertsCheckIntervalCK, "Advanced", "1800",
             "Interval (in seconds) to check for alerts in Virtual Router.", false, ConfigKey.Scope.Global, null);
 
-    public static final int DEFAULT_ROUTER_VM_RAMSIZE = 128;            // 128M
+    public static final int DEFAULT_ROUTER_VM_RAMSIZE = 256;            // 256M
     public static final int DEFAULT_ROUTER_CPU_MHZ = 500;                // 500 MHz
     public static final boolean USE_POD_VLAN = false;
     public static final int DEFAULT_PRIORITY = 100;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index f84bca6..14dcc51 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -439,6 +439,8 @@ UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC,Hyperv' W
 UPDATE `cloud`.`configuration` SET description="If set to true, will set guest VM's name as it appears on the hypervisor, to its hostname. The flag is supported for VMware hypervisor only" WHERE name='vm.instancename.flag';
 INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'implicit.host.tags', 'GPU', 'Tag hosts at the time of host disovery based on the host properties/capabilities ', 'GPU');
 
+UPDATE `cloud`.`configuration` SET value='256' WHERE name='router.ram.size';
+
 DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
 CREATE VIEW `cloud`.`domain_router_view` AS
     select


[04/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/environment.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/environment.properties b/packaging/centos7/tomcat7/environment.properties
new file mode 100644
index 0000000..3254cf6
--- /dev/null
+++ b/packaging/centos7/tomcat7/environment.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# management server compile-time environment parameters
+
+paths.script=/usr/share/cloudstack-common
+mount.parent=/var/cloudstack/mnt
+cloud-stack-components-specification=components.xml

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/log4j-cloud.xml
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/log4j-cloud.xml b/packaging/centos7/tomcat7/log4j-cloud.xml
new file mode 100644
index 0000000..ef7904c
--- /dev/null
+++ b/packaging/centos7/tomcat7/log4j-cloud.xml
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+   <throwableRenderer class="com.cloud.utils.log.CglibThrowableRenderer"/>
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A regular appender FIXME implement code that will close/reopen logs on SIGHUP by logrotate FIXME make the paths configurable using the build system -->
+   <appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
+      <param name="Append" value="true"/>
+      <param name="Threshold" value="TRACE"/>
+      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
+        <param name="FileNamePattern" value="/var/log/cloudstack/management/management-server.log.%d{yyyy-MM-dd}.gz"/>
+        <param name="ActiveFileName" value="/var/log/cloudstack/management/management-server.log"/>
+      </rollingPolicy>
+      <layout class="org.apache.log4j.EnhancedPatternLayout">
+         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1.}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+   
+   <appender name="APISERVER" class="org.apache.log4j.rolling.RollingFileAppender">
+      <param name="Append" value="true"/>
+      <param name="Threshold" value="DEBUG"/>
+      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
+        <param name="FileNamePattern" value="/var/log/cloudstack/management/apilog.log.%d{yyyy-MM-dd}.gz"/>
+        <param name="ActiveFileName" value="/var/log/cloudstack/management/apilog.log"/>
+      </rollingPolicy>
+      <layout class="org.apache.log4j.EnhancedPatternLayout">
+         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1.}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+
+   <appender name="AWSAPI" class="org.apache.log4j.rolling.RollingFileAppender">
+      <param name="Append" value="true"/>
+      <param name="Threshold" value="DEBUG"/>
+      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
+        <param name="FileNamePattern" value="/var/log/cloudstack/awsapi/awsapi.log.%d{yyyy-MM-dd}.gz"/>
+        <param name="ActiveFileName" value="/var/log/cloudstack/awsapi/awsapi.log"/>
+      </rollingPolicy>
+      <layout class="org.apache.log4j.EnhancedPatternLayout">
+         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1.}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+   <!-- ============================== -->
+   <!-- Append warnings+ to the syslog if it is listening on UDP port FIXME make sysloghost configurable! -->
+   <!-- ============================== -->
+
+   <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+      <param name="Threshold" value="WARN"/>
+      <param name="SyslogHost" value="localhost"/>
+      <param name="Facility" value="LOCAL6"/>
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- Append alerts to the syslog if it is configured -->
+   <!-- ============================== -->
+
+   <appender name="ALERTSYSLOG" class="org.apache.cloudstack.syslog.AlertsSyslogAppender">
+      <param name="Threshold" value="WARN"/>
+      <param name="SyslogHosts" value=""/>
+      <param name="Facility" value="LOCAL6"/>
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- send alert warnings+ as the SNMP trap if it is configured! -->
+   <!-- ============================== -->
+
+   <appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender">
+      <param name="Threshold" value="WARN"/>
+      <param name="SnmpManagerIpAddresses" value=""/>
+      <param name="SnmpManagerPorts" value=""/>
+      <param name="SnmpManagerCommunities" value=""/>
+      <layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout">
+         <param name="PairDelimiter" value="//"/>
+         <param name="KeyValueDelimiter" value="::"/>
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+      <layout class="org.apache.log4j.EnhancedPatternLayout">
+         <param name="ConversionPattern" value="%-5p [%c{1.}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="com.cloud">
+     <priority value="DEBUG"/>
+   </category>
+   
+   <category name="org.apache.cloudstack">
+     <priority value="DEBUG"/>
+   </category>
+   
+   <category name="org.apache.cloudstack">
+      <priority value="DEBUG"/>
+   </category>
+
+   <category name="com.cloud.utils.nio">
+     <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <category name="org.apache.cloudstack">
+      <priority value="DEBUG"/>
+   </category>
+
+   <category name="org.apache.cloudstack.api.command">
+      <priority value="TRACE"/>
+   </category>
+   
+   <category name="org">
+      <priority value="INFO"/>
+   </category>
+   
+   <category name="org.springframework">
+      <priority value="WARN"/>
+   </category>
+   
+   <category name="org.apache.cloudstack.spring.module.context.ResourceApplicationContext">
+      <priority value="WARN"/>
+   </category>
+   
+   <category name="net">
+     <priority value="INFO"/>
+   </category>
+
+   <category name="apiserver.com.cloud">
+     <priority value="DEBUG"/>
+   </category>
+
+   <logger name="apiserver.com.cloud" additivity="false">
+      <level value="DEBUG"/>
+      <appender-ref ref="APISERVER"/>
+   </logger>
+
+   
+   <logger name="com.cloud.bridge" additivity="false">
+      <level value="DEBUG"/>
+      <appender-ref ref="AWSAPI"/>
+   </logger>
+   
+   <logger name="com.cloud.stack" additivity="false">
+      <level value="DEBUG"/>
+      <appender-ref ref="AWSAPI"/>
+   </logger>
+   
+
+   <logger name="org.apache.axis2" additivity="false">
+      <level value="INFO"/>
+      <appender-ref ref="AWSAPI"/>
+   </logger>
+
+   <!-- ============================== -->
+   <!-- Add or remove these logger for SNMP, this logger is for SNMP alerts plugin -->
+   <!-- ============================== -->
+
+   <logger name="org.apache.cloudstack.alerts" additivity="false">
+      <level value="WARN"/>
+      <appender-ref ref="SYSLOG"/>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+      <appender-ref ref="SNMP"/>
+      <appender-ref ref="ALERTSYSLOG"/>
+   </logger>
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <level value="INFO"/>
+      <appender-ref ref="SYSLOG"/>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/server.xml
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/server.xml b/packaging/centos7/tomcat7/server.xml
new file mode 100644
index 0000000..6a3c974
--- /dev/null
+++ b/packaging/centos7/tomcat7/server.xml
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- Note:  A "Server" is not itself a "Container", so you may not
+     define subcomponents such as "Valves" at this level.
+     Documentation at /docs/config/server.html
+ -->
+<Server port="8005" shutdown="SHUTDOWN">
+  <!-- Security listener. Documentation at /docs/config/listeners.html
+  <Listener className="org.apache.catalina.security.SecurityListener" />
+  -->
+  <!--APR library loader. Documentation at /docs/apr.html -->
+  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+  <Listener className="org.apache.catalina.core.JasperListener" />
+  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+  <!-- Global JNDI resources
+       Documentation at /docs/jndi-resources-howto.html
+  -->
+  <GlobalNamingResources>
+    <!-- Editable user database that can also be used by
+         UserDatabaseRealm to authenticate users
+    -->
+    <Resource name="UserDatabase" auth="Container"
+              type="org.apache.catalina.UserDatabase"
+              description="User database that can be updated and saved"
+              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+              pathname="conf/tomcat-users.xml" />
+  </GlobalNamingResources>
+
+  <Service name="CloudStackManagement">
+
+    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+        maxThreads="150" minSpareThreads="25"/>
+
+    <Connector executor="tomcatThreadPool"
+               port="8080" protocol="HTTP/1.1"
+               connectionTimeout="20000"
+               acceptCount="150"
+               enableLookups="false"
+               maxThreads="150"
+               maxHttpHeaderSize="8192"
+               redirectPort="8443" />
+
+    <Engine name="Catalina" defaultHost="localhost">
+
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
+        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+               resourceName="UserDatabase"/>
+      </Realm>
+
+      <Host name="localhost"  appBase="webapps"
+            unpackWARs="true" autoDeploy="true">
+
+        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+               prefix="localhost_access_log." suffix=".txt"
+               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+
+      </Host>
+    </Engine>
+  </Service>
+
+  <Service name="CloudStackAwsApi">
+
+    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+        maxThreads="150" minSpareThreads="25"/>
+
+    <Connector executor="tomcatThreadPool"
+               port="7080" protocol="HTTP/1.1"
+               connectionTimeout="20000"
+               acceptCount="150"
+               enableLookups="false"
+               maxThreads="150"
+               maxHttpHeaderSize="8192"
+               redirectPort="8443" />
+
+    <Engine name="Catalina7080" defaultHost="localhost">
+
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
+        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+               resourceName="UserDatabase"/>
+      </Realm>
+
+      <Host name="localhost" appBase="webapps7080"
+            unpackWARs="true" autoDeploy="true">
+
+        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+               prefix="localhost_7080_access_log." suffix=".txt"
+               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+
+      </Host>
+    </Engine>
+  </Service>
+</Server>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/tomcat-users.xml
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/tomcat-users.xml b/packaging/centos7/tomcat7/tomcat-users.xml
new file mode 100644
index 0000000..81422a0
--- /dev/null
+++ b/packaging/centos7/tomcat7/tomcat-users.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<tomcat-users>
+<!--
+  <role rolename="tomcat"/>
+  <role rolename="role1"/>
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+  <user username="both" password="tomcat" roles="tomcat,role1"/>
+  <user username="role1" password="tomcat" roles="role1"/>
+-->
+
+<!-- The host manager webapp is restricted to users with role "admin" -->
+<!--<user name="tomcat" password="password" roles="admin" />-->
+<!-- The manager webapp is restricted to users with role "manager" -->
+<!--<user name="tomcat" password="password" roles="manager" />-->
+</tomcat-users>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/web.xml
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/web.xml b/packaging/centos7/tomcat7/web.xml
new file mode 100644
index 0000000..44b6eab
--- /dev/null
+++ b/packaging/centos7/tomcat7/web.xml
@@ -0,0 +1,1188 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+    version="2.5">
+
+  <!-- ======================== Introduction ============================== -->
+  <!-- This document defines default values for *all* web applications      -->
+  <!-- loaded into this instance of Tomcat.  As each application is         -->
+  <!-- deployed, this file is processed, followed by the                    -->
+  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->
+  <!-- applications.                                                        -->
+  <!--                                                                      -->
+  <!-- WARNING:  Do not configure application-specific resources here!      -->
+  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
+
+
+  <!-- ================== Built In Servlet Definitions ==================== -->
+
+
+  <!-- The default servlet for all web applications, that serves static     -->
+  <!-- resources.  It processes all requests that are not mapped to other   -->
+  <!-- servlets with servlet mappings (defined either here or in your own   -->
+  <!-- web.xml file.  This servlet supports the following initialization    -->
+  <!-- parameters (default values are in square brackets):                  -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   fileEncoding        Encoding to be used to read static resources   -->
+  <!--                       [platform default]                             -->
+  <!--                                                                      -->
+  <!--   input               Input buffer size (in bytes) when reading      -->
+  <!--                       resources to be served.  [2048]                -->
+  <!--                                                                      -->
+  <!--   listings            Should directory listings be produced if there -->
+  <!--                       is no welcome file in this directory?  [false] -->
+  <!--                       WARNING: Listings for directories with many    -->
+  <!--                       entries can be slow and may consume            -->
+  <!--                       significant proportions of server resources.   -->
+  <!--                                                                      -->
+  <!--   output              Output buffer size (in bytes) when writing     -->
+  <!--                       resources to be served.  [2048]                -->
+  <!--                                                                      -->
+  <!--   readonly            Is this context "read only", so HTTP           -->
+  <!--                       commands like PUT and DELETE are               -->
+  <!--                       rejected?  [true]                              -->
+  <!--                                                                      -->
+  <!--   readmeFile          File name to display with the directory        -->
+  <!--                       contents. [null]                               -->
+  <!--                                                                      -->
+  <!--   sendfileSize        If the connector used supports sendfile, this  -->
+  <!--                       represents the minimal file size in KB for     -->
+  <!--                       which sendfile will be used. Use a negative    -->
+  <!--                       value to always disable sendfile.  [48]        -->
+  <!--                                                                      -->
+  <!--   useAcceptRanges     Should the Accept-Ranges header be included    -->
+  <!--                       in responses where appropriate? [true]         -->
+  <!--                                                                      -->
+  <!--  For directory listing customization. Checks localXsltFile, then     -->
+  <!--  globalXsltFile, then defaults to original behavior.                 -->
+  <!--                                                                      -->
+  <!--   localXsltFile       Make directory listings an XML doc and         -->
+  <!--                       pass the result to this style sheet residing   -->
+  <!--                       in that directory. This overrides              -->
+  <!--                        globalXsltFile[null]                          -->
+  <!--                                                                      -->
+  <!--   globalXsltFile      Site wide configuration version of             -->
+  <!--                       localXsltFile This argument is expected        -->
+  <!--                       to be a physical file. [null]                  -->
+  <!--                                                                      -->
+  <!--                                                                      -->
+
+    <servlet>
+        <servlet-name>default</servlet-name>
+        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>0</param-value>
+        </init-param>
+        <init-param>
+            <param-name>listings</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+
+  <!-- This servlet has been deprecated due to security concerns. Servlets  -->
+  <!-- should be explicitly mapped in web.xml                               -->
+  <!--                                                                      -->
+  <!-- The "invoker" servlet, which executes anonymous servlet classes      -->
+  <!-- that have not been defined in a web.xml file.  Traditionally, this   -->
+  <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map   -->
+  <!-- it to other patterns as well.  The extra path info portion of such a -->
+  <!-- request must be the fully qualified class name of a Java class that  -->
+  <!-- implements Servlet (or extends HttpServlet), or the servlet name     -->
+  <!-- of an existing servlet definition.     This servlet supports the     -->
+  <!-- following initialization parameters (default values are in square    -->
+  <!-- brackets):                                                           -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+
+<!--
+    <servlet>
+        <servlet-name>invoker</servlet-name>
+        <servlet-class>
+          org.apache.catalina.servlets.InvokerServlet
+        </servlet-class>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>0</param-value>
+        </init-param>
+        <load-on-startup>2</load-on-startup>
+    </servlet>
+-->
+
+
+  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
+  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->
+  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->
+  <!-- following initialization parameters (default values are in square    -->
+  <!-- brackets):                                                           -->
+  <!--                                                                      -->
+  <!--   checkInterval       If development is false and checkInterval is   -->
+  <!--                       greater than zero, background compilations are -->
+  <!--                       enabled. checkInterval is the time in seconds  -->
+  <!--                       between checks to see if a JSP page (and its   -->
+  <!--                       dependent files) needs to  be recompiled. [0]  -->
+  <!--                                                                      -->
+  <!--   classdebuginfo      Should the class file be compiled with         -->
+  <!--                       debugging information?  [true]                 -->
+  <!--                                                                      -->
+  <!--   classpath           What class path should I use while compiling   -->
+  <!--                       generated servlets?  [Created dynamically      -->
+  <!--                       based on the current web application]          -->
+  <!--                                                                      -->
+  <!--   compiler            Which compiler Ant should use to compile JSP   -->
+  <!--                       pages.  See the jasper documentation for more  -->
+  <!--                       information.                                   -->
+  <!--                                                                      -->
+  <!--   compilerSourceVM    Compiler source VM. [1.5]                      -->
+  <!--                                                                      -->
+  <!--   compilerTargetVM    Compiler target VM. [1.5]                      -->  
+  <!--                                                                      -->
+  <!--   development         Is Jasper used in development mode? If true,   -->
+  <!--                       the frequency at which JSPs are checked for    -->
+  <!--                       modification may be specified via the          -->
+  <!--                       modificationTestInterval parameter. [true]     -->
+  <!--                                                                      -->
+  <!--   displaySourceFragment                                              -->
+  <!--                       Should a source fragment be included in        -->
+  <!--                       exception messages? [true]                     -->
+  <!--                                                                      -->
+  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
+  <!--                       dumped to a file? [false]                      -->
+  <!--                       False if suppressSmap is true                  -->
+  <!--                                                                      -->
+  <!--   enablePooling       Determines whether tag handler pooling is      -->
+  <!--                       enabled. This is a compilation option. It will -->
+  <!--                       not alter the behaviour of JSPs that have      -->
+  <!--                       already been compiled. [true]                  -->
+  <!--                                                                      -->
+  <!--   engineOptionsClass  Allows specifying the Options class used to    -->
+  <!--                       configure Jasper. If not present, the default  -->
+  <!--                       EmbeddedServletOptions will be used.           -->
+  <!--                                                                      -->
+  <!--   errorOnUseBeanInvalidClassAttribute                                -->
+  <!--                       Should Jasper issue an error when the value of -->
+  <!--                       the class attribute in an useBean action is    -->
+  <!--                       not a valid bean class?  [true]                -->
+  <!--                                                                      -->
+  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
+  <!--                       a separate JVM is used for JSP page compiles   -->
+  <!--                       from the one Tomcat is running in. [true]      -->
+  <!--                                                                      -->
+  <!--   genStrAsCharArray   Should text strings be generated as char       -->
+  <!--                       arrays, to improve performance in some cases?  -->
+  <!--                       [false]                                        -->
+  <!--                                                                      -->
+  <!--   ieClassId           The class-id value to be sent to Internet      -->
+  <!--                       Explorer when using <jsp:plugin> tags.         -->
+  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
+  <!--                                                                      -->
+  <!--   javaEncoding        Java file encoding to use for generating java  -->
+  <!--                       source files. [UTF8]                           -->
+  <!--                                                                      -->
+  <!--   keepgenerated       Should we keep the generated Java source code  -->
+  <!--                       for each page instead of deleting it? [true]   -->
+  <!--                                                                      -->
+  <!--   mappedfile          Should we generate static content with one     -->
+  <!--                       print statement per input line, to ease        -->
+  <!--                       debugging?  [true]                             -->
+  <!--                                                                      -->
+  <!--   modificationTestInterval                                           -->
+  <!--                       Causes a JSP (and its dependent files) to not  -->
+  <!--                       be checked for modification during the         -->
+  <!--                       specified time interval (in seconds) from the  -->
+  <!--                       last time the JSP was checked for              -->
+  <!--                       modification. A value of 0 will cause the JSP  -->
+  <!--                       to be checked on every access.                 -->
+  <!--                       Used in development mode only. [4]             -->
+  <!--                                                                      -->
+  <!--   scratchdir          What scratch directory should we use when      -->
+  <!--                       compiling JSP pages?  [default work directory  -->
+  <!--                       for the current web application]               -->
+  <!--                                                                      -->
+  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
+  <!--                       debugging be suppressed?  [false]              -->
+  <!--                                                                      -->
+  <!--   trimSpaces          Should white spaces in template text between   -->
+  <!--                       actions or directives be trimmed?  [false]     -->
+  <!--                                                                      -->
+  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
+  <!--                       header is added by generated servlet  [false]  -->
+  <!--                                                                      -->
+  <!-- If you wish to use Jikes to compile JSP pages:                       -->
+  <!--   Please see the "Using Jikes" section of the Jasper-HowTo           -->
+  <!--   page in the Tomcat documentation.                                  -->
+
+    <servlet>
+        <servlet-name>jsp</servlet-name>
+        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+        <init-param>
+            <param-name>fork</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <init-param>
+            <param-name>xpoweredBy</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <load-on-startup>3</load-on-startup>
+    </servlet>
+
+
+  <!-- NOTE: An SSI Filter is also available as an alternative SSI          -->
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
+  <!--                                                                      -->
+  <!-- Server Side Includes processing servlet, which processes SSI         -->
+  <!-- directives in HTML pages consistent with similar support in web      -->
+  <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->
+  <!-- URL pattern "*.shtml".  This servlet supports the following          -->
+  <!-- initialization parameters (default values are in square brackets):   -->
+  <!--                                                                      -->
+  <!--   buffered            Should output from this servlet be buffered?   -->
+  <!--                       (0=false, 1=true)  [0]                         -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   expires             The number of seconds before a page with SSI   -->
+  <!--                       directives will expire.  [No default]          -->
+  <!--                                                                      -->
+  <!--   isVirtualWebappRelative                                            -->
+  <!--                       Should "virtual" paths be interpreted as       -->
+  <!--                       relative to the context root, instead of       -->
+  <!--                       the server root?  (0=false, 1=true) [0]        -->
+  <!--                                                                      -->
+  <!--   inputEncoding       The encoding to assume for SSI resources if    -->
+  <!--                       one is not available from the resource.        -->
+  <!--                       [Platform default]                             -->
+  <!--                                                                      -->
+  <!--   outputEncoding      The encoding to use for the page that results  -->
+  <!--                       from the SSI processing. [UTF-8]               -->
+
+<!--
+    <servlet>
+        <servlet-name>ssi</servlet-name>
+        <servlet-class>
+          org.apache.catalina.ssi.SSIServlet
+        </servlet-class>
+        <init-param>
+          <param-name>buffered</param-name>
+          <param-value>1</param-value>
+        </init-param>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>expires</param-name>
+          <param-value>666</param-value>
+        </init-param>
+        <init-param>
+          <param-name>isVirtualWebappRelative</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <load-on-startup>4</load-on-startup>
+    </servlet>
+-->
+
+
+  <!-- Common Gateway Includes (CGI) processing servlet, which supports     -->
+  <!-- execution of external applications that conform to the CGI spec      -->
+  <!-- requirements.  Typically, this servlet is mapped to the URL pattern  -->
+  <!-- "/cgi-bin/*", which means that any CGI applications that are         -->
+  <!-- executed must be present within the web application.  This servlet   -->
+  <!-- supports the following initialization parameters (default values     -->
+  <!-- are in square brackets):                                             -->
+  <!--                                                                      -->
+  <!--   cgiPathPrefix        The CGI search path will start at             -->
+  <!--                        webAppRootDir + File.separator + this prefix. -->
+  <!--                        [WEB-INF/cgi]                                 -->
+  <!--                                                                      -->
+  <!--   debug                Debugging detail level for messages logged    -->
+  <!--                        by this servlet.  [0]                         -->
+  <!--                                                                      -->
+  <!--   executable           Name of the executable used to run the        -->
+  <!--                        script. [perl]                                -->
+  <!--                                                                      -->
+  <!--   parameterEncoding    Name of parameter encoding to be used with    -->
+  <!--                        CGI servlet.                                  -->
+  <!--                        [System.getProperty("file.encoding","UTF-8")] -->
+  <!--                                                                      -->
+  <!--   passShellEnvironment Should the shell environment variables (if    -->
+  <!--                        any) be passed to the CGI script? [false]     -->
+  <!--                                                                      -->
+  <!--   stderrTimeout        The time (in milliseconds) to wait for the    -->
+  <!--                        reading of stderr to complete before          -->
+  <!--                        terminating the CGI process. [2000]           -->
+
+<!--
+    <servlet>
+        <servlet-name>cgi</servlet-name>
+        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>cgiPathPrefix</param-name>
+          <param-value>WEB-INF/cgi</param-value>
+        </init-param>
+         <load-on-startup>5</load-on-startup>
+    </servlet>
+-->
+
+
+  <!-- ================ Built In Servlet Mappings ========================= -->
+
+
+  <!-- The servlet mappings for the built in servlets defined above.  Note  -->
+  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You    -->
+  <!-- must uncomment these mappings (or add them to your application's own -->
+  <!-- web.xml deployment descriptor) to enable these services              -->
+
+    <!-- The mapping for the default servlet -->
+    <servlet-mapping>
+        <servlet-name>default</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+    <!-- The mapping for the deprecated invoker servlet -->
+<!--
+    <servlet-mapping>
+        <servlet-name>invoker</servlet-name>
+        <url-pattern>/servlet/*</url-pattern>
+    </servlet-mapping>
+-->
+
+    <!-- The mapping for the JSP servlet -->
+    <servlet-mapping>
+        <servlet-name>jsp</servlet-name>
+        <url-pattern>*.jsp</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>jsp</servlet-name>
+        <url-pattern>*.jspx</url-pattern>
+    </servlet-mapping>
+
+    <!-- The mapping for the SSI servlet -->
+<!--
+    <servlet-mapping>
+        <servlet-name>ssi</servlet-name>
+        <url-pattern>*.shtml</url-pattern>
+    </servlet-mapping>
+-->
+
+    <!-- The mapping for the CGI Gateway servlet -->
+
+<!--
+    <servlet-mapping>
+        <servlet-name>cgi</servlet-name>
+        <url-pattern>/cgi-bin/*</url-pattern>
+    </servlet-mapping>
+-->
+
+
+  <!-- ================== Built In Filter Definitions ===================== -->
+
+  <!-- NOTE: An SSI Servlet is also available as an alternative SSI         -->
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
+  <!--                                                                      -->
+  <!-- Server Side Includes processing filter, which processes SSI          -->
+  <!-- directives in HTML pages consistent with similar support in web      -->
+  <!-- servers like Apache.  Traditionally, this filter is mapped to the    -->
+  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will     -->
+  <!-- selectively enable/disable SSI processing based on mime types. For   -->
+  <!-- this to work you will need to uncomment the .shtml mime type         -->
+  <!-- definition towards the bottom of this file.                          -->
+  <!-- The contentType init param allows you to apply SSI processing to JSP -->
+  <!-- pages, javascript, or any other content you wish.  This filter       -->
+  <!-- supports the following initialization parameters (default values are -->
+  <!-- in square brackets):                                                 -->
+  <!--                                                                      -->
+  <!--   contentType         A regex pattern that must be matched before    -->
+  <!--                       SSI processing is applied.                     -->
+  <!--                       [text/x-server-parsed-html(;.*)?]              -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   expires             The number of seconds before a page with SSI   -->
+  <!--                       directives will expire.  [No default]          -->
+  <!--                                                                      -->
+  <!--   isVirtualWebappRelative                                            -->
+  <!--                       Should "virtual" paths be interpreted as       -->
+  <!--                       relative to the context root, instead of       -->
+  <!--                       the server root?  (0=false, 1=true) [0]        -->
+
+<!--
+    <filter>
+        <filter-name>ssi</filter-name>
+        <filter-class>
+          org.apache.catalina.ssi.SSIFilter
+        </filter-class>
+        <init-param>
+          <param-name>contentType</param-name>
+          <param-value>text/x-server-parsed-html(;.*)?</param-value>
+        </init-param>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>expires</param-name>
+          <param-value>666</param-value>
+        </init-param>
+        <init-param>
+          <param-name>isVirtualWebappRelative</param-name>
+          <param-value>0</param-value>
+        </init-param>
+    </filter>
+-->
+
+
+  <!-- ==================== Built In Filter Mappings ====================== -->
+
+  <!-- The mapping for the SSI Filter -->
+<!--
+    <filter-mapping>
+        <filter-name>ssi</filter-name>
+        <url-pattern>*.shtml</url-pattern>
+    </filter-mapping>
+-->
+
+
+  <!-- ==================== Default Session Configuration ================= -->
+  <!-- You can set the default session timeout (in minutes) for all newly   -->
+  <!-- created sessions by modifying the value below.                       -->
+
+    <session-config>
+        <session-timeout>30</session-timeout>
+    </session-config>
+
+
+  <!-- ===================== Default MIME Type Mappings =================== -->
+  <!-- When serving static resources, Tomcat will automatically generate    -->
+  <!-- a "Content-Type" header based on the resource's filename extension,  -->
+  <!-- based on these mappings.  Additional mappings can be added here (to  -->
+  <!-- apply to all web applications), or in your own application's web.xml -->
+  <!-- deployment descriptor.                                               -->
+
+    <mime-mapping>
+        <extension>abs</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ai</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aif</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aifc</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aiff</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aim</extension>
+        <mime-type>application/x-aim</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>art</extension>
+        <mime-type>image/x-jg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asf</extension>
+        <mime-type>video/x-ms-asf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asx</extension>
+        <mime-type>video/x-ms-asf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>au</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>avi</extension>
+        <mime-type>video/x-msvideo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>avx</extension>
+        <mime-type>video/x-rad-screenplay</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bcpio</extension>
+        <mime-type>application/x-bcpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bin</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bmp</extension>
+        <mime-type>image/bmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>body</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdf</extension>
+        <mime-type>application/x-cdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cer</extension>
+        <mime-type>application/x-x509-ca-cert</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>class</extension>
+        <mime-type>application/java</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cpio</extension>
+        <mime-type>application/x-cpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>csh</extension>
+        <mime-type>application/x-csh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>css</extension>
+        <mime-type>text/css</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dib</extension>
+        <mime-type>image/bmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>doc</extension>
+        <mime-type>application/msword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dtd</extension>
+        <mime-type>application/xml-dtd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dv</extension>
+        <mime-type>video/x-dv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dvi</extension>
+        <mime-type>application/x-dvi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>eps</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>etx</extension>
+        <mime-type>text/x-setext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>exe</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gif</extension>
+        <mime-type>image/gif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gtar</extension>
+        <mime-type>application/x-gtar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gz</extension>
+        <mime-type>application/x-gzip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hdf</extension>
+        <mime-type>application/x-hdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hqx</extension>
+        <mime-type>application/mac-binhex40</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>htc</extension>
+        <mime-type>text/x-component</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>htm</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>html</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hqx</extension>
+        <mime-type>application/mac-binhex40</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ief</extension>
+        <mime-type>image/ief</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jad</extension>
+        <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jar</extension>
+        <mime-type>application/java-archive</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>java</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jnlp</extension>
+        <mime-type>application/x-java-jnlp-file</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpe</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpeg</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpg</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>js</extension>
+        <mime-type>text/javascript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jsf</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jspf</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kar</extension>
+        <mime-type>audio/x-midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>latex</extension>
+        <mime-type>application/x-latex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m3u</extension>
+        <mime-type>audio/x-mpegurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mac</extension>
+        <mime-type>image/x-macpaint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>man</extension>
+        <mime-type>application/x-troff-man</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mathml</extension>
+        <mime-type>application/mathml+xml</mime-type> 
+    </mime-mapping>
+    <mime-mapping>
+        <extension>me</extension>
+        <mime-type>application/x-troff-me</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mid</extension>
+        <mime-type>audio/x-midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>midi</extension>
+        <mime-type>audio/x-midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mif</extension>
+        <mime-type>application/x-mif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mov</extension>
+        <mime-type>video/quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>movie</extension>
+        <mime-type>video/x-sgi-movie</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp1</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp2</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp3</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp4</extension>
+        <mime-type>video/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpa</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpe</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpeg</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpega</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpg</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpv2</extension>
+        <mime-type>video/mpeg2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ms</extension>
+        <mime-type>application/x-wais-source</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nc</extension>
+        <mime-type>application/x-netcdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oda</extension>
+        <mime-type>application/oda</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Database -->
+        <extension>odb</extension>
+        <mime-type>application/vnd.oasis.opendocument.database</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Chart -->
+        <extension>odc</extension>
+        <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Formula -->
+        <extension>odf</extension>
+        <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Drawing -->
+        <extension>odg</extension>
+        <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Image -->
+        <extension>odi</extension>
+        <mime-type>application/vnd.oasis.opendocument.image</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Master Document -->
+        <extension>odm</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Presentation -->
+        <extension>odp</extension>
+        <mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Spreadsheet -->
+        <extension>ods</extension>
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Text -->
+        <extension>odt</extension>
+        <mime-type>application/vnd.oasis.opendocument.text</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ogg</extension>
+        <mime-type>application/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Drawing Template -->
+        <extension>otg </extension>
+        <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- HTML Document Template -->
+        <extension>oth</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Presentation Template -->
+        <extension>otp</extension>
+        <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Spreadsheet Template -->
+        <extension>ots</extension>
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet-template </mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Text Template -->
+        <extension>ott</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pbm</extension>
+        <mime-type>image/x-portable-bitmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pct</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pdf</extension>
+        <mime-type>application/pdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pgm</extension>
+        <mime-type>image/x-portable-graymap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pic</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pict</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pls</extension>
+        <mime-type>audio/x-scpls</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>png</extension>
+        <mime-type>image/png</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pnm</extension>
+        <mime-type>image/x-portable-anymap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pnt</extension>
+        <mime-type>image/x-macpaint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppm</extension>
+        <mime-type>image/x-portable-pixmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppt</extension>
+        <mime-type>application/vnd.ms-powerpoint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pps</extension>
+        <mime-type>application/vnd.ms-powerpoint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ps</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>psd</extension>
+        <mime-type>image/x-photoshop</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qt</extension>
+        <mime-type>video/quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qti</extension>
+        <mime-type>image/x-quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qtif</extension>
+        <mime-type>image/x-quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ras</extension>
+        <mime-type>image/x-cmu-raster</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rdf</extension>
+        <mime-type>application/rdf+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rgb</extension>
+        <mime-type>image/x-rgb</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rm</extension>
+        <mime-type>application/vnd.rn-realmedia</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>roff</extension>
+        <mime-type>application/x-troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rtf</extension>
+        <mime-type>application/rtf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rtx</extension>
+        <mime-type>text/richtext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sh</extension>
+        <mime-type>application/x-sh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>shar</extension>
+        <mime-type>application/x-shar</mime-type>
+    </mime-mapping>
+<!--
+    <mime-mapping>
+        <extension>shtml</extension>
+        <mime-type>text/x-server-parsed-html</mime-type>
+    </mime-mapping>
+-->
+    <mime-mapping>
+        <extension>smf</extension>
+        <mime-type>audio/x-midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sit</extension>
+        <mime-type>application/x-stuffit</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>snd</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>src</extension>
+        <mime-type>application/x-wais-source</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sv4cpio</extension>
+        <mime-type>application/x-sv4cpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sv4crc</extension>
+        <mime-type>application/x-sv4crc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svg</extension>
+        <mime-type>image/svg+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svgz</extension>
+        <mime-type>image/svg+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>swf</extension>
+        <mime-type>application/x-shockwave-flash</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>t</extension>
+        <mime-type>application/x-troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tar</extension>
+        <mime-type>application/x-tar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tcl</extension>
+        <mime-type>application/x-tcl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tex</extension>
+        <mime-type>application/x-tex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>texi</extension>
+        <mime-type>application/x-texinfo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>texinfo</extension>
+        <mime-type>application/x-texinfo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tif</extension>
+        <mime-type>image/tiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tiff</extension>
+        <mime-type>image/tiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tr</extension>
+        <mime-type>application/x-troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tsv</extension>
+        <mime-type>text/tab-separated-values</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>txt</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ulw</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ustar</extension>
+        <mime-type>application/x-ustar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vxml</extension>
+        <mime-type>application/voicexml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xbm</extension>
+        <mime-type>image/x-xbitmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xht</extension>
+        <mime-type>application/xhtml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xhtml</extension>
+        <mime-type>application/xhtml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xls</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xml</extension>
+        <mime-type>application/xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpm</extension>
+        <mime-type>image/x-xpixmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xsl</extension>
+        <mime-type>application/xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xslt</extension>
+        <mime-type>application/xslt+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xul</extension>
+        <mime-type>application/vnd.mozilla.xul+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xwd</extension>
+        <mime-type>image/x-xwindowdump</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vsd</extension>
+        <mime-type>application/x-visio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wav</extension>
+        <mime-type>audio/x-wav</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Wireless Bitmap -->
+        <extension>wbmp</extension>
+        <mime-type>image/vnd.wap.wbmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- WML Source -->
+        <extension>wml</extension>
+        <mime-type>text/vnd.wap.wml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Compiled WML -->
+        <extension>wmlc</extension>
+        <mime-type>application/vnd.wap.wmlc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- WML Script Source -->
+        <extension>wmls</extension>
+        <mime-type>text/vnd.wap.wmlscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Compiled WML Script -->
+        <extension>wmlscriptc</extension>
+        <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmv</extension>
+        <mime-type>video/x-ms-wmv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wrl</extension>
+        <mime-type>x-world/x-vrml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wspolicy</extension>
+        <mime-type>application/wspolicy+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>Z</extension>
+        <mime-type>application/x-compress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>z</extension>
+        <mime-type>application/x-compress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zip</extension>
+        <mime-type>application/zip</mime-type>
+    </mime-mapping>
+
+  <!-- ==================== Default Welcome File List ===================== -->
+  <!-- When a request URI refers to a directory, the default servlet looks  -->
+  <!-- for a "welcome file" within that directory and, if present,          -->
+  <!-- to the corresponding resource URI for display.  If no welcome file   -->
+  <!-- is present, the default servlet either serves a directory listing,   -->
+  <!-- or returns a 404 status, depending on how it is configured.          -->
+  <!--                                                                      -->
+  <!-- If you define welcome files in your own application's web.xml        -->
+  <!-- deployment descriptor, that list *replaces* the list configured      -->
+  <!-- here, so be sure that you include any of the default values that     -->
+  <!-- you wish to include.                                                 -->
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/package.sh
----------------------------------------------------------------------
diff --git a/packaging/package.sh b/packaging/package.sh
new file mode 100755
index 0000000..96b4afa
--- /dev/null
+++ b/packaging/package.sh
@@ -0,0 +1,156 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+function usage() {
+    echo ""
+    echo "usage: ./package.sh [-p|--pack] [-h|--help] [-o|--operating-system] [ARGS]"
+    echo ""
+    echo "The commonly used Arguments are:"
+    echo "-p|--pack oss|OSS             To package with only redistributable libraries (default)"
+    echo "-p|--pack noredist|NOREDIST   To package with non-redistributable libraries"
+    echo "-d centos7|centos63           To build a package for a distribution"
+    echo "-s simulator|SIMULATOR        To build for Simulator"
+    echo ""
+    echo "Examples: ./package.sh -p|--pack oss|OSS"
+    echo "          ./package.sh -p|--pack noredist|NOREDIST"
+    echo "          ./package.sh (Default OSS)"
+    exit 1
+}
+
+# packaging
+#   $1 redist flag
+#   $2 simulator flag
+#   $3 distribution name
+function packaging() {
+    CWD=`pwd`
+    RPMDIR=$CWD/../dist/rpmbuild
+    PACK_PROJECT=cloudstack
+    if [ -n "$1" ] ; then
+        DEFOSSNOSS="-D_ossnoss $1"
+    fi
+    if [ -n "$2" ] ; then
+        DEFSIM="-D_sim $2"
+    fi
+
+    DISTRO=$3
+
+    VERSION=`(cd ../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep --color=none '^[0-9]\.'`
+    if echo $VERSION | grep -q SNAPSHOT ; then
+        REALVER=`echo $VERSION | cut -d '-' -f 1`
+        DEFVER="-D_ver $REALVER"
+        DEFPRE="-D_prerelease 1"
+        DEFREL="-D_rel SNAPSHOT"
+    else
+        REALVER=`echo $VERSION`
+        DEFVER="-D_ver $REALVER"
+        DEFREL="-D_rel 1"
+    fi
+
+    echo Preparing to package Apache CloudStack ${VERSION}
+
+    mkdir -p $RPMDIR/SPECS
+    mkdir -p $RPMDIR/BUILD
+    mkdir -p $RPMDIR/RPMS
+    mkdir -p $RPMDIR/SRPMS
+    mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+
+    echo ". preparing source tarball"
+    (cd ../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
+    (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+
+    echo ". executing rpmbuild"
+    cp $DISTRO/cloud.spec $RPMDIR/SPECS
+
+    (cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "${DEFVER}" "${DEFREL}" ${DEFPRE+"${DEFPRE}"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} -bb SPECS/cloud.spec)
+
+    if [ $? -ne 0 ]; then
+        echo "RPM Build Failed "
+        exit 1
+    else
+        echo "RPM Build Done"
+    fi
+    exit
+
+}
+
+
+TARGETDISTRO=""
+sim=""
+packageval=""
+
+    SHORTOPTS="hp:d:"
+    LONGOPTS="help,pack:,simulator:distribution"
+    ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 -- "$@")
+    eval set -- "$ARGS"
+    echo "$ARGS"
+    while [ $# -gt 0 ] ; do
+        case "$1" in
+            -h | --help)
+            usage
+            exit 0
+            ;;
+        -p | --pack)
+            echo "Doing CloudStack Packaging ....."
+            packageval=$2
+            echo "$packageval"
+            if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
+                packageval = ""
+            elif [ "$packageval" == "noredist" -o "$packageval" == "NOREDIST" ] ; then
+                packageval="noredist"
+            else
+                echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details."
+                exit 1
+            fi
+            shift
+            ;;
+        -s | --simulator)
+            sim=$2
+            echo "$sim"
+            if [ "$sim" == "default" -o "$sim" == "DEFAULT" ] ; then
+                sim = "false"
+            elif [ "$sim" == "simulator" -o "$sim" == "SIMULATOR" ] ; then
+                sim="simulator"
+            else
+                echo "Error: Incorrect value provided in package.sh script for -o, Please see help ./package.sh --help|-h for more details."
+		exit 1
+            fi
+            shift
+            ;;
+        -d | --distribution)
+            TARGETDISTRO=$2
+            shift
+            ;;
+        -)
+            echo "Unrecognized option..."
+            usage
+            exit 1
+            ;;
+        *)
+            shift
+            ;;
+        esac
+    done
+
+    if [ -z "$TARGETDISTRO" ]
+    then
+        echo "Missing target distribution"
+        usage
+        exit 1
+    fi
+
+    packaging "$packageval" "$sim" "$TARGETDISTRO"


[05/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Add improved support for packaging CloudStack for CentOS 7


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/870ede5a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/870ede5a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/870ede5a

Branch: refs/heads/useraccount-refactoring
Commit: 870ede5a04e5b832a13e6750e942215c81c4ee6c
Parents: 4e89693
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Nov 20 16:50:50 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Mon Nov 24 18:14:26 2014 +0100

----------------------------------------------------------------------
 packaging/centos63/cloud.spec                   |   42 +-
 packaging/centos63/default/macros.spec          |   27 -
 packaging/centos63/default/tomcat.sh            |   18 -
 packaging/centos63/package.sh                   |  168 ---
 .../centos63/rhel7/cloud-management.service     |   32 -
 packaging/centos63/rhel7/macros.spec            |   27 -
 packaging/centos63/rhel7/tomcat.sh              |   18 -
 packaging/centos63/tomcat.sh                    |   18 +
 packaging/centos7/cloud-agent.rc                |  117 ++
 packaging/centos7/cloud-ipallocator.rc          |   96 ++
 packaging/centos7/cloud-management.service      |   37 +
 packaging/centos7/cloud-management.sudoers      |   22 +
 packaging/centos7/cloud-management.sysconfig    |   48 +
 packaging/centos7/cloud-usage.rc                |  156 +++
 packaging/centos7/cloud.limits                  |    2 +
 packaging/centos7/cloud.spec                    |  605 +++++++++
 packaging/centos7/cloudstack-agent.te           |   33 +
 packaging/centos7/cloudstack-sccs               |   20 +
 packaging/centos7/replace.properties            |   60 +
 packaging/centos7/tomcat7/catalina.properties   |   81 ++
 .../centos7/tomcat7/cloud-bridge.properties     |   25 +
 .../centos7/tomcat7/commons-logging.properties  |   30 +
 packaging/centos7/tomcat7/db.properties         |  107 ++
 .../centos7/tomcat7/ec2-service.properties      |   25 +
 .../centos7/tomcat7/environment.properties      |   22 +
 packaging/centos7/tomcat7/log4j-cloud.xml       |  217 ++++
 packaging/centos7/tomcat7/server.xml            |  112 ++
 packaging/centos7/tomcat7/tomcat-users.xml      |   31 +
 packaging/centos7/tomcat7/web.xml               | 1188 ++++++++++++++++++
 packaging/package.sh                            |  156 +++
 30 files changed, 3223 insertions(+), 317 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 072a0b9..7d8ebcf 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -43,10 +43,8 @@ Group:     System Environment/Libraries
 Source0:   %{name}-%{_maventag}.tgz
 BuildRoot: %{_tmppath}/%{name}-%{_maventag}-%{release}-build
 
-%include SPECS/%{_os}/macros.spec
-
 BuildRequires: java-1.7.0-openjdk-devel
-BuildRequires: %{_tomcatversion}
+BuildRequires: tomcat6
 BuildRequires: ws-commons-util
 BuildRequires: jpackage-utils
 BuildRequires: gcc
@@ -61,8 +59,8 @@ intelligent IaaS cloud implementation.
 
 %package management
 Summary:   CloudStack management server UI
-Requires: %{_tomcatversion}
-Requires: %{_javaversion}
+Requires: tomcat6
+Requires: java7
 Requires: python
 Requires: bash
 Requires: bzip2
@@ -82,11 +80,10 @@ Requires: /sbin/chkconfig
 Requires: /usr/bin/ssh-keygen
 Requires: mkisofs
 Requires: MySQL-python
-%{_pythonparamiko}
+Requires: python-paramiko
 Requires: ipmitool
 Requires: %{name}-common = %{_ver}
 Requires: %{name}-awsapi = %{_ver}
-%{_iptablesservice}
 Obsoletes: cloud-client < 4.1.0
 Obsoletes: cloud-client-ui < 4.1.0
 Obsoletes: cloud-server < 4.1.0
@@ -116,14 +113,14 @@ The Apache CloudStack files shared between agent and management server
 %package agent
 Summary: CloudStack Agent for KVM hypervisors
 Requires: openssh-clients
-Requires: %{_javaversion}
+Requires: java7
 Requires: %{name}-common = %{_ver}
 Requires: libvirt
 Requires: bridge-utils
 Requires: ebtables
 Requires: iptables
 Requires: ethtool
-Requires: %{_vlanconfigtool}
+Requires: vconfig
 Requires: ipset
 Requires: jsvc
 Requires: jakarta-commons-daemon
@@ -154,7 +151,7 @@ The CloudStack baremetal agent
 
 %package usage
 Summary: CloudStack Usage calculation server
-Requires: %{_javaversion}
+Requires: java7
 Requires: jsvc
 Requires: jakarta-commons-daemon
 Requires: jakarta-commons-daemon-jsvc
@@ -185,7 +182,7 @@ Apache Cloudstack AWS API compatibility wrapper
 %package mysql-ha
 Summary: Apache CloudStack Balancing Strategy for MySQL
 Requires: mysql-connector-java
-Requires: %{_tomcatversion}
+Requires: tomcat6
 Group: System Environmnet/Libraries
 %description mysql-ha
 Apache CloudStack Balancing Strategy for MySQL
@@ -266,9 +263,9 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management
 
 # Specific for tomcat
 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client
-ln -sf /usr/share/%{_tomcatpathname}/bin ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/bin
+ln -sf /usr/share/tomcat6/bin ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/bin
 ln -sf /etc/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/conf
-ln -sf /usr/share/%{_tomcatpathname}/lib ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
+ln -sf /usr/share/tomcat6/lib ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
 ln -sf /var/log/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/logs
 ln -sf /var/cache/%{name}/management/temp ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/temp
 ln -sf /var/cache/%{name}/management/work ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/work
@@ -292,19 +289,12 @@ cp -r client/target/cloud-client-ui-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms
 
-for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf %{_serverxmlname}-ssl.xml %{_serverxmlname}-nonssl.xml \
+for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \
             catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties ; do
   mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \
     ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
 done
 
-if [ -f "${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server7-nonssl.xml" ]; then
-    mv ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server7-nonssl.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server-nonssl.xml
-fi
-if [ -f "${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server7-ssl.xml" ]; then
-    mv ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server7-ssl.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/server-ssl.xml
-fi
-
 ln -s %{_sysconfdir}/%{name}/management/log4j-cloud.xml \
     ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/log4j-cloud.xml
 
@@ -315,10 +305,9 @@ install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/
 install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
 
 install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator
-install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_managementstartscriptpath}/%{name}-management
+install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-management
 install -D packaging/centos63/cloud-management.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}-management
-install -D packaging/centos63/%{_os}/tomcat.sh ${RPM_BUILD_ROOT}%{_managementstartscriptpath}/tomcat.sh
-%{_managementservice}
+install -D packaging/centos63/tomcat.sh ${RPM_BUILD_ROOT}%{_initrddir}/tomcat.sh
 
 chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina
 chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost
@@ -610,9 +599,8 @@ fi
 %config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
 %config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
 %config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
-%attr(0755,root,root) %{_managementstartscriptpath}/%{name}-management
-%attr(0755,root,root) %{_managementstartscriptpath}/tomcat.sh
-%{_managementserviceattribute}
+%attr(0755,root,root) %{_initrddir}/%{name}-management
+%attr(0755,root,root) %{_initrddir}/tomcat.sh
 
 %attr(0755,root,root) %{_bindir}/%{name}-setup-management
 %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/default/macros.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/default/macros.spec b/packaging/centos63/default/macros.spec
deleted file mode 100644
index f3c937c..0000000
--- a/packaging/centos63/default/macros.spec
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-%define _pythonparamiko Requires: python-paramiko
-%define _javaversion java7
-%define _tomcatversion tomcat6
-%define _vlanconfigtool vconfig
-%define _tomcatpathname tomcat6
-%define _managementstartscriptpath %{_initrddir}
-%define _managementservice %{nil}
-%define _managementserviceattribute %{nil}
-%define _iptablesservice %{nil}
-%define _serverxmlname server
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/default/tomcat.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/default/tomcat.sh b/packaging/centos63/default/tomcat.sh
deleted file mode 100644
index 0908da4..0000000
--- a/packaging/centos63/default/tomcat.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-. /etc/rc.d/init.d/tomcat6 start

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
deleted file mode 100755
index 00c1947..0000000
--- a/packaging/centos63/package.sh
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-function usage() {
-    echo ""
-    echo "usage: ./package.sh [-p|--pack] [-h|--help] [-o|--operating-system] [ARGS]"
-    echo ""
-    echo "The commonly used Arguments are:"
-    echo "-p|--pack oss|OSS             To package with only redistributable libraries (default)"
-    echo "-p|--pack noredist|NOREDIST   To package with non-redistributable libraries"
-    echo "-o default|DEFAULT            To build in default Operating System mode"
-    echo "-o rhel7|RHEL7                To build for rhel7"
-    echo "-s simulator|SIMULATOR        To build for Simulator"
-    echo ""
-    echo "Examples: ./package.sh -p|--pack oss|OSS"
-    echo "          ./package.sh -p|--pack noredist|NOREDIST"
-    echo "          ./package.sh (Default OSS)"
-    exit 1
-}
-
-function packaging() {
-    CWD=`pwd`
-    RPMDIR=$CWD/../../dist/rpmbuild
-    PACK_PROJECT=cloudstack
-    if [ -n "$1" ] ;then
-        DOS="-D_os $1"
-        echo "$DOS"
-    fi
-    if [ -n "$2" ] ; then
-        DEFOSSNOSS="-D_ossnoss $2"
-        echo "$DEFOSSNOSS"
-    fi
-    if [ -n "$3" ] ; then
-        DEFSIM="-D_sim $3"
-        echo "$DEFSIM"
-    fi
-
-    VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep --color=none '^[0-9]\.'`
-    if echo $VERSION | grep -q SNAPSHOT ; then
-        REALVER=`echo $VERSION | cut -d '-' -f 1`
-        DEFVER="-D_ver $REALVER"
-        DEFPRE="-D_prerelease 1"
-        DEFREL="-D_rel SNAPSHOT"
-    else
-        REALVER=`echo $VERSION`
-        DEFVER="-D_ver $REALVER"
-        DEFREL="-D_rel 1"
-    fi
-
-    echo Preparing to package Apache CloudStack ${VERSION}
-
-    mkdir -p $RPMDIR/SPECS
-    mkdir -p $RPMDIR/BUILD
-    mkdir -p $RPMDIR/RPMS
-    mkdir -p $RPMDIR/SRPMS
-    mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-
-    echo ". preparing source tarball"
-    (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
-    (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
-
-    echo ". executing rpmbuild"
-    cp cloud.spec $RPMDIR/SPECS
-    cp -rf default $RPMDIR/SPECS
-    cp -rf rhel7 $RPMDIR/SPECS
-
-    (cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "${DEFVER}" "${DEFREL}" ${DEFPRE+"${DEFPRE}"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} "${DOS}" -bb SPECS/cloud.spec)
-
-    if [ $? -ne 0 ]; then
-        echo "RPM Build Failed "
-        exit 1
-    else
-        echo "RPM Build Done"
-    fi
-    exit
-
-}
-
-if [ $# -lt 1 ] ; then
-    packaging "default"
-elif [ $# -gt 0 ] ; then
-    SHORTOPTS="hp:o:"
-    LONGOPTS="help,pack:,operating-system:,simulator:"
-    ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 -- "$@")
-    eval set -- "$ARGS"
-    echo "$ARGS"
-    while [ $# -gt 0 ] ; do
-        case "$1" in
-            -h | --help)
-            usage
-            exit 0
-            ;;
-        -p | --pack)
-            echo "Doing CloudStack Packaging ....."
-            packageval=$2
-            echo "$packageval"
-            if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
-                packageval = ""
-            elif [ "$packageval" == "noredist" -o "$packageval" == "NOREDIST" ] ; then
-                packageval="noredist"
-            else
-                echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details."
-                exit 1
-            fi
-            shift
-            ;;
-        -o | --operating-system)
-            os=$2
-            echo "$os"
-            if [ "$os" == "default" -o "$os" == "DEFAULT" ] ; then
-                os = "default"
-            elif [ "$os" == "rhel7" -o "$os" == "RHEL7" ] ; then
-                os="rhel7"
-            else
-                echo "Error: Incorrect value provided in package.sh script for -o, Please see help ./package.sh --help|-h for more details."
-		exit 1
-            fi
-            shift
-            ;;
-        -s | --simulator)
-            sim=$2
-            echo "$sim"
-            if [ "$sim" == "default" -o "$sim" == "DEFAULT" ] ; then
-                sim = "false"
-            elif [ "$sim" == "simulator" -o "$sim" == "SIMULATOR" ] ; then
-                sim="simulator"
-            else
-                echo "Error: Incorrect value provided in package.sh script for -o, Please see help ./package.sh --help|-h for more details."
-		exit 1
-            fi
-            shift
-            ;;
-        -)
-            echo "Unrecognized option..."
-            usage
-            exit 1
-            ;;
-        *)
-            shift
-            ;;
-        esac
-    done
-
-    if [ -z "${os+xxx}" ]; then
-        echo "Setting os to default"
-        os="default"
-    fi
-    echo "Passed OS = $os, packageval = $packageval and Simulator build = $sim"
-    packaging $os $packageval $sim
-else
-    echo "Incorrect choice.  Nothing to do." >&2
-    echo "Please, execute ./package.sh --help for more help"
-fi

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/rhel7/cloud-management.service
----------------------------------------------------------------------
diff --git a/packaging/centos63/rhel7/cloud-management.service b/packaging/centos63/rhel7/cloud-management.service
deleted file mode 100644
index 5d69885..0000000
--- a/packaging/centos63/rhel7/cloud-management.service
+++ /dev/null
@@ -1,32 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[Unit]
-Description=Citrix Cloud Plaltform
-After=syslog.target network.target
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/cloudstack-management start
-ExecStop=/usr/sbin/cloudstack-management stop
-SuccessExitStatus=143
-User=cloud
-Group=cloud
-
-
-[Install]
-WantedBy=multi-user.target
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/rhel7/macros.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/rhel7/macros.spec b/packaging/centos63/rhel7/macros.spec
deleted file mode 100644
index 4b71092..0000000
--- a/packaging/centos63/rhel7/macros.spec
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-%define _pythonparamiko %{nil}
-%define _javaversion java => 1.7.0
-%define _tomcatversion tomcat => 7.0
-%define _vlanconfigtool iproute
-%define _tomcatpathname tomcat
-%define _managementstartscriptpath %{_sbindir}
-%define _managementservice install -D packaging/centos63/%{_os}/cloud-management.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-management.service
-%define _managementserviceattribute %attr(0755,root,root) %{_unitdir}/%{name}-management.service
-%define _iptablesservice Requires: iptables-services
-%define _serverxmlname server7
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/rhel7/tomcat.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/rhel7/tomcat.sh b/packaging/centos63/rhel7/tomcat.sh
deleted file mode 100644
index 03c6e7b..0000000
--- a/packaging/centos63/rhel7/tomcat.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-. /usr/sbin/tomcat start

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos63/tomcat.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/tomcat.sh b/packaging/centos63/tomcat.sh
new file mode 100644
index 0000000..0908da4
--- /dev/null
+++ b/packaging/centos63/tomcat.sh
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. /etc/rc.d/init.d/tomcat6 start

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-agent.rc b/packaging/centos7/cloud-agent.rc
new file mode 100755
index 0000000..1f371e9
--- /dev/null
+++ b/packaging/centos7/cloud-agent.rc
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# chkconfig: 35 99 10
+# description: Cloud Agent
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /etc/rc.d/init.d/functions
+
+# set environment variables
+
+SHORTNAME=$(basename $0 | sed -e 's/^[SK][0-9][0-9]//')
+PIDFILE=/var/run/"$SHORTNAME".pid
+LOCKFILE=/var/lock/subsys/"$SHORTNAME"
+LOGDIR=/var/log/cloudstack/agent
+LOGFILE=${LOGDIR}/agent.log
+PROGNAME="Cloud Agent"
+CLASS="com.cloud.agent.AgentShell"
+JSVC=`which jsvc 2>/dev/null`;
+
+# exit if we don't find jsvc
+if [ -z "$JSVC" ]; then
+    echo no jsvc found in path;
+    exit 1;
+fi
+
+unset OPTIONS
+[ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAME"
+
+# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
+JDK_DIRS="/usr/lib/jvm/jre /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun"
+
+for jdir in $JDK_DIRS; do
+    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+        JAVA_HOME="$jdir"
+    fi
+done
+export JAVA_HOME
+
+ACP=`ls /usr/share/cloudstack-agent/lib/*.jar | tr '\n' ':' | sed s'/.$//'`
+PCP=`ls /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'`
+
+# We need to append the JSVC daemon JAR to the classpath
+# AgentShell implements the JSVC daemon methods
+export CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts"
+
+start() {
+    echo -n $"Starting $PROGNAME: "
+    if hostname --fqdn >/dev/null 2>&1 ; then
+        $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+            -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
+        RETVAL=$?
+        echo
+    else
+        failure
+        echo
+        echo The host name does not resolve properly to an IP address.  Cannot start "$PROGNAME". > /dev/stderr
+        RETVAL=9
+    fi
+    [ $RETVAL = 0 ] && touch ${LOCKFILE}
+    return $RETVAL
+}
+
+stop() {
+    echo -n $"Stopping $PROGNAME: "
+    $JSVC -pidfile "$PIDFILE" -stop $CLASS
+    RETVAL=$?
+    echo
+    [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+}
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status -p ${PIDFILE} $SHORTNAME
+        RETVAL=$?
+        ;;
+    restart)
+        stop
+        sleep 3
+        start
+        ;;
+    condrestart)
+        if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then
+            stop
+            sleep 3
+            start
+        fi
+        ;;
+    *)
+    echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
+    RETVAL=3
+esac
+
+exit $RETVAL

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-ipallocator.rc
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-ipallocator.rc b/packaging/centos7/cloud-ipallocator.rc
new file mode 100755
index 0000000..d26287d
--- /dev/null
+++ b/packaging/centos7/cloud-ipallocator.rc
@@ -0,0 +1,96 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# chkconfig: 35 99 10
+# description: Cloud Agent
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /etc/rc.d/init.d/functions
+
+# set environment variables
+
+SHORTNAME=`basename $0`
+PIDFILE=/var/run/"$SHORTNAME".pid
+LOCKFILE=/var/lock/subsys/"$SHORTNAME"
+LOGFILE=/var/log/cloudstack/ipallocator/ipallocator.log
+PROGNAME="External IPAllocator"
+
+unset OPTIONS
+[ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAME"
+DAEMONIZE=/usr/bin/cloud-daemonize
+PROG=/usr/bin/cloud-external-ipallocator.py
+OPTIONS=8083
+
+start() {
+        echo -n $"Starting $PROGNAME: "
+	if hostname --fqdn >/dev/null 2>&1 ; then
+		daemon --check=$SHORTNAME --pidfile=${PIDFILE} "$DAEMONIZE" \
+			-n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS
+		RETVAL=$?
+		echo
+	else
+		failure
+		echo
+		echo The host name does not resolve properly to an IP address.  Cannot start "$PROGNAME". > /dev/stderr
+		RETVAL=9
+	fi
+	[ $RETVAL = 0 ] && touch ${LOCKFILE}
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROGNAME: "
+	killproc -p ${PIDFILE} $SHORTNAME # -d 10 $SHORTNAME
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status -p ${PIDFILE} $SHORTNAME
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	sleep 3
+	start
+	;;
+  condrestart)
+	if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then
+		stop
+		sleep 3
+		start
+	fi
+	;;
+  *)
+	echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
+	RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-management.service
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-management.service b/packaging/centos7/cloud-management.service
new file mode 100644
index 0000000..697ad11
--- /dev/null
+++ b/packaging/centos7/cloud-management.service
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Systemd unit file for CloudStack Management server
+# 
+# clone tomcat service, see /usr/lib/systemd/system/tomcat.service
+
+[Unit]
+Description=CloudStack Management Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/tomcat-sysd start
+ExecStop=/usr/sbin/tomcat-sysd stop
+SuccessExitStatus=143
+User=cloud
+Group=cloud
+EnvironmentFile=/etc/sysconfig/cloudstack-management
+
+[Install]
+WantedBy=multi-user.target
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-management.sudoers
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-management.sudoers b/packaging/centos7/cloud-management.sudoers
new file mode 100644
index 0000000..ad79cae
--- /dev/null
+++ b/packaging/centos7/cloud-management.sudoers
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+Cmnd_Alias CLOUDSTACK = /bin/mkdir, /bin/mount, /bin/umount, /bin/cp, /bin/chmod, /usr/bin/keytool, /bin/keytool
+
+Defaults:cloud !requiretty 
+
+cloud   ALL=(root) NOPASSWD:CLOUDSTACK

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-management.sysconfig
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-management.sysconfig b/packaging/centos7/cloud-management.sysconfig
new file mode 100644
index 0000000..961072a
--- /dev/null
+++ b/packaging/centos7/cloud-management.sysconfig
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Required for a tocmat cloned service
+SERVICE_NAME=cloudstack-management
+
+# Where your java installation lives
+#JAVA_HOME="/usr/lib/jvm/java"
+
+# Where your cloudstack-management installation lives
+CATALINA_BASE="/usr/share/cloudstack-management"
+CATALINA_HOME="/usr/share/cloudstack-management"
+JASPER_HOME="/usr/share/cloudstack-management"
+CATALINA_TMPDIR="/usr/share/cloudstack-management/temp"
+
+JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M -XX:MaxPermSize=800m"
+
+if [ -r "/etc/cloudstack/management/cloudmanagementserver.keystore" ] ; then
+  JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloudmanagementserver.keystore -Djavax.net.ssl.trustStorePassword=vmops.com "
+fi
+
+TOMCAT_USER="cloud"
+
+SECURITY_MANAGER="false"
+
+SHUTDOWN_WAIT="30"
+
+SHUTDOWN_VERBOSE="false"
+
+# Set the TOMCAT_PID location
+CATALINA_PID="/var/run/cloudstack-management.pid"
+
+CLASSPATH=/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/java/mysql-connector-java.jar
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud-usage.rc
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-usage.rc b/packaging/centos7/cloud-usage.rc
new file mode 100755
index 0000000..7741137
--- /dev/null
+++ b/packaging/centos7/cloud-usage.rc
@@ -0,0 +1,156 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides:          cloudstack-usage
+# Required-Start:    $network $local_fs
+# Required-Stop:     $network $local_fs
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Start/stop Apache CloudStack Usage Monitor
+# Description: This scripts Starts/Stops the Apache CloudStack Usage Monitor
+##  The CloudStack Usage Monitor is a part of the Apache CloudStack project and is used
+##  for storing usage statistics from instances.
+## JSVC (Java daemonizing) is used for starting and stopping the usage monitor.
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. /etc/rc.d/init.d/functions
+
+SHORTNAME="cloudstack-usage"
+PIDFILE=/var/run/"$SHORTNAME".pid
+LOCKFILE=/var/lock/subsys/"$SHORTNAME"
+LOGDIR=/var/log/cloudstack/usage
+LOGFILE=${LOGDIR}/usage.log
+PROGNAME="CloudStack Usage Monitor"
+CLASS="com.cloud.usage.UsageServer"
+PROG="jsvc"
+DAEMON="/usr/bin/jsvc"
+USER=cloud
+
+unset OPTIONS
+[ -r /etc/sysconfig/default/"$SHORTNAME" ] && source /etc/sysconfig/default/"$SHORTNAME"
+
+setJavaHome() {
+  # use $JAVA_HOME if defined
+  if [ -n "$JAVA_HOME" ] ; then
+    return
+  fi
+
+  # try java first
+  java=$(which java 2>/dev/null || :)
+
+  # try javac if java is not found
+  if [ -z "$java" ] ; then
+    java=$(which javac 2>/dev/null || :)
+  fi
+
+  if [ -n "$java" ] ; then
+    JAVA_HOME=$(dirname $(dirname $(readlink -e $java)))
+    export JAVA_HOME
+    return
+  fi
+
+  # didnt find java home. exiting with error
+  exit 1
+}
+
+setJavaHome
+
+SCP=""
+DCP=""
+UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar`":"`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':'`
+JCP="/usr/share/java/commons-daemon.jar":"/usr/share/java/mysql-connector-java.jar"
+
+# We need to append the JSVC daemon  and mysql-connector JAR to the classpath
+# AgentShell implements the JSVC daemon methods
+export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/cloudstack/usage"
+
+start() {
+    if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+        echo "$PROGNAME apparently already running"
+        exit 0
+    fi
+
+    if hostname --fqdn >/dev/null 2>&1 ; then
+        true
+    else
+        echo "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
+        exit 1
+    fi
+
+    echo -n "Starting $PROGNAME" "$SHORTNAME"
+
+    if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
+      -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
+        RETVAL=$?
+    then
+        rc=0
+        sleep 1
+        if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+            failure
+            rc=1
+        fi
+    else
+        rc=1
+    fi
+
+    if [ $rc -eq 0 ]; then
+        success
+    else
+        failure
+        rm -f "$PIDFILE"
+    fi
+    echo
+}
+
+stop() {
+    echo -n "Stopping $PROGNAME" "$SHORTNAME"
+    killproc -p $PIDFILE $DAEMON
+    if [ "$?" -eq 0 ]; then
+        success
+    else
+        failure
+    fi
+    rm -f "$PIDFILE"
+    echo
+}
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status -p $PIDFILE $SHORTNAME
+        RETVAL=$?
+        ;;
+    restart | force-reload)
+        stop
+        sleep 3
+        start
+        ;;
+    *)
+    echo "Usage: $0 {start|stop|restart|force-reload|status}"
+    RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud.limits
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.limits b/packaging/centos7/cloud.limits
new file mode 100644
index 0000000..fe85be4
--- /dev/null
+++ b/packaging/centos7/cloud.limits
@@ -0,0 +1,2 @@
+cloud hard nofile 4096
+cloud soft nofile 4096

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
new file mode 100644
index 0000000..01fe7ea
--- /dev/null
+++ b/packaging/centos7/cloud.spec
@@ -0,0 +1,605 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+%define __os_install_post %{nil}
+%global debug_package %{nil}
+
+# DISABLE the post-percentinstall java repacking and line number stripping
+# we need to find a way to just disable the java repacking and line number stripping, but not the autodeps
+
+Name:      cloudstack
+Summary:   CloudStack IaaS Platform
+#http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages
+%if "%{?_prerelease}" != ""
+%define _maventag %{_ver}-SNAPSHOT
+Release:   %{_rel}%{dist}
+%else
+%define _maventag %{_ver}
+Release:   %{_rel}%{dist}
+%endif
+
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+
+Version:   %{_ver}
+License:   ASL 2.0
+Vendor:    Apache CloudStack <de...@cloudstack.apache.org>
+Packager:  Apache CloudStack <de...@cloudstack.apache.org>
+Group:     System Environment/Libraries
+# FIXME do groups for every single one of the subpackages
+Source0:   %{name}-%{_maventag}.tgz
+BuildRoot: %{_tmppath}/%{name}-%{_maventag}-%{release}-build
+
+BuildRequires: java-1.7.0-openjdk-devel
+BuildRequires: tomcat => 7.0
+BuildRequires: ws-commons-util
+BuildRequires: jpackage-utils
+BuildRequires: gcc
+BuildRequires: glibc-devel
+BuildRequires: /usr/bin/mkisofs
+BuildRequires: MySQL-python
+BuildRequires: maven => 3.0.0
+
+%description
+CloudStack is a highly-scalable elastic, open source,
+intelligent IaaS cloud implementation.
+
+%package management
+Summary:   CloudStack management server UI
+Requires: tomcat => 7.0
+Requires: java => 1.7.0
+Requires: python
+Requires: bash
+Requires: bzip2
+Requires: gzip
+Requires: unzip
+Requires: /sbin/mount.nfs
+Requires: openssh-clients
+Requires: nfs-utils
+Requires: wget
+Requires: mysql
+Requires: mysql-connector-java
+Requires: ws-commons-util
+Requires: jpackage-utils
+Requires: sudo
+Requires: /sbin/service
+Requires: /sbin/chkconfig
+Requires: /usr/bin/ssh-keygen
+Requires: mkisofs
+Requires: MySQL-python
+Requires: ipmitool
+Requires: %{name}-common = %{_ver}
+Requires: %{name}-awsapi = %{_ver}
+Requires: iptables-services
+Group:     System Environment/Libraries
+%description management
+The CloudStack management server is the central point of coordination,
+management, and intelligence in CloudStack.  
+
+%package common
+Summary: Apache CloudStack common files and scripts
+Requires: python
+Group:   System Environment/Libraries
+%description common
+The Apache CloudStack files shared between agent and management server
+
+%package agent
+Summary: CloudStack Agent for KVM hypervisors
+Requires: openssh-clients
+Requires: java => 1.7.0
+Requires: %{name}-common = %{_ver}
+Requires: libvirt
+Requires: bridge-utils
+Requires: ebtables
+Requires: iptables
+Requires: ethtool
+Requires: iproute
+Requires: ipset
+Requires: jsvc
+Requires: jakarta-commons-daemon
+Requires: jakarta-commons-daemon-jsvc
+Requires: perl
+Requires: libvirt-python
+Requires: qemu-img
+Requires: qemu-kvm
+Provides: cloud-agent
+Group: System Environment/Libraries
+%description agent
+The CloudStack agent for KVM hypervisors
+
+%package baremetal-agent
+Summary: CloudStack baremetal agent
+Requires: tftp-server
+Requires: xinetd
+Requires: syslinux
+Requires: chkconfig
+Requires: dhcp
+Requires: httpd
+Group:     System Environment/Libraries
+%description baremetal-agent
+The CloudStack baremetal agent
+
+%package usage
+Summary: CloudStack Usage calculation server
+Requires: java => 1.7.0
+Requires: jsvc
+Requires: jakarta-commons-daemon
+Requires: jakarta-commons-daemon-jsvc
+Group: System Environment/Libraries
+%description usage
+The CloudStack usage calculation service
+
+%package cli
+Summary: Apache CloudStack CLI
+Provides: python-cloudmonkey
+Provides: python-marvin
+Group: System Environment/Libraries
+%description cli
+Apache CloudStack command line interface
+
+%package awsapi
+Summary: Apache CloudStack AWS API compatibility wrapper
+Requires: %{name}-management = %{_ver}
+Group: System Environment/Libraries
+%description awsapi
+Apache Cloudstack AWS API compatibility wrapper
+
+%if "%{_ossnoss}" == "noredist"
+%package mysql-ha
+Summary: Apache CloudStack Balancing Strategy for MySQL
+Requires: mysql-connector-java
+Requires: tomcat => 7.0
+Group: System Environmnet/Libraries
+%description mysql-ha
+Apache CloudStack Balancing Strategy for MySQL
+
+%endif
+
+%prep
+echo Doing CloudStack build
+
+%setup -q -n %{name}-%{_maventag}
+
+%build
+
+cp packaging/centos7/replace.properties build/replace.properties
+echo VERSION=%{_maventag} >> build/replace.properties
+echo PACKAGE=%{name} >> build/replace.properties
+touch build/gitrev.txt
+echo $(git rev-parse HEAD) > build/gitrev.txt
+
+if [ "%{_ossnoss}" == "NOREDIST" -o "%{_ossnoss}" == "noredist" ] ; then
+   echo "Adding noredist flag to the maven build"
+   FLAGS="$FLAGS -Dnoredist"
+fi
+
+if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then 
+   echo "Adding simulator flag to the maven build"
+   FLAGS="$FLAGS -Dsimulator"
+fi 
+
+mvn -Pawsapi,systemvm -DskipTests $FLAGS clean package
+
+%install
+[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
+# Common directories
+mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/awsapi
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/ipallocator
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/work
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/temp
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/mnt
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/management
+mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
+
+# Common
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms
+mkdir -p ${RPM_BUILD_ROOT}%{python_sitearch}/
+mkdir -p ${RPM_BUILD_ROOT}%/usr/bin
+cp -r scripts/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts
+install -D systemvm/dist/systemvm.iso ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.iso
+install -D systemvm/dist/systemvm.zip ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.zip
+install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}%{python_sitearch}/cloud_utils.py
+cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}%{python_sitearch}/
+python -m py_compile ${RPM_BUILD_ROOT}%{python_sitearch}/cloud_utils.py
+python -m compileall ${RPM_BUILD_ROOT}%{python_sitearch}/cloudutils
+cp build/gitrev.txt ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts
+cp packaging/centos7/cloudstack-sccs ${RPM_BUILD_ROOT}/usr/bin
+ 
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts/network/cisco
+cp -r plugins/network-elements/cisco-vnmc/scripts/network/cisco/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts/network/cisco
+
+# Management
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/awsapi
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/run
+
+# Specific for tomcat
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client
+ln -sf /usr/share/tomcat/bin ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/bin
+ln -sf /etc/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/conf
+ln -sf /usr/share/tomcat/lib ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
+ln -sf /var/log/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/logs
+ln -sf /var/cache/%{name}/management/temp ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/temp
+ln -sf /var/cache/%{name}/management/work ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/work
+
+/bin/touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management/catalina.out
+
+install -D client/target/utilities/bin/cloud-migrate-databases ${RPM_BUILD_ROOT}%{_bindir}/%{name}-migrate-databases
+install -D client/target/utilities/bin/cloud-set-guest-password ${RPM_BUILD_ROOT}%{_bindir}/%{name}-set-guest-password
+install -D client/target/utilities/bin/cloud-set-guest-sshkey ${RPM_BUILD_ROOT}%{_bindir}/%{name}-set-guest-sshkey
+install -D client/target/utilities/bin/cloud-setup-databases ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-databases
+install -D client/target/utilities/bin/cloud-setup-encryption ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-encryption
+install -D client/target/utilities/bin/cloud-setup-management ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-management
+install -D client/target/utilities/bin/cloud-setup-baremetal ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-baremetal
+install -D client/target/utilities/bin/cloud-sysvmadm ${RPM_BUILD_ROOT}%{_bindir}/%{name}-sysvmadm
+install -D client/target/utilities/bin/cloud-update-xenserver-licenses ${RPM_BUILD_ROOT}%{_bindir}/%{name}-update-xenserver-licenses
+
+cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
+cp -r client/target/cloud-client-ui-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client
+
+# Don't package the scripts in the management webapp
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms
+
+for name in catalina.properties db.properties log4j-cloud.xml web.xml cloud-bridge.properties\
+            ec2-service.properties server.xml commons-logging.properties environment.properties tomcat-users.xml
+do
+  cp packaging/centos7/tomcat7/$name \
+    ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
+done
+
+#ln -s %{_sysconfdir}/%{name}/management/log4j-cloud.xml \
+#    ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/log4j-cloud.xml
+
+mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/context.xml \
+    ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client
+
+install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py
+install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
+
+install -D packaging/centos7/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator
+install -D packaging/centos7/cloud-management.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}-management
+install -D packaging/centos7/cloud-management.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-management.service
+install -D packaging/centos7/cloud-management.sudoers ${RPM_BUILD_ROOT}%{_sysconfdir}/sudoers.d/%{name}-management
+install -D packaging/centos7/cloud.limits ${RPM_BUILD_ROOT}%{_sysconfdir}/security/limits.d/cloud
+touch ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}-management.pid
+
+chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina
+chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost
+chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/mnt
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/management
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/work
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/temp
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management
+chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent
+
+# KVM Agent
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/plugins
+install -D packaging/centos7/cloud-agent.rc ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name}-agent
+install -D agent/target/transformed/agent.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/agent.properties
+install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/environment.properties
+install -D agent/target/transformed/log4j-cloud.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/log4j-cloud.xml
+install -D agent/target/transformed/cloud-setup-agent ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-agent
+install -D agent/target/transformed/cloudstack-agent-upgrade ${RPM_BUILD_ROOT}%{_bindir}/%{name}-agent-upgrade
+install -D agent/target/transformed/libvirtqemuhook ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook
+install -D agent/target/transformed/cloud-ssh ${RPM_BUILD_ROOT}%{_bindir}/%{name}-ssh
+install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%name-agent/lib/cloud-plugin-hypervisor-kvm-%{_maventag}.jar
+cp plugins/hypervisors/kvm/target/dependencies/*  ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
+
+# Usage server
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib
+install -D usage/target/cloud-usage-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/cloud-usage-%{_maventag}.jar
+install -D usage/target/transformed/db.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/db.properties
+install -D usage/target/transformed/log4j-cloud_usage.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/log4j-cloud.xml
+cp usage/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib/
+install -D packaging/centos7/cloud-usage.rc ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/%{name}-usage
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/usage/
+
+# CLI
+cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{python_sitearch}/
+install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{python_sitearch}/cloudapis.py
+
+# AWS API
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
+cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
+install -D awsapi-setup/setup/cloud-setup-bridge ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-setup-bridge
+install -D awsapi-setup/setup/cloudstack-aws-api-register ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-aws-api-register
+cp -r awsapi-setup/db/mysql/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
+cp awsapi/resource/Axis2/axis2.xml ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/conf
+cp awsapi/target/WEB-INF/services/cloud-ec2.aar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/services
+
+
+for name in cloud-bridge.properties commons-logging.properties ec2-service.properties ; do
+  mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/$name \
+    ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
+done
+
+# MYSQL HA
+if [ "x%{_ossnoss}" == "xnoredist" ] ; then
+  mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-mysql-ha/lib
+  cp -r plugins/database/mysql-ha/target/cloud-plugin-database-mysqlha-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-mysql-ha/lib
+fi
+
+#Don't package the below for AWS API
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/db.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/META-INF
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml
+
+#License files from whisker
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/LICENSE
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE
+install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
+install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
+if [ "x%{_ossnoss}" == "xnoredist" ] ; then
+  install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-mysql-ha-%{version}/LICENSE
+  install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-mysql-ha-%{version}/NOTICE
+fi
+
+%clean
+[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
+
+%pre awsapi
+id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
+     -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
+
+%preun management
+/usr/bin/systemctl stop cloudstack-management || true
+/usr/bin/systemctl off cloudstack-management || true
+
+%pre management
+id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
+     -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
+
+rm -rf %{_localstatedir}/cache/cloudstack
+
+%post management
+if [ "$1" == "1" ] ; then
+    /usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
+fi
+
+if [ -d "%{_datadir}/%{name}-management" ] ; then
+   ln -s %{_datadir}/%{name}-bridge/webapps %{_datadir}/%{name}-management/webapps7080
+fi
+
+if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then
+    echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in 
+    echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/
+fi
+
+%preun agent
+/sbin/service cloudstack-agent stop || true
+if [ "$1" == "0" ] ; then
+    /sbin/chkconfig --del cloudstack-agent > /dev/null 2>&1 || true
+    /sbin/service cloudstack-agent stop > /dev/null 2>&1 || true
+fi
+
+%pre agent
+
+# save old configs if they exist (for upgrade). Otherwise we may lose them
+# when the old packages are erased. There are a lot of properties files here.
+if [ -d "%{_sysconfdir}/cloud" ] ; then
+    mv %{_sysconfdir}/cloud %{_sysconfdir}/cloud.rpmsave
+fi
+
+%post agent
+if [ "$1" == "1" ] ; then
+    echo "Running %{_bindir}/%{name}-agent-upgrade to update bridge name for upgrade from CloudStack 4.0.x (and before) to CloudStack 4.1 (and later)"
+    %{_bindir}/%{name}-agent-upgrade
+    if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
+        mkdir %{_sysconfdir}/libvirt/hooks
+    fi
+    cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
+    /sbin/service libvirtd restart
+    /sbin/chkconfig --add cloudstack-agent > /dev/null 2>&1 || true
+    /sbin/chkconfig --level 345 cloudstack-agent on > /dev/null 2>&1 || true
+fi
+
+# if saved configs from upgrade exist, copy them over
+if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then
+    mv %{_sysconfdir}/%{name}/agent/agent.properties  %{_sysconfdir}/%{name}/agent/agent.properties.rpmnew
+    cp -p %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/%{name}/agent
+    # make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall
+    mv %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/cloud.rpmsave/agent/agent.properties.rpmsave
+fi
+
+%preun usage
+/sbin/service cloudstack-usage stop || true
+if [ "$1" == "0" ] ; then
+    /sbin/chkconfig --del cloudstack-usage > /dev/null 2>&1 || true
+    /sbin/service cloudstack-usage stop > /dev/null 2>&1 || true
+fi
+
+%post usage
+if [ -f "%{_sysconfdir}/%{name}/management/db.properties" ]; then
+    echo Replacing db.properties with management server db.properties
+    rm -f %{_sysconfdir}/%{name}/usage/db.properties
+    ln -s %{_sysconfdir}/%{name}/management/db.properties %{_sysconfdir}/%{name}/usage/db.properties
+    /sbin/chkconfig --add cloudstack-usage > /dev/null 2>&1 || true
+    /sbin/chkconfig --level 345 cloudstack-usage on > /dev/null 2>&1 || true
+fi
+
+if [ -f "%{_sysconfdir}/%{name}/management/key" ]; then
+    echo Replacing key with management server key
+    rm -f %{_sysconfdir}/%{name}/usage/key
+    ln -s %{_sysconfdir}/%{name}/management/key %{_sysconfdir}/%{name}/usage/key
+fi
+
+#%post awsapi
+#if [ -d "%{_datadir}/%{name}-management" ] ; then
+#   ln -s %{_datadir}/%{name}-bridge/webapps %{_datadir}/%{name}-management/webapps7080
+#fi
+
+#No default permission as the permission setup is complex
+%files management
+%defattr(-,root,root,-)
+%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina
+%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina/localhost
+%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina/localhost/client
+%dir %{_datadir}/%{name}-management
+%dir %attr(0770,root,cloud) %{_localstatedir}/%{name}/mnt
+%dir %attr(0770,cloud,cloud) %{_localstatedir}/%{name}/management
+%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management
+%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management/work
+%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management/temp
+%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/management
+%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/agent
+%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/awsapi
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-management
+%config(noreplace) %{_sysconfdir}/sudoers.d/%{name}-management
+%config(noreplace) %{_sysconfdir}/security/limits.d/cloud
+%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/db.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-cloud.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/Catalina/localhost/client/context.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/catalina.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/web.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/server.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
+%attr(0755,root,root) %{_unitdir}/%{name}-management.service
+%attr(0755,cloud,cloud) %{_localstatedir}/run/%{name}-management.pid
+
+%attr(0755,root,root) %{_bindir}/%{name}-setup-management
+%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses
+%{_datadir}/%{name}-management/webapps
+%{_datadir}/%{name}-management/bin
+%{_datadir}/%{name}-management/conf
+%{_datadir}/%{name}-management/lib
+%{_datadir}/%{name}-management/logs
+%{_datadir}/%{name}-management/temp
+%{_datadir}/%{name}-management/work
+%attr(0755,root,root) %{_bindir}/%{name}-setup-databases
+%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases
+%attr(0755,root,root) %{_bindir}/%{name}-set-guest-password
+%attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey
+%attr(0755,root,root) %{_bindir}/%{name}-sysvmadm
+%attr(0755,root,root) %{_bindir}/%{name}-setup-encryption
+%{_datadir}/%{name}-management/setup/*.sql
+%{_datadir}/%{name}-management/setup/db/*.sql
+%{_datadir}/%{name}-management/setup/*.sh
+%{_datadir}/%{name}-management/setup/server-setup.xml
+%attr(0755,root,root) %{_bindir}/%{name}-external-ipallocator.py
+%attr(0755,root,root) %{_initrddir}/%{name}-ipallocator
+%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator
+%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
+%attr(0644,cloud,cloud) %{_localstatedir}/log/%{name}/management/catalina.out
+
+%files agent
+%attr(0755,root,root) %{_bindir}/%{name}-setup-agent
+%attr(0755,root,root) %{_bindir}/%{name}-agent-upgrade
+%attr(0755,root,root) %{_bindir}/%{name}-ssh
+%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-agent
+%attr(0755,root,root) %{_datadir}/%{name}-common/scripts/network/cisco
+%config(noreplace) %{_sysconfdir}/%{name}/agent
+%dir %{_localstatedir}/log/%{name}/agent
+%attr(0644,root,root) %{_datadir}/%{name}-agent/lib/*.jar
+%attr(0755,root,root) %{_datadir}/%{name}-agent/lib/libvirtqemuhook
+%dir %{_datadir}/%{name}-agent/plugins
+%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE
+
+%files common
+%dir %attr(0755,root,root) %{python_sitearch}/cloudutils
+%dir %attr(0755,root,root) %{_datadir}/%{name}-common/vms
+%attr(0755,root,root) %{_datadir}/%{name}-common/scripts
+%attr(0755,root,root) /usr/bin/cloudstack-sccs
+%attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.iso
+%attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.zip
+%attr(0644,root,root) %{python_sitearch}/cloud_utils.py
+%attr(0644,root,root) %{python_sitearch}/cloud_utils.pyc
+%attr(0644,root,root) %{python_sitearch}/cloudutils/*
+%attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
+%{_defaultdocdir}/%{name}-common-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-common-%{version}/NOTICE
+
+%files usage
+%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-usage
+%attr(0644,root,root) %{_datadir}/%{name}-usage/*.jar
+%attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar
+%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/usage
+%attr(0644,root,root) %{_sysconfdir}/%{name}/usage/db.properties
+%attr(0644,root,root) %{_sysconfdir}/%{name}/usage/log4j-cloud.xml
+%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
+
+%files cli
+%attr(0644,root,root) %{python_sitearch}/cloudapis.py
+%attr(0644,root,root) %{python_sitearch}/cloudtool/__init__.py
+%attr(0644,root,root) %{python_sitearch}/cloudtool/utils.py
+%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
+
+%files awsapi
+%defattr(0644,cloud,cloud,0755)
+%{_datadir}/%{name}-bridge/webapps/awsapi
+%attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/*
+%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register
+%attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge
+%attr(0666,cloud,cloud) %{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/crypto.properties
+%attr(0666,cloud,cloud) %{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/xes.keystore
+
+%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE
+
+%if "%{_ossnoss}" == "noredist"
+%files mysql-ha
+%defattr(0644,cloud,cloud,0755)
+%attr(0644,root,root) %{_datadir}/%{name}-mysql-ha/lib/*
+%{_defaultdocdir}/%{name}-mysql-ha-%{version}/LICENSE
+%{_defaultdocdir}/%{name}-mysql-ha-%{version}/NOTICE
+%endif
+
+%files baremetal-agent
+%attr(0755,root,root) %{_bindir}/cloudstack-setup-baremetal
+
+%changelog
+* Wed Nov 19 2014 Hugo Trippaers <hu...@apache.org> 4.6.0
+- Create a specific spec for CentOS 7
+
+* Fri Jul 4 2014 Hugo Trippaers <hu...@apache.org> 4.5.0
+- Add a package for the mysql ha module
+
+* Fri Oct 5 2012 Hugo Trippaers <hu...@apache.org> 4.1.0
+- new style spec file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloudstack-agent.te
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloudstack-agent.te b/packaging/centos7/cloudstack-agent.te
new file mode 100644
index 0000000..4259e17
--- /dev/null
+++ b/packaging/centos7/cloudstack-agent.te
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+module cloudstack-agent 1.0;
+
+require {
+	type nfs_t;
+	type system_conf_t;
+	type mount_t;
+	type qemu_t;
+	class file unlink;
+	class filesystem getattr;
+}
+
+#============= mount_t ==============
+allow mount_t system_conf_t:file unlink;
+
+#============= qemu_t ==============
+allow qemu_t nfs_t:filesystem getattr;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/cloudstack-sccs
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloudstack-sccs b/packaging/centos7/cloudstack-sccs
new file mode 100644
index 0000000..e05d372
--- /dev/null
+++ b/packaging/centos7/cloudstack-sccs
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+cat /usr/share/cloudstack-common/scripts/gitrev.txt

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/replace.properties b/packaging/centos7/replace.properties
new file mode 100644
index 0000000..8345854
--- /dev/null
+++ b/packaging/centos7/replace.properties
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+DBUSER=cloud
+DBPW=cloud
+DBROOTPW=
+MSLOG=vmops.log
+APISERVERLOG=api.log
+DBHOST=localhost
+COMPONENTS-SPEC=components-premium.xml
+AWSAPILOG=awsapi.log
+REMOTEHOST=localhost
+AGENTCLASSPATH=
+AGENTLOG=/var/log/cloudstack/agent/agent.log
+AGENTLOGDIR=/var/log/cloudstack/agent/
+AGENTSYSCONFDIR=/etc/cloudstack/agent
+APISERVERLOG=/var/log/cloudstack/management/apilog.log
+AWSAPILOG=/var/log/cloudstack/awsapi/awsapi.log
+BINDIR=/usr/bin
+COMMONLIBDIR=/usr/share/cloudstack-common
+CONFIGUREVARS=
+DEPSCLASSPATH=
+DOCDIR=
+IPALOCATORLOG=/var/log/cloudstack/management/ipallocator.log
+JAVADIR=/usr/share/java
+LIBEXECDIR=/usr/libexec
+LOCKDIR=/var/lock
+MSCLASSPATH=
+MSCONF=/etc/cloudstack/management
+MSENVIRON=/usr/share/cloudstack-management
+MSLOG=/var/log/cloudstack/management/management-server.log
+MSLOGDIR=/var/log/cloudstack/management/
+MSMNTDIR=/var/cloudstack/mnt
+MSUSER=cloud
+PIDDIR=/var/run
+PLUGINJAVADIR=/usr/share/cloudstack-management/plugin
+PREMIUMJAVADIR=/usr/share/cloudstack-management/premium
+PYTHONDIR=/usr/lib/python2.6/site-packages/
+SERVERSYSCONFDIR=/etc/sysconfig
+SETUPDATADIR=/usr/share/cloudstack-management/setup
+SYSCONFDIR=/etc/sysconfig
+SYSTEMCLASSPATH=
+SYSTEMJARS=
+USAGECLASSPATH=
+USAGELOG=/var/log/cloudstack/usage/usage.log
+USAGESYSCONFDIR=/etc/sysconfig

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/catalina.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/catalina.properties b/packaging/centos7/tomcat7/catalina.properties
new file mode 100644
index 0000000..282892b
--- /dev/null
+++ b/packaging/centos7/tomcat7/catalina.properties
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common" 
+# loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/usr/share/java/mysql-connector-java.jar,/usr/share/cloudstack-mysql-ha/lib/*jar
+
+#
+# List of comma-separated paths defining the contents of the "server" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server" 
+# loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository 
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/cloud-bridge.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/cloud-bridge.properties b/packaging/centos7/tomcat7/cloud-bridge.properties
new file mode 100644
index 0000000..d0820e8
--- /dev/null
+++ b/packaging/centos7/tomcat7/cloud-bridge.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+host=http://localhost:7080/awsapi
+storage.root=/Users/john1/S3-Mount
+storage.multipartDir=__multipart__uploads__
+bucket.dns=false
+serviceEndpoint=localhost:7080
+
+
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/commons-logging.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/commons-logging.properties b/packaging/centos7/tomcat7/commons-logging.properties
new file mode 100644
index 0000000..1e570d6
--- /dev/null
+++ b/packaging/centos7/tomcat7/commons-logging.properties
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This is the logging properties that goes to the war, there are two logging conf kept at the 
+# svn, one for developement (one at src/test-resources) and other for producation
+ 
+# Uncomment the next line to disable all logging.
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
+
+# Uncomment the next line to enable the simple log based logging
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+
+# Uncomment the next line to enable log4j based logging
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/db.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/db.properties b/packaging/centos7/tomcat7/db.properties
new file mode 100644
index 0000000..ad31894
--- /dev/null
+++ b/packaging/centos7/tomcat7/db.properties
@@ -0,0 +1,107 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+db.usage.maxActive=100
+# distributed with this work for additional information
+
+
+# to you under the Apache License, Version 2.0 (the
+# with the License.  You may obtain a copy of the License at
+# "License"); you may not use this file except in compliance
+#   http://www.apache.org/licenses/LICENSE-2.0
+# software distributed under the License is distributed on an
+# regarding copyright ownership.  The ASF licenses this file
+# Unless required by applicable law or agreed to in writing,
+db.cloud.name=cloud
+db.cloud.password=ENC(vlzQjmqOV4s5q7n+S1OMbA==)
+# specific language governing permissions and limitations
+# KIND, either express or implied.  See the License for the
+
+#
+
+
+
+# in which the management server(Tomcat) is running
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# under the License.
+# management server clustering parameters, change cluster.node.IP to the machine IP address
+
+# usage database tuning parameters
+
+db.usage.maxWait=10000
+db.cloud.port=3306
+# High Availability And Cluster Properties
+db.usage.maxIdle=30
+# CloudStack database settings
+cluster.node.IP=127.0.0.1
+db.cloud.testOnBorrow=true
+db.cloud.maxIdle=30
+db.cloud.autoReconnectForPools=true
+db.cloud.trustStore=
+region.id=1
+cluster.servlet.port=9090
+db.cloud.host=localhost
+db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true
+# CloudStack database tuning parameters
+db.usage.name=cloud_usage
+db.cloud.poolPreparedStatements=false
+db.ha.enabled=false
+db.cloud.keyStorePassphrase=vmops.com
+db.simulator.maxActive=250
+db.cloud.username=cloud
+db.usage.port=3306
+db.cloud.maxWait=10000
+db.cloud.timeBetweenEvictionRunsMillis=40000
+db.cloud.keyStorePassword=
+# usage database settings
+db.cloud.queriesBeforeRetryMaster=5000
+db.cloud.validationQuery=SELECT 1
+db.usage.failOverReadOnly=false
+db.cloud.maxActive=250
+
+db.cloud.useSSL=false
+db.usage.host=localhost
+db.cloud.initialTimeout=3600
+# Encryption Settings
+db.cloud.minEvictableIdleTimeMillis=240000
+db.cloud.testWhileIdle=true
+# CloudStack database SSL settings
+db.cloud.slaves=localhost,localhost
+db.simulator.maxIdle=30
+db.cloud.keyStore=
+db.cloud.encrypt.secret=ENC(zaGuSF5a4KyWayn2t0yyjDa0HjdToVtZ)
+db.cloud.encryption.type=file
+db.cloud.failOverReadOnly=false
+
+db.simulator.port=3306
+db.awsapi.host=localhost
+db.usage.password=ENC(cQEcN5aVucSYK+WUkPjDcw==)
+db.usage.username=cloud
+db.cloud.trustStorePassword=
+db.awsapi.password=cloud
+db.simulator.username=cloud
+db.usage.url.params=
+db.usage.initialTimeout=3600
+
+# Simulator database settings
+db.cloud.reconnectAtTxEnd=true
+db.usage.autoReconnect=true
+#usage Database
+db.simulator.maxWait=10000
+# cloud stack Database
+db.simulator.password=cloud
+db.awsapi.username=cloud
+db.usage.reconnectAtTxEnd=true
+db.simulator.autoReconnect=true
+
+# awsapi database settings
+db.awsapi.port=3306
+db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
+db.awsapi.name=cloudbridge
+db.cloud.autoReconnect=true
+db.simulator.host=localhost
+db.simulator.name=simulator
+db.usage.queriesBeforeRetryMaster=5000
+db.usage.slaves=localhost,localhost
+db.usage.secondsBeforeRetryMaster=3600
+db.usage.autoReconnectForPools=true
+db.cloud.secondsBeforeRetryMaster=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/ec2-service.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/tomcat7/ec2-service.properties b/packaging/centos7/tomcat7/ec2-service.properties
new file mode 100644
index 0000000..82f5ad8
--- /dev/null
+++ b/packaging/centos7/tomcat7/ec2-service.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+managementServer=127.0.0.1
+cloudAPIPort=8080
+cloudstackVersion=2.2.0
+WSDLVersion=2012-08-15
+keystore=xes.keystore
+keystorePass=apache
+
+


[32/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Fix python reference


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b249c91b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b249c91b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b249c91b

Branch: refs/heads/useraccount-refactoring
Commit: b249c91bf1946bfcafdf684c172e0d74ba7d04bc
Parents: f9cfd4d
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Nov 26 15:18:12 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Nov 26 15:18:12 2014 +0100

----------------------------------------------------------------------
 packaging/centos7/replace.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b249c91b/packaging/centos7/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/centos7/replace.properties b/packaging/centos7/replace.properties
index 8345854..f99dab8 100644
--- a/packaging/centos7/replace.properties
+++ b/packaging/centos7/replace.properties
@@ -49,7 +49,7 @@ MSUSER=cloud
 PIDDIR=/var/run
 PLUGINJAVADIR=/usr/share/cloudstack-management/plugin
 PREMIUMJAVADIR=/usr/share/cloudstack-management/premium
-PYTHONDIR=/usr/lib/python2.6/site-packages/
+PYTHONDIR=/usr/lib/python2.7/site-packages/
 SERVERSYSCONFDIR=/etc/sysconfig
 SETUPDATADIR=/usr/share/cloudstack-management/setup
 SYSCONFDIR=/etc/sysconfig


[27/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
sign release branch instead of release tree
edit checkstyle pom on rc creation
xapi release version dep
update debian package changelog on version upgrade

sign release branch instead of release tree

(cherry picked from commit dd508b3b9fd4a630545949685beb648115803a85)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ef2aa2c5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ef2aa2c5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ef2aa2c5

Branch: refs/heads/useraccount-refactoring
Commit: ef2aa2c5297b547eff7f395f4a0f2e2c5bb28eed
Parents: 8cca0b2
Author: Daan Hoogland <dh...@schubergphilis.com>
Authored: Mon Jun 30 17:53:17 2014 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Nov 25 15:11:58 2014 +0100

----------------------------------------------------------------------
 tools/build/build_asf.sh | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef2aa2c5/tools/build/build_asf.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh
index e75da60..aec5b2e 100644
--- a/tools/build/build_asf.sh
+++ b/tools/build/build_asf.sh
@@ -92,6 +92,8 @@ echo "found $currentversion"
 echo 'setting version numbers'
 mvn versions:set -DnewVersion=$version -P vmware -P developer -P systemvm -P simulator -P baremetal -P ucs -Dnoredist
 mv deps/XenServerJava/pom.xml.versionsBackup deps/XenServerJava/pom.xml
+perl -pi -e "s/<cs.xapi.version>6.2.0-1-SNAPSHOT<\/cs.xapi.version>/<cs.xapi.version>6.2.0-1<\/cs.xapi.version>/" pom.xml
+perl -pi -e "s/-SNAPSHOT//" tools/checkstyle/pom.xml
 perl -pi -e "s/-SNAPSHOT//" deps/XenServerJava/pom.xml
 perl -pi -e "s/-SNAPSHOT//" tools/apidoc/pom.xml
 case "$currentversion" in 
@@ -100,6 +102,18 @@ case "$currentversion" in
     ;;
 esac
 
+# set debian changelog entry
+tmpfilenm=$$.tmp
+echo "cloudstack ($version) unstable; urgency=low" >>$tmpfilenm 
+echo >>$tmpfilenm
+echo "  * Update the version to $version" >>$tmpfilenm
+echo >>$tmpfilenm
+echo " -- the Apache CloudStack project <de...@cloudstack.apache.org>  `date -j '+%a, %d %b %Y %T %z'`" >>$tmpfilenm
+echo >>$tmpfilenm
+
+cat debian/changelog >>$tmpfilenm
+mv $tmpfilenm debian/changelog
+
 git clean -f
 
 #create a RC branch
@@ -115,7 +129,7 @@ export commitsh=`git show HEAD | head -n 1 | cut -d ' ' -f 2`
 echo "committed as $commitsh"
 
 echo 'archiving'
-git archive --format=tar --prefix=apache-cloudstack-$version-src/ $branch > $outputdir/apache-cloudstack-$version-src.tar
+git archive --format=tar --prefix=apache-cloudstack-$version-src/ $branch-$RELEASE_BRANCH > $outputdir/apache-cloudstack-$version-src.tar
 bzip2 $outputdir/apache-cloudstack-$version-src.tar
 
 cd $outputdir


[41/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7979 : Fixed the script 'test_security_groups.py' - Zone Network Type Information should to be passed to VirtualMachine create method


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f879931
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f879931
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f879931

Branch: refs/heads/useraccount-refactoring
Commit: 4f8799315f71e30ce9edf1e10b39d1bb433ae36b
Parents: b81cf5e
Author: Chandan Purushothama <Ch...@citrix.com>
Authored: Wed Nov 26 16:12:12 2014 -0800
Committer: Sangeetha Hariharan <sa...@citrix.com>
Committed: Wed Nov 26 19:33:06 2014 -0800

----------------------------------------------------------------------
 .../component/test_security_groups.py           | 21 +++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f879931/test/integration/component/test_security_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py
index 89317f4..eb242c7 100644
--- a/test/integration/component/test_security_groups.py
+++ b/test/integration/component/test_security_groups.py
@@ -502,7 +502,8 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
@@ -643,7 +644,8 @@ class TestRevokeIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -729,7 +731,8 @@ class TestDhcpOnlyRouter(cloudstackTestCase):
                                     cls.services["virtual_machine"],
                                     accountid=cls.account.name,
                                     domainid=cls.account.domainid,
-                                    serviceofferingid=cls.service_offering.id
+                                    serviceofferingid=cls.service_offering.id,
+                                    mode=cls.services['mode']
                                 )
         cls._cleanup = [
                         cls.account,
@@ -955,7 +958,8 @@ class TestdeployVMWithUserData(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
@@ -1348,7 +1352,8 @@ class TestIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -1466,7 +1471,8 @@ class TestIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -1619,7 +1625,8 @@ class TestIngressRule(cloudstackTestCase):
                                     accountid=self.account.name,
                                     domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
-                                    securitygroupids=[security_group.id]
+                                    securitygroupids=[security_group.id],
+                                    mode=self.services['mode']
                                 )
         self.debug("Deploying VM in account: %s" % self.account.name)
 


[06/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Disable quickview for template zone listing

-- Quickviews are not supported when rendering in a list within a detail panel,
   due to technical limitations.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fff3b9ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fff3b9ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fff3b9ed

Branch: refs/heads/useraccount-refactoring
Commit: fff3b9eda0c4e688b473a57758ff137c8057deeb
Parents: 3cb78fc
Author: Brian Federle <br...@citrix.com>
Authored: Mon Nov 24 12:26:33 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Nov 24 12:26:33 2014 -0800

----------------------------------------------------------------------
 ui/scripts/templates.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fff3b9ed/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index deb836b..e41c018 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -1096,6 +1096,7 @@
                                     },
                                     
                                     detailView: {
+                                        noCompact: true,
                                         actions: {
                                              remove: {
                                                  label: 'label.action.delete.template',


[25/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ad2f384
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ad2f384
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ad2f384

Branch: refs/heads/useraccount-refactoring
Commit: 6ad2f384265de41751fd3f9c238b82bdbf933cfd
Parents: d0ca2d5
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 25 19:15:28 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 25 19:16:23 2014 +0530

----------------------------------------------------------------------
 plugins/event-bus/rabbitmq/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ad2f384/plugins/event-bus/rabbitmq/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/event-bus/rabbitmq/pom.xml b/plugins/event-bus/rabbitmq/pom.xml
index a109578..5f002a0 100644
--- a/plugins/event-bus/rabbitmq/pom.xml
+++ b/plugins/event-bus/rabbitmq/pom.xml
@@ -31,7 +31,7 @@
     <dependency>
     <groupId>com.rabbitmq</groupId>
       <artifactId>amqp-client</artifactId>
-        <version>3.3.5</version>
+        <version>3.4.1</version>
     </dependency>
     <dependency>
     <groupId>org.apache.cloudstack</groupId>


[02/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/setup/db/db/schema-441to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-441to450.sql b/setup/db/db/schema-441to450.sql
deleted file mode 100644
index d1250fe..0000000
--- a/setup/db/db/schema-441to450.sql
+++ /dev/null
@@ -1,770 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---   http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied.  See the License for the
--- specific language governing permissions and limitations
--- under the License.
-
---
--- Schema upgrade from 4.4.1 to 4.5.0
---
-
--- Disable foreign key checking
--- SET foreign_key_checks = 0;
-
-DROP VIEW IF EXISTS `cloud`.`storage_tag_view`;
-CREATE VIEW `cloud`.`storage_tag_view` AS
-    select
-        storage_pool_details.id,
-        storage_pool_details.pool_id,
-        storage_pool_details.name
-    from
-        `cloud`.`storage_pool_details`
-    where
-        value='true';
-
-ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
-
-DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
-CREATE VIEW `cloud`.`disk_offering_view` AS
-    select
-        disk_offering.id,
-        disk_offering.uuid,
-        disk_offering.name,
-        disk_offering.display_text,
-        disk_offering.provisioning_type,
-        disk_offering.disk_size,
-        disk_offering.min_iops,
-        disk_offering.max_iops,
-        disk_offering.created,
-        disk_offering.tags,
-        disk_offering.customized,
-        disk_offering.customized_iops,
-        disk_offering.removed,
-        disk_offering.use_local_storage,
-        disk_offering.system_use,
-        disk_offering.hv_ss_reserve,
-        disk_offering.bytes_read_rate,
-        disk_offering.bytes_write_rate,
-        disk_offering.iops_read_rate,
-        disk_offering.iops_write_rate,
-        disk_offering.cache_mode,
-        disk_offering.sort_key,
-        disk_offering.type,
-        disk_offering.display_offering,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path
-    from
-        `cloud`.`disk_offering`
-            left join
-        `cloud`.`domain` ON disk_offering.domain_id = domain.id
-    where
-        disk_offering.state='ACTIVE';
-
-DROP TABLE IF EXISTS `cloud`.`external_nuage_vsp_devices`;
-CREATE TABLE `cloud`.`external_nuage_vsp_devices` (
-  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
-  `uuid` varchar(255) UNIQUE,
-  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which nuage vsp is added',
-  `provider_name` varchar(255) NOT NULL COMMENT 'the service provider name corresponding to this nuage vsp device',
-  `device_name` varchar(255) NOT NULL COMMENT 'the name of the nuage vsp device',
-  `host_id` bigint unsigned NOT NULL COMMENT 'host id corresponding to the external nuage vsp device',
-  PRIMARY KEY (`id`),
-  CONSTRAINT `fk_external_nuage_vsp_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
-  CONSTRAINT `fk_external_nuage_vsp_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-DROP VIEW IF EXISTS `cloud`.`service_offering_view`;
-CREATE VIEW `cloud`.`service_offering_view` AS
-    select
-        service_offering.id,
-        disk_offering.uuid,
-        disk_offering.name,
-        disk_offering.display_text,
-        disk_offering.provisioning_type,
-        disk_offering.created,
-        disk_offering.tags,
-        disk_offering.removed,
-        disk_offering.use_local_storage,
-        disk_offering.system_use,
-        disk_offering.customized_iops,
-        disk_offering.min_iops,
-        disk_offering.max_iops,
-        disk_offering.hv_ss_reserve,
-        disk_offering.bytes_read_rate,
-        disk_offering.bytes_write_rate,
-        disk_offering.iops_read_rate,
-        disk_offering.iops_write_rate,
-        disk_offering.cache_mode,
-        service_offering.cpu,
-        service_offering.speed,
-        service_offering.ram_size,
-        service_offering.nw_rate,
-        service_offering.mc_rate,
-        service_offering.ha_enabled,
-        service_offering.limit_cpu_use,
-        service_offering.host_tag,
-        service_offering.default_use,
-        service_offering.vm_type,
-        service_offering.sort_key,
-        service_offering.is_volatile,
-        service_offering.deployment_planner,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path
-    from
-        `cloud`.`service_offering`
-            inner join
-        `cloud`.`disk_offering` ON service_offering.id = disk_offering.id
-            left join
-        `cloud`.`domain` ON disk_offering.domain_id = domain.id
-    where
-        disk_offering.state='Active';
-
-DROP VIEW IF EXISTS `cloud`.`volume_view`;
-CREATE VIEW `cloud`.`volume_view` AS
-    select
-        volumes.id,
-        volumes.uuid,
-        volumes.name,
-        volumes.device_id,
-        volumes.volume_type,
-        volumes.provisioning_type,
-        volumes.size,
-        volumes.min_iops,
-        volumes.max_iops,
-        volumes.created,
-        volumes.state,
-        volumes.attached,
-        volumes.removed,
-        volumes.pod_id,
-        volumes.display_volume,
-        volumes.format,
-        volumes.path,
-        volumes.chain_info,
-        account.id account_id,
-        account.uuid account_uuid,
-        account.account_name account_name,
-        account.type account_type,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path,
-        projects.id project_id,
-        projects.uuid project_uuid,
-        projects.name project_name,
-        data_center.id data_center_id,
-        data_center.uuid data_center_uuid,
-        data_center.name data_center_name,
-        data_center.networktype data_center_type,
-        vm_instance.id vm_id,
-        vm_instance.uuid vm_uuid,
-        vm_instance.name vm_name,
-        vm_instance.state vm_state,
-        vm_instance.vm_type,
-        user_vm.display_name vm_display_name,
-        volume_store_ref.size volume_store_size,
-        volume_store_ref.download_pct,
-        volume_store_ref.download_state,
-        volume_store_ref.error_str,
-        volume_store_ref.created created_on_store,
-        disk_offering.id disk_offering_id,
-        disk_offering.uuid disk_offering_uuid,
-        disk_offering.name disk_offering_name,
-        disk_offering.display_text disk_offering_display_text,
-        disk_offering.use_local_storage,
-        disk_offering.system_use,
-        disk_offering.bytes_read_rate,
-        disk_offering.bytes_write_rate,
-        disk_offering.iops_read_rate,
-        disk_offering.iops_write_rate,
-        disk_offering.cache_mode,
-        storage_pool.id pool_id,
-        storage_pool.uuid pool_uuid,
-        storage_pool.name pool_name,
-        cluster.hypervisor_type,
-        vm_template.id template_id,
-        vm_template.uuid template_uuid,
-        vm_template.extractable,
-        vm_template.type template_type,
-        vm_template.name template_name,
-        vm_template.display_text template_display_text,
-        iso.id iso_id,
-        iso.uuid iso_uuid,
-        iso.name iso_name,
-        iso.display_text iso_display_text,
-        resource_tags.id tag_id,
-        resource_tags.uuid tag_uuid,
-        resource_tags.key tag_key,
-        resource_tags.value tag_value,
-        resource_tags.domain_id tag_domain_id,
-        resource_tags.account_id tag_account_id,
-        resource_tags.resource_id tag_resource_id,
-        resource_tags.resource_uuid tag_resource_uuid,
-        resource_tags.resource_type tag_resource_type,
-        resource_tags.customer tag_customer,
-        async_job.id job_id,
-        async_job.uuid job_uuid,
-        async_job.job_status job_status,
-        async_job.account_id job_account_id
-    from
-        `cloud`.`volumes`
-            inner join
-        `cloud`.`account` ON volumes.account_id = account.id
-            inner join
-        `cloud`.`domain` ON volumes.domain_id = domain.id
-            left join
-        `cloud`.`projects` ON projects.project_account_id = account.id
-            left join
-        `cloud`.`data_center` ON volumes.data_center_id = data_center.id
-            left join
-        `cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id
-            left join
-        `cloud`.`user_vm` ON user_vm.id = vm_instance.id
-            left join
-        `cloud`.`volume_store_ref` ON volumes.id = volume_store_ref.volume_id
-            left join
-        `cloud`.`disk_offering` ON volumes.disk_offering_id = disk_offering.id
-            left join
-        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
-            left join
-        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
-            left join
-        `cloud`.`vm_template` ON volumes.template_id = vm_template.id
-            left join
-        `cloud`.`vm_template` iso ON iso.id = volumes.iso_id
-            left join
-        `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id
-            and resource_tags.resource_type = 'Volume'
-            left join
-        `cloud`.`async_job` ON async_job.instance_id = volumes.id
-            and async_job.instance_type = 'Volume'
-            and async_job.job_status = 0;
-
-CREATE TABLE `cloud`.`external_brocade_vcs_devices` (
-  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
-  `uuid` varchar(255) UNIQUE,
-  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which brocade vcs switch is added',
-  `provider_name` varchar(255) NOT NULL COMMENT 'Service Provider name corresponding to this brocade vcs switch',
-  `device_name` varchar(255) NOT NULL COMMENT 'name of the brocade vcs switch',
-  `host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the external brocade vcs switch',
-  PRIMARY KEY  (`id`),
-  CONSTRAINT `fk_external_brocade_vcs_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
-  CONSTRAINT `fk_external_brocade_vcs_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `cloud`.`brocade_network_vlan_map` (
-  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
-  `network_id` bigint unsigned NOT NULL COMMENT 'id of the network',
-  `vlan_id` int(10) COMMENT 'vlan id of the network',
-  PRIMARY KEY  (`id`),
-   CONSTRAINT `fk_brocade_network_vlan_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-/* As part of the separation of Xen and XenServer, update the column for the network labels */
-ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE `xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host';
-
-ALTER TABLE `cloud`.`volumes` CHANGE COLUMN `iso_id` `iso_id` bigint(20) unsigned COMMENT 'The id of the iso from which the volume was created';
-
-DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
-CREATE VIEW `cloud`.`storage_pool_view` AS
-    select
-        storage_pool.id,
-        storage_pool.uuid,
-        storage_pool.name,
-        storage_pool.status,
-        storage_pool.path,
-        storage_pool.pool_type,
-        storage_pool.host_address,
-        storage_pool.created,
-        storage_pool.removed,
-        storage_pool.capacity_bytes,
-        storage_pool.capacity_iops,
-        storage_pool.scope,
-        storage_pool.hypervisor,
-        storage_pool.storage_provider_name,
-        cluster.id cluster_id,
-        cluster.uuid cluster_uuid,
-        cluster.name cluster_name,
-        cluster.cluster_type,
-        data_center.id data_center_id,
-        data_center.uuid data_center_uuid,
-        data_center.name data_center_name,
-        data_center.networktype data_center_type,
-        host_pod_ref.id pod_id,
-        host_pod_ref.uuid pod_uuid,
-        host_pod_ref.name pod_name,
-        storage_pool_details.name tag,
-        op_host_capacity.used_capacity disk_used_capacity,
-        op_host_capacity.reserved_capacity disk_reserved_capacity,
-        async_job.id job_id,
-        async_job.uuid job_uuid,
-        async_job.job_status job_status,
-        async_job.account_id job_account_id
-    from
-        `cloud`.`storage_pool`
-            left join
-        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
-            left join
-        `cloud`.`data_center` ON storage_pool.data_center_id = data_center.id
-            left join
-        `cloud`.`host_pod_ref` ON storage_pool.pod_id = host_pod_ref.id
-            left join
-        `cloud`.`storage_pool_details` ON storage_pool_details.pool_id = storage_pool.id
-            and storage_pool_details.value = 'true'
-            left join
-        `cloud`.`op_host_capacity` ON storage_pool.id = op_host_capacity.host_id
-            and op_host_capacity.capacity_type in (3,9)
-            left join
-        `cloud`.`async_job` ON async_job.instance_id = storage_pool.id
-            and async_job.instance_type = 'StoragePool'
-            and async_job.job_status = 0;
-
-
-DROP VIEW IF EXISTS `cloud`.`template_view`;
-CREATE VIEW `cloud`.`template_view` AS
-    select
-        vm_template.id,
-        vm_template.uuid,
-        vm_template.unique_name,
-        vm_template.name,
-        vm_template.public,
-        vm_template.featured,
-        vm_template.type,
-        vm_template.hvm,
-        vm_template.bits,
-        vm_template.url,
-        vm_template.format,
-        vm_template.created,
-        vm_template.checksum,
-        vm_template.display_text,
-        vm_template.enable_password,
-        vm_template.dynamically_scalable,
-        vm_template.state template_state,
-        vm_template.guest_os_id,
-        guest_os.uuid guest_os_uuid,
-        guest_os.display_name guest_os_name,
-        vm_template.bootable,
-        vm_template.prepopulate,
-        vm_template.cross_zones,
-        vm_template.hypervisor_type,
-        vm_template.extractable,
-        vm_template.template_tag,
-        vm_template.sort_key,
-        vm_template.removed,
-        vm_template.enable_sshkey,
-        source_template.id source_template_id,
-        source_template.uuid source_template_uuid,
-        account.id account_id,
-        account.uuid account_uuid,
-        account.account_name account_name,
-        account.type account_type,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path,
-        projects.id project_id,
-        projects.uuid project_uuid,
-        projects.name project_name,
-        data_center.id data_center_id,
-        data_center.uuid data_center_uuid,
-        data_center.name data_center_name,
-        launch_permission.account_id lp_account_id,
-        template_store_ref.store_id,
-        image_store.scope as store_scope,
-        template_store_ref.state,
-        template_store_ref.download_state,
-        template_store_ref.download_pct,
-        template_store_ref.error_str,
-        template_store_ref.size,
-        template_store_ref.destroyed,
-        template_store_ref.created created_on_store,
-        vm_template_details.name detail_name,
-        vm_template_details.value detail_value,
-        resource_tags.id tag_id,
-        resource_tags.uuid tag_uuid,
-        resource_tags.key tag_key,
-        resource_tags.value tag_value,
-        resource_tags.domain_id tag_domain_id,
-        resource_tags.account_id tag_account_id,
-        resource_tags.resource_id tag_resource_id,
-        resource_tags.resource_uuid tag_resource_uuid,
-        resource_tags.resource_type tag_resource_type,
-        resource_tags.customer tag_customer,
-        CONCAT(vm_template.id, '_', IFNULL(data_center.id, 0)) as temp_zone_pair
-    from
-        `cloud`.`vm_template`
-            inner join
-        `cloud`.`guest_os` ON guest_os.id = vm_template.guest_os_id
-            inner join
-        `cloud`.`account` ON account.id = vm_template.account_id
-            inner join
-        `cloud`.`domain` ON domain.id = account.domain_id
-            left join
-        `cloud`.`projects` ON projects.project_account_id = account.id
-            left join
-        `cloud`.`vm_template_details` ON vm_template_details.template_id = vm_template.id
-            left join
-        `cloud`.`vm_template` source_template ON source_template.id = vm_template.source_template_id
-            left join
-        `cloud`.`template_store_ref` ON template_store_ref.template_id = vm_template.id and template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
-            left join
-        `cloud`.`image_store` ON image_store.removed is NULL AND template_store_ref.store_id is not NULL AND image_store.id = template_store_ref.store_id
-            left join
-        `cloud`.`template_zone_ref` ON template_zone_ref.template_id = vm_template.id AND template_store_ref.store_id is NULL AND template_zone_ref.removed is null
-            left join
-        `cloud`.`data_center` ON (image_store.data_center_id = data_center.id OR template_zone_ref.zone_id = data_center.id)
-            left join
-        `cloud`.`launch_permission` ON launch_permission.template_id = vm_template.id
-            left join
-        `cloud`.`resource_tags` ON resource_tags.resource_id = vm_template.id
-            and (resource_tags.resource_type = 'Template' or resource_tags.resource_type='ISO');
-
-
-UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC,Hyperv' WHERE name='hypervisor.list';
-UPDATE `cloud`.`configuration` SET description="If set to true, will set guest VM's name as it appears on the hypervisor, to its hostname. The flag is supported for VMware hypervisor only" WHERE name='vm.instancename.flag';
-INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'implicit.host.tags', 'GPU', 'Tag hosts at the time of host disovery based on the host properties/capabilities ', 'GPU');
-
-DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
-CREATE VIEW `cloud`.`domain_router_view` AS
-    select
-        vm_instance.id id,
-        vm_instance.name name,
-        account.id account_id,
-        account.uuid account_uuid,
-        account.account_name account_name,
-        account.type account_type,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path,
-        projects.id project_id,
-        projects.uuid project_uuid,
-        projects.name project_name,
-        vm_instance.uuid uuid,
-        vm_instance.created created,
-        vm_instance.state state,
-        vm_instance.removed removed,
-        vm_instance.pod_id pod_id,
-        vm_instance.instance_name instance_name,
-        host_pod_ref.uuid pod_uuid,
-        data_center.id data_center_id,
-        data_center.uuid data_center_uuid,
-        data_center.name data_center_name,
-        data_center.networktype data_center_type,
-        data_center.dns1 dns1,
-        data_center.dns2 dns2,
-        data_center.ip6_dns1 ip6_dns1,
-        data_center.ip6_dns2 ip6_dns2,
-        host.id host_id,
-        host.uuid host_uuid,
-        host.name host_name,
-	host.hypervisor_type,
-        host.cluster_id cluster_id,
-        vm_template.id template_id,
-        vm_template.uuid template_uuid,
-        service_offering.id service_offering_id,
-        disk_offering.uuid service_offering_uuid,
-        disk_offering.name service_offering_name,
-        nics.id nic_id,
-        nics.uuid nic_uuid,
-        nics.network_id network_id,
-        nics.ip4_address ip_address,
-        nics.ip6_address ip6_address,
-        nics.ip6_gateway ip6_gateway,
-        nics.ip6_cidr ip6_cidr,
-        nics.default_nic is_default_nic,
-        nics.gateway gateway,
-        nics.netmask netmask,
-        nics.mac_address mac_address,
-        nics.broadcast_uri broadcast_uri,
-        nics.isolation_uri isolation_uri,
-        vpc.id vpc_id,
-        vpc.uuid vpc_uuid,
-        networks.uuid network_uuid,
-        networks.name network_name,
-        networks.network_domain network_domain,
-        networks.traffic_type traffic_type,
-        networks.guest_type guest_type,
-        async_job.id job_id,
-        async_job.uuid job_uuid,
-        async_job.job_status job_status,
-        async_job.account_id job_account_id,
-        domain_router.template_version template_version,
-        domain_router.scripts_version scripts_version,
-        domain_router.is_redundant_router is_redundant_router,
-        domain_router.redundant_state redundant_state,
-        domain_router.stop_pending stop_pending,
-        domain_router.role role
-    from
-        `cloud`.`domain_router`
-            inner join
-        `cloud`.`vm_instance` ON vm_instance.id = domain_router.id
-            inner join
-        `cloud`.`account` ON vm_instance.account_id = account.id
-            inner join
-        `cloud`.`domain` ON vm_instance.domain_id = domain.id
-            left join
-        `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
-            left join
-        `cloud`.`projects` ON projects.project_account_id = account.id
-            left join
-        `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
-            left join
-        `cloud`.`host` ON vm_instance.host_id = host.id
-            left join
-        `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
-            left join
-        `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
-            left join
-        `cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
-            left join
-        `cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
-            left join
-        `cloud`.`networks` ON nics.network_id = networks.id
-            left join
-        `cloud`.`vpc` ON domain_router.vpc_id = vpc.id and vpc.removed is null
-            left join
-        `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
-            and async_job.instance_type = 'DomainRouter'
-            and async_job.job_status = 0;
-
-
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (231, UUID(), 1, 'CentOS 5 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (232, UUID(), 1, 'CentOS 5 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (233, UUID(), 3, 'Oracle Enterprise Linux 5 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (234, UUID(), 3, 'Oracle Enterprise Linux 5 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (235, UUID(), 3, 'Oracle Enterprise Linux 6 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (236, UUID(), 3, 'Oracle Enterprise Linux 6 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (237, UUID(), 4, 'Red Hat Enterprise Linux 5 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (238, UUID(), 4, 'Red Hat Enterprise Linux 5 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (239, UUID(), 4, 'Red Hat Enterprise Linux 6 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (240, UUID(), 4, 'Red Hat Enterprise Linux 6 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (241, UUID(), 10, 'Ubuntu 14.04', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (244, UUID(), 5, 'SUSE Linux Enterprise Server 12 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (245, UUID(), 4, 'Red Hat Enterprise Linux 7', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (246, UUID(), 1, 'CentOS 7', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (247, UUID(), 3, 'Oracle Linux 7', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (248, UUID(), 1, 'CentOS 6 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (249, UUID(), 1, 'CentOS 6 (64-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (250, UUID(), 3, 'Oracle Enterprise Linux 6.5 (32-bit)', utc_timestamp());
-INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (251, UUID(), 3, 'Oracle Enterprise Linux 6.5 (64-bit)', utc_timestamp());
-
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.5 (32-bit)', 1, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.6 (32-bit)', 2, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.7 (32-bit)', 3, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 4.8 (32-bit)', 4, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 5, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 6, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 7, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 8, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 9, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 10, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 11, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 12, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 13, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 14, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 111, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 112, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 141, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 142, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 161, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 162, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 173, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 174, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 175, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 176, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 231, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 232, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (32-bit)', 139, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 5 (64-bit)', 140, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 143, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 144, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 177, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 178, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 179, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 180, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 171, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 172, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 181, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 182, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 227, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 228, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (32-bit)', 248, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 6 (64-bit)', 249, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'CentOS 7', 246, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (32-bit)', 132, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Squeeze 6.0 (64-bit)', 133, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (32-bit)', 183, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Debian Wheezy 7.0 (64-bit)', 184, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 16, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 17, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 18, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 19, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 20, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 21, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 22, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 23, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 24, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 25, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 134, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 135, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 145, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 146, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 207, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 208, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 209, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 210, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 211, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 212, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (32-bit)', 233, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 5 (64-bit)', 234, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 147, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 148, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 213, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 214, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 215, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 216, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 217, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 218, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 219, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 220, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 235, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 236, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (32-bit)', 250, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Enterprise Linux 6 (64-bit)', 251, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Oracle Linux 7', 247, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.5 (32-bit)', 26, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.6 (32-bit)', 27, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.7 (32-bit)', 28, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 4.8 (32-bit)', 29, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 30, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 31, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 32, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 33, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 34, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 35, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 36, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 37, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 38, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 39, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 113, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 114, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 149, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 150, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 189, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 190, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 191, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 192, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 193, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 194, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (32-bit)', 237, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 5 (64-bit)', 238, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 136, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 137, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 195, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 196, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 197, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 198, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 199, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 204, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 205, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 206, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 239, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 240, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 7', 245, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP1 (32-bit)', 41, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP1 (64-bit)', 42, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP2 (32-bit)', 43, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP2 (64-bit)', 44, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP3 (32-bit)', 151, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP3 (64-bit)', 45, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP4 (32-bit)', 153, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 10 SP4 (64-bit)', 152, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 (32-bit)', 46, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 (64-bit)', 47, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP1 (32-bit)', 155, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP1 (64-bit)', 154, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP2 (32-bit)', 186, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP2 (64-bit)', 185, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP3 (32-bit)', 188, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 11 SP3 (32-bit)', 187, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'SUSE Linux Enterprise Server 12 (64-bit)', 244, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 7 (32-bit)', 48, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 7 (64-bit)', 49, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 8 (32-bit)', 165, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows 8 (64-bit)', 166, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 50, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 51, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 87, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 88, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (32-bit)', 89, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2003 (64-bit)', 90, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 (32-bit)', 52, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 (64-bit)', 53, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2008 R2 (64-bit)', 54, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2012 (64-bit)', 167, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows Server 2012 R2 (64-bit)', 168, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Windows XP SP3 (32-bit)', 58, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Lucid Lynx 10.04 (32-bit)', 121, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Lucid Lynx 10.04 (64-bit)', 126, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)', 156, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)', 157, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Precise Pangolin 12.04 (32-bit)', 163, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Precise Pangolin 12.04 (64-bit)', 164, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Ubuntu Trusty Tahr 14.04', 241, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 169, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 170, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 98, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 99, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 60, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 103, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 200, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 201, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 59, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 100, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 202, utc_timestamp(), 0);
-INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Other install media', 203, utc_timestamp(), 0);
-
-
-INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, storage_motion_supported) VALUES (UUID(), 'XenServer', '6.5.0', 500, 1, 13, 1);
-
-update vlan set vlan_id=concat('vlan://', vlan_id) where vlan_type = "VirtualNetwork" and vlan_id not like "vlan://%";
-
-CREATE TABLE `cloud`.`baremetal_rct` (
-  `id` bigint unsigned UNIQUE AUTO_INCREMENT,
-  `uuid` varchar(40) UNIQUE NOT NULL,
-  `url` varchar(2048) NOT NULL,
-  `rct` text NOT NULL,
-   PRIMARY KEY (`id`)
-) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-
---Remove duplicates from guest_os_hypervisor table
-DELETE t1 FROM guest_os_hypervisor t1, guest_os_hypervisor t2 WHERE (t1.hypervisor_type = t2.hypervisor_type AND t1.hypervisor_version = t2.hypervisor_version AND t1.guest_os_id = t2.guest_os_id AND t1.id > t2.id AND t1.is_user_defined=0);
-
--- Set as removed built-in CentOS 5.3 template (if any) for XenServer, since CentOS 5.6 template already exists
-UPDATE `cloud`.`vm_template` SET removed=NOW() WHERE unique_name="centos53-x86_64" AND hypervisor_type="XenServer";
-
-ALTER TABLE `cloud_usage`.`usage_vpn_user` CHANGE `user_name` `user_name` VARCHAR(255);
-
---Increase key value size generated from RSA-8192 to be stored.
-ALTER TABLE `cloud`.`user_vm_details` MODIFY `value` VARCHAR(5120);
-
-UPDATE `cloud`.`host` SET resource = REPLACE(resource, 'com.cloud.hypervisor.xen.resource', 'com.cloud.hypervisor.xenserver.resource') WHERE hypervisor_type='XenServer' AND REMOVED IS NULL;
-
-INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured, cross_zones, hypervisor_type, extractable, state)
-    VALUES (11, UUID(), 'centos7-x86_64-lxc', 'CentOS 7(64-bit) no GUI (LXC)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/templates/builtin/centos-7-x86_64.tar.gz', 'c2c4fa2d0978121c7977db571f132d6e', 0, 'CentOS 7(64-bit) no GUI (LXC)', 'TAR', 246, 1, 1, 'LXC', 1, 'Active');

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/setup/db/db/schema-442to450-cleanup.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450-cleanup.sql b/setup/db/db/schema-442to450-cleanup.sql
new file mode 100644
index 0000000..33ad921
--- /dev/null
+++ b/setup/db/db/schema-442to450-cleanup.sql
@@ -0,0 +1,33 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+--
+-- Schema cleanup from 4.4.2 to 4.5.0
+--
+
+UPDATE `cloud`.`configuration`
+SET name = 'router.template.xenserver'
+Where name = 'router.template.xen';
+
+UPDATE `cloud`.`configuration`
+SET name = 'xenserver.nics.max',
+description = 'Maximum allowed nics for Vms created on XenServer'
+Where name = 'xen.nics.max';
+
+UPDATE `cloud`.`configuration`
+SET value = 'XenServer'
+Where value = 'Xen';
\ No newline at end of file


[21/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7949: Fixing issue in test_base_image_updation.py

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6eb4a40a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6eb4a40a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6eb4a40a

Branch: refs/heads/useraccount-refactoring
Commit: 6eb4a40afe743e4a200730073e084a4d11026219
Parents: 50ab04d
Author: Ashutosh K <as...@clogeny.com>
Authored: Thu Nov 20 12:26:22 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:43:07 2014 +0530

----------------------------------------------------------------------
 .../component/test_base_image_updation.py            | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6eb4a40a/test/integration/component/test_base_image_updation.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py
index 8288f2c..2f92bd2 100644
--- a/test/integration/component/test_base_image_updation.py
+++ b/test/integration/component/test_base_image_updation.py
@@ -26,7 +26,6 @@
 
 #Import Local Modules
 from marvin.codes import (PASS,
-                          FAIL,
                           RECURRING)
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import cloudstackTestCase
@@ -441,7 +440,7 @@ class TestBaseImageUpdate(cloudstackTestCase):
                                                                 template.id
                                                                 ))
                 template.download(self.apiclient)
-                self.cleanup.append(template)
+                self._cleanup.append(template)
 
                 # Wait for template status to be changed across
                 time.sleep(self.services["sleep"])
@@ -650,13 +649,13 @@ class TestBaseImageUpdate(cloudstackTestCase):
                    Here we are passing root disk id of vm before reboot which does not exist hence\
                    listing should fail")
 
-        try:
+        with self.assertRaises(Exception):
             listSnapshotPolicies = SnapshotPolicy.list(
                                         self.apiclient,
                                         volumeid=vm_with_reset_root_disk_id)
-        except Exception as e:
-            self.fail("Failed to list snapshot policies: %s" % e)
-
-        self.assertEqual(validateList(listSnapshotPolicies)[0], FAIL,\
-                "Snapshot policies list should be empty")
+            self.assertEqual(
+                    validateList(listSnapshotPolicies)[0],
+                    PASS,
+                    "snapshot policies list validation failed"
+                    )
         return


[39/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7981: listVirtualMachine is too slow in case of duplicate
    resource tags due to joining user_vm_details to user_vm_view.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e7af26c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e7af26c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e7af26c

Branch: refs/heads/useraccount-refactoring
Commit: 4e7af26c9fcdb3914c577c743fd83c8f7b8ef424
Parents: d5761ea
Author: Min Chen <mi...@citrix.com>
Authored: Fri Nov 21 18:38:33 2014 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Wed Nov 26 17:23:07 2014 -0800

----------------------------------------------------------------------
 .../cloudstack/api/response/UserVmResponse.java |   7 +
 server/src/com/cloud/api/ApiDBUtils.java        |   7 +-
 .../cloud/api/query/dao/ResourceTagJoinDao.java |   2 +
 .../api/query/dao/ResourceTagJoinDaoImpl.java   |   9 +
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   4 +-
 .../com/cloud/api/query/vo/UserVmJoinVO.java    |  77 --------
 setup/db/db/schema-442to450.sql                 | 192 +++++++++++++++++++
 7 files changed, 213 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
index 9fe3475..1f55f5b 100644
--- a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
@@ -240,6 +240,8 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
     @Param(description = "the list of resource tags associated with vm", responseObject = ResourceTagResponse.class)
     private Set<ResourceTagResponse> tags;
 
+    transient Set<Long> tagIds;
+
     @SerializedName(ApiConstants.DETAILS)
     @Param(description = "Vm details in key/value pairs.", since = "4.2.1")
     private Map details;
@@ -272,6 +274,7 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
         securityGroupList = new LinkedHashSet<SecurityGroupResponse>();
         nics = new LinkedHashSet<NicResponse>();
         tags = new LinkedHashSet<ResourceTagResponse>();
+        tagIds = new LinkedHashSet<Long>();
         affinityGroupList = new LinkedHashSet<AffinityGroupResponse>();
     }
 
@@ -723,6 +726,10 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
         this.instanceName = instanceName;
     }
 
+    public boolean containTag(Long tagId) {
+        return tagIds.contains(tagId);
+    }
+
     public void setTags(Set<ResourceTagResponse> tags) {
         this.tags = tags;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index bd974f9..b6eb757 100644
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -1629,12 +1629,7 @@ public class ApiDBUtils {
     }
 
     public static ResourceTagJoinVO findResourceTagViewById(Long tagId) {
-        List<ResourceTagJoinVO> tags = s_tagJoinDao.searchByIds(tagId);
-        if (tags != null && tags.size() > 0) {
-            return tags.get(0);
-        } else {
-            return null;
-        }
+        return s_tagJoinDao.searchById(tagId);
     }
 
     public static EventResponse newEventResponse(EventJoinVO ve) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/server/src/com/cloud/api/query/dao/ResourceTagJoinDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ResourceTagJoinDao.java b/server/src/com/cloud/api/query/dao/ResourceTagJoinDao.java
index 1524705..329d927 100644
--- a/server/src/com/cloud/api/query/dao/ResourceTagJoinDao.java
+++ b/server/src/com/cloud/api/query/dao/ResourceTagJoinDao.java
@@ -34,4 +34,6 @@ public interface ResourceTagJoinDao extends GenericDao<ResourceTagJoinVO, Long>
     List<ResourceTagJoinVO> searchByIds(Long... ids);
 
     List<ResourceTagJoinVO> listBy(String resourceUUID, ResourceObjectType resourceType);
+
+    ResourceTagJoinVO searchById(Long id);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
index 27d3787..a496753 100644
--- a/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
@@ -146,6 +146,15 @@ public class ResourceTagJoinDaoImpl extends GenericDaoBase<ResourceTagJoinVO, Lo
     }
 
     @Override
+    public ResourceTagJoinVO searchById(Long id) {
+        SearchCriteria<ResourceTagJoinVO> sc = tagIdSearch.create();
+        sc.setParameters("id", id);
+        List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);
+        assert vms != null && vms.size() == 1 : "No tag found for tag id " + id;
+        return vms.get(0);
+    }
+
+    @Override
     public ResourceTagJoinVO newResourceTagView(ResourceTag vr) {
 
         SearchCriteria<ResourceTagJoinVO> sc = tagIdSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index 779ddb4..f142048 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -262,7 +262,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
 
         // update tag information
         long tag_id = userVm.getTagId();
-        if (tag_id > 0) {
+        if (tag_id > 0 && !userVmResponse.containTag(tag_id)) {
             ResourceTagJoinVO vtag = ApiDBUtils.findResourceTagViewById(tag_id);
             if (vtag != null) {
                 userVmResponse.addTag(ApiDBUtils.newResourceTagResponse(vtag, false));
@@ -350,7 +350,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
         }
 
         long tag_id = uvo.getTagId();
-        if (tag_id > 0) {
+        if (tag_id > 0 && !userVmData.containTag(tag_id)) {
             ResourceTagJoinVO vtag = ApiDBUtils.findResourceTagViewById(tag_id);
             if (vtag != null) {
                 userVmData.addTag(ApiDBUtils.newResourceTagResponse(vtag, false));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
index f3f48fc..2b0b155 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -31,7 +31,6 @@ import javax.persistence.Transient;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Networks.TrafficType;
-import com.cloud.server.ResourceTag.ResourceObjectType;
 import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.storage.Volume;
 import com.cloud.utils.db.GenericDao;
@@ -346,34 +345,6 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
     @Column(name = "tag_id")
     private long tagId;
 
-    @Column(name = "tag_uuid")
-    private String tagUuid;
-
-    @Column(name = "tag_key")
-    private String tagKey;
-
-    @Column(name = "tag_value")
-    private String tagValue;
-
-    @Column(name = "tag_domain_id")
-    private long tagDomainId;
-
-    @Column(name = "tag_account_id")
-    private long tagAccountId;
-
-    @Column(name = "tag_resource_id")
-    private long tagResourceId;
-
-    @Column(name = "tag_resource_uuid")
-    private String tagResourceUuid;
-
-    @Column(name = "tag_resource_type")
-    @Enumerated(value = EnumType.STRING)
-    private ResourceObjectType tagResourceType;
-
-    @Column(name = "tag_customer")
-    private String tagCustomer;
-
     @Column(name = "affinity_group_id")
     private long affinityGroupId;
 
@@ -397,11 +368,6 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
     @Column(name = "dynamically_scalable")
     private boolean isDynamicallyScalable;
 
-    @Column(name = "detail_name")
-    private String detailName;
-
-    @Column(name = "detail_value")
-    private String detailValue;
 
     public UserVmJoinVO() {
     }
@@ -780,42 +746,6 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
         return tagId;
     }
 
-    public String getTagUuid() {
-        return tagUuid;
-    }
-
-    public String getTagKey() {
-        return tagKey;
-    }
-
-    public String getTagValue() {
-        return tagValue;
-    }
-
-    public long getTagDomainId() {
-        return tagDomainId;
-    }
-
-    public long getTagAccountId() {
-        return tagAccountId;
-    }
-
-    public long getTagResourceId() {
-        return tagResourceId;
-    }
-
-    public String getTagResourceUuid() {
-        return tagResourceUuid;
-    }
-
-    public ResourceObjectType getTagResourceType() {
-        return tagResourceType;
-    }
-
-    public String getTagCustomer() {
-        return tagCustomer;
-    }
-
     public boolean isLimitCpuUse() {
         return limitCpuUse;
     }
@@ -902,13 +832,6 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
         return isDynamicallyScalable;
     }
 
-    public String getDetailName() {
-        return detailName;
-    }
-
-    public String getDetailValue() {
-        return detailValue;
-    }
 
     @Override
     public Class<?> getEntityType() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e7af26c/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 70b7b7d..107f10c 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -543,6 +543,198 @@ CREATE VIEW `cloud`.`domain_router_view` AS
             and async_job.instance_type = 'DomainRouter'
             and async_job.job_status = 0;
 
+DROP VIEW IF EXISTS `cloud`.`user_vm_view`;
+CREATE VIEW `cloud`.`user_vm_view` AS
+    select
+        vm_instance.id id,
+        vm_instance.name name,
+        user_vm.display_name display_name,
+        user_vm.user_data user_data,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        instance_group.id instance_group_id,
+        instance_group.uuid instance_group_uuid,
+        instance_group.name instance_group_name,
+        vm_instance.uuid uuid,
+        vm_instance.last_host_id last_host_id,
+        vm_instance.vm_type type,
+        vm_instance.vnc_password vnc_password,
+        vm_instance.limit_cpu_use limit_cpu_use,
+        vm_instance.created created,
+        vm_instance.state state,
+        vm_instance.removed removed,
+        vm_instance.ha_enabled ha_enabled,
+        vm_instance.hypervisor_type hypervisor_type,
+        vm_instance.instance_name instance_name,
+        vm_instance.guest_os_id guest_os_id,
+        vm_instance.display_vm display_vm,
+        guest_os.uuid guest_os_uuid,
+        vm_instance.pod_id pod_id,
+        host_pod_ref.uuid pod_uuid,
+        vm_instance.private_ip_address private_ip_address,
+        vm_instance.private_mac_address private_mac_address,
+        vm_instance.vm_type vm_type,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.is_security_group_enabled security_group_enabled,
+        data_center.networktype data_center_type,
+        host.id host_id,
+        host.uuid host_uuid,
+        host.name host_name,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        vm_template.name template_name,
+        vm_template.display_text template_display_text,
+        vm_template.enable_password password_enabled,
+        iso.id iso_id,
+        iso.uuid iso_uuid,
+        iso.name iso_name,
+        iso.display_text iso_display_text,
+        service_offering.id service_offering_id,
+        svc_disk_offering.uuid service_offering_uuid,
+        disk_offering.uuid disk_offering_uuid,
+        disk_offering.id disk_offering_id,
+        Case
+             When (`cloud`.`service_offering`.`cpu` is null) then (`custom_cpu`.`value`)
+             Else ( `cloud`.`service_offering`.`cpu`)
+        End as `cpu`,
+        Case
+            When (`cloud`.`service_offering`.`speed` is null) then (`custom_speed`.`value`)
+            Else ( `cloud`.`service_offering`.`speed`)
+        End as `speed`,
+        Case
+            When (`cloud`.`service_offering`.`ram_size` is null) then (`custom_ram_size`.`value`)
+            Else ( `cloud`.`service_offering`.`ram_size`)
+        END as `ram_size`,
+        svc_disk_offering.name service_offering_name,
+        disk_offering.name disk_offering_name,
+        storage_pool.id pool_id,
+        storage_pool.uuid pool_uuid,
+        storage_pool.pool_type pool_type,
+        volumes.id volume_id,
+        volumes.uuid volume_uuid,
+        volumes.device_id volume_device_id,
+        volumes.volume_type volume_type,
+        security_group.id security_group_id,
+        security_group.uuid security_group_uuid,
+        security_group.name security_group_name,
+        security_group.description security_group_description,
+        nics.id nic_id,
+        nics.uuid nic_uuid,
+        nics.network_id network_id,
+        nics.ip4_address ip_address,
+        nics.ip6_address ip6_address,
+        nics.ip6_gateway ip6_gateway,
+        nics.ip6_cidr ip6_cidr,
+        nics.default_nic is_default_nic,
+        nics.gateway gateway,
+        nics.netmask netmask,
+        nics.mac_address mac_address,
+        nics.broadcast_uri broadcast_uri,
+        nics.isolation_uri isolation_uri,
+        vpc.id vpc_id,
+        vpc.uuid vpc_uuid,
+        networks.uuid network_uuid,
+        networks.name network_name,
+        networks.traffic_type traffic_type,
+        networks.guest_type guest_type,
+        user_ip_address.id public_ip_id,
+        user_ip_address.uuid public_ip_uuid,
+        user_ip_address.public_ip_address public_ip_address,
+        ssh_keypairs.keypair_name keypair_name,
+        resource_tags.id tag_id,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id,
+        affinity_group.id affinity_group_id,
+        affinity_group.uuid affinity_group_uuid,
+        affinity_group.name affinity_group_name,
+        affinity_group.description affinity_group_description,
+        vm_instance.dynamically_scalable dynamically_scalable
+
+    from
+        `cloud`.`user_vm`
+            inner join
+        `cloud`.`vm_instance` ON vm_instance.id = user_vm.id
+            and vm_instance.removed is NULL
+            inner join
+        `cloud`.`account` ON vm_instance.account_id = account.id
+            inner join
+        `cloud`.`domain` ON vm_instance.domain_id = domain.id
+            left join
+        `cloud`.`guest_os` ON vm_instance.guest_os_id = guest_os.id
+            left join
+        `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`instance_group_vm_map` ON vm_instance.id = instance_group_vm_map.instance_id
+            left join
+        `cloud`.`instance_group` ON instance_group_vm_map.group_id = instance_group.id
+            left join
+        `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+            left join
+        `cloud`.`host` ON vm_instance.host_id = host.id
+            left join
+        `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+            left join
+        `cloud`.`vm_template` iso ON iso.id = user_vm.iso_id
+            left join
+        `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+            left join
+        `cloud`.`disk_offering` svc_disk_offering ON vm_instance.service_offering_id = svc_disk_offering.id
+            left join
+        `cloud`.`disk_offering` ON vm_instance.disk_offering_id = disk_offering.id
+            left join
+        `cloud`.`volumes` ON vm_instance.id = volumes.instance_id
+            left join
+        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+            left join
+        `cloud`.`security_group_vm_map` ON vm_instance.id = security_group_vm_map.instance_id
+            left join
+        `cloud`.`security_group` ON security_group_vm_map.security_group_id = security_group.id
+            left join
+        `cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
+            left join
+        `cloud`.`networks` ON nics.network_id = networks.id
+            left join
+        `cloud`.`vpc` ON networks.vpc_id = vpc.id and vpc.removed is null
+            left join
+        `cloud`.`user_ip_address` ON user_ip_address.vm_id = vm_instance.id
+            left join
+        `cloud`.`user_vm_details` as ssh_details ON ssh_details.vm_id = vm_instance.id
+            and ssh_details.name = 'SSH.PublicKey'
+            left join
+        `cloud`.`ssh_keypairs` ON ssh_keypairs.public_key = ssh_details.value
+            left join
+        `cloud`.`resource_tags` ON resource_tags.resource_id = vm_instance.id
+            and resource_tags.resource_type = 'UserVm'
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+            and async_job.instance_type = 'VirtualMachine'
+            and async_job.job_status = 0
+            left join
+        `cloud`.`affinity_group_vm_map` ON vm_instance.id = affinity_group_vm_map.instance_id
+            left join
+        `cloud`.`affinity_group` ON affinity_group_vm_map.affinity_group_id = affinity_group.id
+            left join
+        `cloud`.`user_vm_details` `custom_cpu`  ON (((`custom_cpu`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_cpu`.`name` = 'CpuNumber')))
+            left join
+        `cloud`.`user_vm_details` `custom_speed`  ON (((`custom_speed`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_speed`.`name` = 'CpuSpeed')))
+           left join
+        `cloud`.`user_vm_details` `custom_ram_size`  ON (((`custom_ram_size`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_ram_size`.`name` = 'memory')));        
+
 
 INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (231, UUID(), 1, 'CentOS 5 (32-bit)', utc_timestamp());
 INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (232, UUID(), 1, 'CentOS 5 (64-bit)', utc_timestamp());


[35/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Add support for RHEL 6.5 and relevant hypervisor mappings


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3d6635a5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3d6635a5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3d6635a5

Branch: refs/heads/useraccount-refactoring
Commit: 3d6635a537ca33e6d8d2643c768e31742c001f99
Parents: 837a17b
Author: amoghvk <am...@citrix.com>
Authored: Wed Nov 26 14:21:21 2014 -0800
Committer: amoghvk <am...@citrix.com>
Committed: Wed Nov 26 14:21:21 2014 -0800

----------------------------------------------------------------------
 setup/db/db/schema-442to450.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3d6635a5/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 843b8d0..70b7b7d 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -768,3 +768,22 @@ UPDATE `cloud`.`host` SET resource = REPLACE(resource, 'com.cloud.hypervisor.xen
 
 INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured, cross_zones, hypervisor_type, extractable, state)
     VALUES (11, UUID(), 'centos7-x86_64-lxc', 'CentOS 7(64-bit) no GUI (LXC)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/templates/builtin/centos-7-x86_64.tar.gz', 'c2c4fa2d0978121c7977db571f132d6e', 0, 'CentOS 7(64-bit) no GUI (LXC)', 'TAR', 246, 1, 1, 'LXC', 1, 'Active');
+
+--Support for RHEL 6.5 in relevant hypervisor versions
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (252, UUID(), 4, 'Red Hat Enterprise Linux 6.5 (32-bit)', utc_timestamp());
+INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (253, UUID(), 4, 'Red Hat Enterprise Linux 6.5 (64-bit)', utc_timestamp());
+
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Red Hat Enterprise Linux 6.5', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Red Hat Enterprise Linux 6.5', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'LXC', 'default', 'Red Hat Enterprise Linux 6.5', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'LXC', 'default', 'Red Hat Enterprise Linux 6.5', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (32-bit)', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '6.5.0', 'Red Hat Enterprise Linux 6 (64-bit)', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '4.1', 'rhel6Guest', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '4.1', 'rhel6_64Guest', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.0', 'rhel6Guest', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.0', 'rhel6_64Guest', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.1', 'rhel6Guest', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.1', 'rhel6_64Guest', 253, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.5', 'rhel6Guest', 252, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5,5', 'rhel6_64Guest', 253, utc_timestamp(), 0);


[26/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7865:Wrongly skipping the test if the local storage is enabled.

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8cca0b22
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8cca0b22
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8cca0b22

Branch: refs/heads/useraccount-refactoring
Commit: 8cca0b224de440b5eef905be28bb8d0686eaa962
Parents: 6ad2f38
Author: SrikanteswaraRao Talluri <ta...@apache.org>
Authored: Tue Nov 25 19:14:17 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 19:22:11 2014 +0530

----------------------------------------------------------------------
 test/integration/component/maint/test_bugs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cca0b22/test/integration/component/maint/test_bugs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/test_bugs.py b/test/integration/component/maint/test_bugs.py
index 24dbee2..f68c244 100644
--- a/test/integration/component/maint/test_bugs.py
+++ b/test/integration/component/maint/test_bugs.py
@@ -169,7 +169,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
         step4: check whether the data disk created in step3 is created on
         local storage with tag 'loc'
         """
-        if self.zone.localstorageenabled:
+        if not self.zone.localstorageenabled:
             self.skipTest('Local storage is not enable for this '
                           'zone. skipping')
 


[09/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Merge remote-tracking branch 'origin/inetaddress'

- Tested locally against unit tests
- TravisCI build passed: https://travis-ci.org/apache/cloudstack/builds/41990351
- Manual QA passed for basic auth and saml auth using default IDP settings

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

Conflicts:
	server/src/com/cloud/api/ApiServlet.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7ff31f1b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7ff31f1b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7ff31f1b

Branch: refs/heads/useraccount-refactoring
Commit: 7ff31f1b223fbc54d04a0610013dfdd76a618ed8
Parents: 4e5b3d0 72ba98b
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 25 14:31:23 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 25 14:32:09 2014 +0530

----------------------------------------------------------------------
 .../apache/cloudstack/api/ApiServerService.java |  3 +-
 .../cloudstack/api/auth/APIAuthenticator.java   |  3 +-
 .../contrail/management/MockAccountManager.java |  3 +-
 .../command/GetServiceProviderMetaDataCmd.java  |  3 +-
 .../command/SAML2LoginAPIAuthenticatorCmd.java  |  3 +-
 .../command/SAML2LogoutAPIAuthenticatorCmd.java |  3 +-
 .../GetServiceProviderMetaDataCmdTest.java      |  6 ++--
 .../SAML2LoginAPIAuthenticatorCmdTest.java      |  5 +--
 .../SAML2LogoutAPIAuthenticatorCmdTest.java     |  3 +-
 pom.xml                                         |  6 ++++
 server/src/com/cloud/api/ApiServer.java         |  2 +-
 server/src/com/cloud/api/ApiServlet.java        |  7 +++--
 .../auth/DefaultLoginAPIAuthenticatorCmd.java   |  3 +-
 .../auth/DefaultLogoutAPIAuthenticatorCmd.java  |  3 +-
 server/src/com/cloud/user/AccountManager.java   |  3 +-
 .../src/com/cloud/user/AccountManagerImpl.java  | 12 +++-----
 server/test/com/cloud/api/ApiServletTest.java   | 14 +++++----
 .../com/cloud/user/MockAccountManagerImpl.java  |  3 +-
 utils/pom.xml                                   |  4 +++
 utils/src/com/cloud/utils/net/NetUtils.java     | 32 ++------------------
 20 files changed, 60 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiServer.java
index b335a66,435efa0..435efa0
mode 100644,100755..100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiServlet.java
index e1f7927,a4266f7..3c73375
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@@ -18,10 -18,8 +18,11 @@@ package com.cloud.api
  
  import java.io.UnsupportedEncodingException;
  import java.net.URLDecoder;
 +import java.util.Arrays;
 +import java.util.Collections;
+ import java.net.InetAddress;
  import java.util.HashMap;
 +import java.util.List;
  import java.util.Map;
  
  import javax.inject.Inject;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/user/AccountManager.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/user/AccountManager.java
index 194c5d2,7b9e093..7b9e093
mode 100644,100755..100644
--- a/server/src/com/cloud/user/AccountManager.java
+++ b/server/src/com/cloud/user/AccountManager.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/user/AccountManagerImpl.java
index 3c00f91,f816ee4..f816ee4
mode 100644,100755..100644
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/test/com/cloud/api/ApiServletTest.java
----------------------------------------------------------------------
diff --cc server/test/com/cloud/api/ApiServletTest.java
index 2089477,1d20bdf..57caa44
--- a/server/test/com/cloud/api/ApiServletTest.java
+++ b/server/test/com/cloud/api/ApiServletTest.java
@@@ -84,10 -83,9 +86,10 @@@ public class ApiServletTest 
  
      ApiServlet servlet;
  
 +    @SuppressWarnings("unchecked")
      @Before
      public void setup() throws SecurityException, NoSuchFieldException,
-             IllegalArgumentException, IllegalAccessException, IOException {
+             IllegalArgumentException, IllegalAccessException, IOException, UnknownHostException {
          servlet = new ApiServlet();
          responseWriter = new StringWriter();
          Mockito.when(response.getWriter()).thenReturn(
@@@ -196,9 -194,8 +198,9 @@@
                  Mockito.any(StringBuilder.class));
      }
  
 +    @SuppressWarnings("unchecked")
      @Test
-     public void processRequestInContextLogout() {
+     public void processRequestInContextLogout() throws UnknownHostException {
          Mockito.when(request.getMethod()).thenReturn("GET");
          Mockito.when(request.getSession(Mockito.anyBoolean())).thenReturn(
                  session);
@@@ -237,37 -234,6 +239,37 @@@
  
          Mockito.verify(authManager).getAPIAuthenticator("login");
          Mockito.verify(authenticator).authenticate(Mockito.anyString(), Mockito.anyMap(), Mockito.isA(HttpSession.class),
-                 Mockito.anyString(), Mockito.anyString(), Mockito.isA(StringBuilder.class), Mockito.isA(HttpServletResponse.class));
+                 Mockito.eq(InetAddress.getByName("127.0.0.1")), Mockito.anyString(), Mockito.isA(StringBuilder.class), Mockito.isA(HttpServletResponse.class));
      }
 +
 +    @Test
 +    public void getClientAddressWithXForwardedFor() {
 +        Mockito.when(request.getHeader(Mockito.eq("X-Forwarded-For"))).thenReturn("192.168.1.1");
 +        Assert.assertEquals("192.168.1.1", ApiServlet.getClientAddress(request));
 +    }
 +
 +    @Test
 +    public void getClientAddressWithHttpXForwardedFor() {
 +        Mockito.when(request.getHeader(Mockito.eq("HTTP_X_FORWARDED_FOR"))).thenReturn("192.168.1.1");
 +        Assert.assertEquals("192.168.1.1", ApiServlet.getClientAddress(request));
 +    }
 +
 +    @Test
 +    public void getClientAddressWithXRemoteAddr() {
 +        Mockito.when(request.getHeader(Mockito.eq("Remote_Addr"))).thenReturn("192.168.1.1");
 +        Assert.assertEquals("192.168.1.1", ApiServlet.getClientAddress(request));
 +    }
 +
 +    @Test
 +    public void getClientAddressWithHttpClientIp() {
 +        Mockito.when(request.getHeader(Mockito.eq("HTTP_CLIENT_IP"))).thenReturn("192.168.1.1");
 +        Assert.assertEquals("192.168.1.1", ApiServlet.getClientAddress(request));
 +    }
 +
 +    @Test
 +    public void getClientAddressDefault() {
 +        Mockito.when(request.getRemoteAddr()).thenReturn("127.0.0.1");
 +        Assert.assertEquals("127.0.0.1", ApiServlet.getClientAddress(request));
 +    }
 +
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/utils/src/com/cloud/utils/net/NetUtils.java
----------------------------------------------------------------------
diff --cc utils/src/com/cloud/utils/net/NetUtils.java
index 1f41825,8875bb9..8875bb9
mode 100644,100755..100644
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java


[11/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7915: Remove hard-coded values for Load Balancer algorithms in UI

Signed-off-by: Rajani Karuturi <ra...@gmail.com>
(cherry picked from commit ba6dfd84702eeef0362b94068add1328db84133a)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/93f82134
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93f82134
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93f82134

Branch: refs/heads/useraccount-refactoring
Commit: 93f82134129756946dabf90f05262cccb576d33c
Parents: 02ca6f2
Author: Daniel Vega <da...@corp.globo.com>
Authored: Mon Nov 17 16:18:55 2014 -0200
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Tue Nov 25 15:55:44 2014 +0530

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  8 +--
 .../classes/resources/messages_ar.properties    |  4 +-
 .../classes/resources/messages_es.properties    |  4 +-
 .../classes/resources/messages_fr_FR.properties |  6 +-
 .../classes/resources/messages_it_IT.properties |  4 +-
 .../classes/resources/messages_ja_JP.properties |  8 +--
 .../classes/resources/messages_ko_KR.properties |  6 +-
 .../classes/resources/messages_nb_NO.properties |  6 +-
 .../classes/resources/messages_nl_NL.properties |  6 +-
 .../classes/resources/messages_pl.properties    |  2 +-
 .../classes/resources/messages_pt_BR.properties |  6 +-
 .../classes/resources/messages_ru_RU.properties |  6 +-
 .../classes/resources/messages_zh_CN.properties |  8 +--
 ui/dictionary.jsp                               |  5 +-
 ui/scripts/network.js                           | 65 +++++++++++++-------
 ui/scripts/vpc.js                               | 12 ++--
 16 files changed, 88 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 029ed0a..3228578 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -741,8 +741,10 @@ label.latest.events=Latest events
 label.launch.vm=Launch VM
 label.launch.zone=Launch zone
 label.launch=Launch
+label.lb.algorithm.leastconn=Least connections
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=Source
 label.LB.isolation=LB isolation
-label.least.connections=Least connections
 label.level=Level
 label.linklocal.ip=Link Local IP Address
 label.load.balancer=Load Balancer
@@ -1029,7 +1031,6 @@ label.role=Role
 label.root.certificate=Root certificate
 label.root.disk.controller=Root disk controller
 label.root.disk.offering=Root Disk Offering
-label.round.robin=Round-robin
 label.rules=Rules
 label.running.vms=Running VMs
 label.s3.access_key=Access Key
@@ -1090,7 +1091,6 @@ label.snapshot.schedule=Setup Recurring Snapshot
 label.snapshot=Snapshot
 label.snapshots=Snapshots
 label.source.nat=Source NAT
-label.source=Source
 label.specify.IP.ranges=Specify IP ranges
 label.specify.vlan=Specify VLAN
 label.specify.vxlan=Specify VXLAN
@@ -2075,4 +2075,4 @@ label.add.baremetal.rack.configuration=Add Baremetal Rack Configuration
 label.delete.baremetal.rack.configuration=Delete Baremetal Rack Configuration
 message.confirm.delete.baremetal.rack.configuration=Please confirm that you want to delete Baremetal Rack Configuration.
 message.added.new.nuage.vsp.controller=Added new Nuage Vsp Controller
-message.added.vpc.offering=Added VPC offering
\ No newline at end of file
+message.added.vpc.offering=Added VPC offering

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_ar.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_ar.properties b/client/WEB-INF/classes/resources/messages_ar.properties
index 213a2ebc..de90c43 100644
--- a/client/WEB-INF/classes/resources/messages_ar.properties
+++ b/client/WEB-INF/classes/resources/messages_ar.properties
@@ -98,7 +98,8 @@ label.invite.to=\u062f\u0639\u0648\u0629 \u0644\u0640
 label.IPsec.preshared.key=\u0645\u0641\u062a\u0627\u062d \u0623\u0645\u0646 \u0628\u0631\u0648\u062a\u0648\u0643\u0648\u0644 \u0627\u0644\u0625\u0646\u062a\u0631\u0646\u062a \u062a\u0645\u062a \u0645\u0634\u0627\u0631\u0643\u062a\u0647 \u0645\u0633\u0628\u0642\u0627
 label.isolation.uri=\u0639\u0632\u0644 \u0627\u0644\u0631\u0627\u0628\u0637
 label.keyboard.type=\u0646\u0648\u0639 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d
-label.least.connections=\u0623\u0642\u0644 \u0627\u0644\u0625\u062a\u0635\u0627\u0644\u0627\u062a
+label.lb.algorithm.leastconn=\u0623\u0642\u0644 \u0627\u0644\u0625\u062a\u0635\u0627\u0644\u0627\u062a
+label.lb.algorithm.source=\u0645\u0635\u062f\u0631
 label.local.storage.enabled=\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u062a\u062e\u0632\u064a\u0646 \u0627\u0644\u0645\u062d\u0644\u064a
 label.make.project.owner=\u062c\u0639\u0644 \u0627\u0644\u062d\u0633\u0627\u0628 \u0645\u0627\u0644\u0643 \u0644\u0644\u0645\u0634\u0631\u0648\u0639
 label.max.guest.limit=\u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0627\u0621 \u0644\u0636\u064a\u0641
@@ -179,7 +180,6 @@ label.select-view=\u062d\u062f\u062f \u0637\u0631\u064a\u0642\u0629 \u0627\u0644
 label.service.capabilities=\u0642\u062f\u0631\u0627\u062a \u0627\u0644\u062e\u062f\u0645\u0629
 label.setup=\u0627\u0644\u062a\u062b\u0628\u064a\u062a
 label.site.to.site.VPN=\u0645\u0648\u0642\u0639 \u0625\u0644\u0649 \u0645\u0648\u0642\u0639-\u0627\u0644\u0634\u0628\u0643\u0629 \u0627\u0644\u0634\u062e\u0635\u064a\u0629 \u0627\u0644\u0638\u0627\u0647\u0631\u064a\u0629  VPN
-label.source=\u0645\u0635\u062f\u0631
 label.specify.IP.ranges=\u062a\u062d\u062f\u064a\u062f \u0646\u0637\u0627\u0642\u0627\u062a IP
 label.sticky.tablesize=\u062d\u062c\u0645 \u0627\u0644\u062c\u062f\u0648\u0644
 label.stop=\u062a\u0648\u0642\u0641

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_es.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_es.properties b/client/WEB-INF/classes/resources/messages_es.properties
index 2ee04e9..21b1c14 100644
--- a/client/WEB-INF/classes/resources/messages_es.properties
+++ b/client/WEB-INF/classes/resources/messages_es.properties
@@ -544,6 +544,8 @@ label.last.name=Apellido
 label.latest.events=\u00daltimos eventos
 label.launch=Lanzar
 label.launch.vm=Lanzar maquina virtual
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=Fuente
 label.level=Nivel
 label.load.balancer=equilibrador de carga
 label.load.balancing=Balanceador de Carga
@@ -758,7 +760,6 @@ label.restart.vpc=Reiniciar VPC
 label.restore=Restaurar
 label.role=Papel
 label.root.disk.offering=Root Disco Offering
-label.round.robin=Round-robin
 label.routing=Enrutamiento
 label.rules=Reglas
 label.running.vms=Ejecuci\u00c3\u00b3n de m\u00c3\u00a1quinas virtuales
@@ -807,7 +808,6 @@ label.snapshot.schedule=Lista de instant\u00c3\u00a1neas
 label.snapshot.s=Instant\u00c3\u00a1nea (s)
 label.snapshots=instant\u00c3\u00a1neas
 label.sockets=Sockets
-label.source=Fuente
 label.source.nat=NAT Fuente
 label.specify.vlan=Especifique VLAN
 label.specify.vxlan=Especifique VXLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_fr_FR.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_fr_FR.properties b/client/WEB-INF/classes/resources/messages_fr_FR.properties
index d78e84e..54dc621 100644
--- a/client/WEB-INF/classes/resources/messages_fr_FR.properties
+++ b/client/WEB-INF/classes/resources/messages_fr_FR.properties
@@ -859,11 +859,13 @@ label.latest.events=Derniers \u00e9v\u00e9nements
 label.launch=D\u00e9marrer
 label.launch.vm=D\u00e9marrer VM
 label.launch.zone=D\u00e9marrer la zone
+label.lb.algorithm.round.robin=Al\u00e9atoire
+label.lb.algorithm.leastconn=Le moins de connexions
+label.lb.algorithm.source=Origine
 label.LB.isolation=R\u00e9partition de charge isol\u00e9e
 label.ldap.configuration=Configuration LDAP
 label.ldap.group.name=Groupe LDAP
 label.ldap.port=Port LDAP
-label.least.connections=Le moins de connexions
 label.level=Niveau
 label.linklocal.ip=Adresse IP lien local
 label.load.balancer=R\u00e9partiteur de charge
@@ -1227,7 +1229,6 @@ label.root.certificate=Certificat racine
 label.root.disk.controller=Contr\u00f4leur de disque principal
 label.root.disk.offering=Offre de disque racine
 label.root.disk.size=Taille disque principal
-label.round.robin=Al\u00e9atoire
 label.router.vm.scaled.up=VM Routeur agrandi
 label.routing.host=H\u00f4te de routage
 label.routing=Routage
@@ -1314,7 +1315,6 @@ label.sockets=Sockets
 label.source.ip.address=Adresse IP source
 label.source.nat=NAT Source
 label.source.nat.supported=Source NAT support\u00e9
-label.source=Origine
 label.source.port=Port Source
 label.specify.IP.ranges=Sp\u00e9cifier des plages IP
 label.specify.vlan=Pr\u00e9ciser le VLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_it_IT.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_it_IT.properties b/client/WEB-INF/classes/resources/messages_it_IT.properties
index 779906b..1e5641f 100644
--- a/client/WEB-INF/classes/resources/messages_it_IT.properties
+++ b/client/WEB-INF/classes/resources/messages_it_IT.properties
@@ -408,6 +408,8 @@ label.label=Label
 label.latest.events=Ultimi eventi
 label.launch=Avvio
 label.launch.vm=Avviare una VM
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=Sorgente
 label.LB.isolation=Isolamento di LB
 label.load.balancing=Bilanciamento di Carico
 label.load.balancing.policies=Politiche di Bilanciamento di Carico
@@ -520,7 +522,6 @@ label.restore=Restore
 label.review=Riesaminare
 label.revoke.project.invite=Revocare un invit
 label.root.disk.controller=Controller del disco root
-label.round.robin=Round-robin
 label.rules=Regole
 label.s3.access_key=Access Key
 label.s3.connection_timeout=Tempo di scadenza connessione
@@ -553,7 +554,6 @@ label.set.up.zone.type=Configurazione del tipo di Zona
 label.shutdown.provider=Arresto del provider
 label.site.to.site.VPN=Site-to-site VPN
 label.skip.guide=Se si ha familiarit\u00e0 con CloudStack per utilizzi precedenti, si pu\u00f2 saltare questa guida
-label.source=Sorgente
 label.specify.IP.ranges=Specificare intervallo di indirizzi IP
 label.srx=SRX
 label.start.IP=Indirizzo IP iniziale

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_ja_JP.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_ja_JP.properties b/client/WEB-INF/classes/resources/messages_ja_JP.properties
index f0f9c2d..1962e92 100644
--- a/client/WEB-INF/classes/resources/messages_ja_JP.properties
+++ b/client/WEB-INF/classes/resources/messages_ja_JP.properties
@@ -859,11 +859,13 @@ label.latest.events=\u6700\u65b0\u30a4\u30d9\u30f3\u30c8
 label.launch=\u8d77\u52d5
 label.launch.vm=VM \u306e\u8d77\u52d5
 label.launch.zone=\u30be\u30fc\u30f3\u306e\u8d77\u52d5
+label.lb.algorithm.leastconn=\u6700\u5c0f\u63a5\u7d9a
+label.lb.algorithm.roundrobin=\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3
+label.lb.algorithm.source=\u9001\u4fe1\u5143
 label.LB.isolation=LB \u5206\u96e2
 label.ldap.configuration=LDAP \u69cb\u6210
 label.ldap.group.name=LDAP \u30b0\u30eb\u30fc\u30d7
 label.ldap.port=LDAP \u30dd\u30fc\u30c8
-label.least.connections=\u6700\u5c0f\u63a5\u7d9a
 label.level=\u30ec\u30d9\u30eb
 label.linklocal.ip=\u30ea\u30f3\u30af \u30ed\u30fc\u30ab\u30eb IP \u30a2\u30c9\u30ec\u30b9
 label.load.balancer.type=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u7a2e\u985e
@@ -1227,7 +1229,6 @@ label.root.certificate=\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8
 label.root.disk.controller=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc
 label.root.disk.offering=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0
 label.root.disk.size=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba
-label.round.robin=\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3
 label.router.vm.scaled.up=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f
 label.routing.host=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30db\u30b9\u30c8
 label.routing=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0
@@ -1315,7 +1316,6 @@ label.source.ip.address=\u9001\u4fe1\u5143 IP \u30a2\u30c9\u30ec\u30b9
 label.source.nat.supported=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u9001\u4fe1\u5143 NAT
 label.source.nat=\u9001\u4fe1\u5143 NAT
 label.source.port=\u9001\u4fe1\u5143\u30dd\u30fc\u30c8
-label.source=\u9001\u4fe1\u5143
 label.specify.IP.ranges=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u6307\u5b9a
 label.specify.vlan=VLAN \u3092\u6307\u5b9a\u3059\u308b
 label.specify.vxlan=VXLAN \u3092\u6307\u5b9a\u3059\u308b
@@ -2051,4 +2051,4 @@ state.Stopping=\u505c\u6b62\u3057\u3066\u3044\u307e\u3059
 state.Suspended=\u4e00\u6642\u505c\u6b62
 ui.listView.filters.all=\u3059\u3079\u3066
 ui.listView.filters.mine=\u81ea\u5206\u306e\u3082\u306e
-label.migrate.volume=Migrate Volume
\ No newline at end of file
+label.migrate.volume=Migrate Volume

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_ko_KR.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_ko_KR.properties b/client/WEB-INF/classes/resources/messages_ko_KR.properties
index 69e711a..ced576c 100644
--- a/client/WEB-INF/classes/resources/messages_ko_KR.properties
+++ b/client/WEB-INF/classes/resources/messages_ko_KR.properties
@@ -637,8 +637,10 @@ label.latest.events=\ucd5c\uc2e0 \uc774\ubca4\ud2b8
 label.launch=\uc2dc\uc791
 label.launch.vm=VM \uc2dc\uc791
 label.launch.zone=Zone \uc2dc\uc791
+label.lb.algorithm.leastconn=\ucd5c\uc18c \uc811\uc18d
+label.lb.algorithm.roundrobin=\ub77c\uc6b4\ub4dc \ub85c\ube48
+label.lb.algorithm.source=\uc2dc\uc791 \uc704\uce58
 label.LB.isolation=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \ubd84\ub9ac
-label.least.connections=\ucd5c\uc18c \uc811\uc18d
 label.level=\ub808\ubca8
 label.load.balancer=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \uc7a5\uce58
 label.load.balancing.policies=\ub124\ud2b8\uc6cc\ud06c \ub85c\ub4dc \uacf5\uc720 \uc815\ucc45
@@ -899,7 +901,6 @@ label.role=\uc5ed\ud560
 label.root.disk.controller=\ub8e8\ud2b8 \ub514\uc2a4\ud06c \ucf58\ud2b8\ub864\ub7ec
 label.root.disk.offering=\ub8e8\ud2b8 \ub514\uc2a4\ud06c\uc81c\uacf5
 label.root.disk.size=\ub8e8\ud2b8 \ub514\uc2a4\ud06c
-label.round.robin=\ub77c\uc6b4\ub4dc \ub85c\ube48
 label.routing=\ub77c\uc6b0\ud305
 label.rules=\uaddc\uce59
 label.running.vms=\uc2e4\ud589\uc911 VM
@@ -956,7 +957,6 @@ label.snapshot.s=\uc2a4\ub0c5\uc0f7
 label.snapshots=\uc2a4\ub0c5\uc0f7
 label.snapshot=\uc2a4\ub0c5\uc0f7
 label.source.nat=\uc804\uc1a1\uc6d0 NAT
-label.source=\uc2dc\uc791 \uc704\uce58
 label.specify.IP.ranges=IP \uc8fc\uc18c \ubc94\uc704 \uc9c0\uc815
 label.specify.vlan=VLAN \uc9c0\uc815
 label.specify.vxlan=VXLAN \uc9c0\uc815

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_nb_NO.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_nb_NO.properties b/client/WEB-INF/classes/resources/messages_nb_NO.properties
index 472c898..26c1424 100644
--- a/client/WEB-INF/classes/resources/messages_nb_NO.properties
+++ b/client/WEB-INF/classes/resources/messages_nb_NO.properties
@@ -541,8 +541,10 @@ label.last.name=Etternavn
 label.latest.events=Siste hendelser
 label.launch=Start
 label.launch.vm=Start VM
+label.lb.algorithm.leastconn=F\u00e6rrest tilkoblinger
+label.lb.algorithm.roundrobin=Ringdistribusjon
+label.lb.algorithm.source=Kilde
 label.LB.isolation=LB-isolering
-label.least.connections=F\u00e6rrest tilkoblinger
 label.load.balancer=Lastbalanserer
 label.load.balancing=Lastbalansering
 label.load.balancing.policies=Regler for lastbalansering
@@ -745,7 +747,6 @@ label.review=Gjennomg\u00e5
 label.revoke.project.invite=Tilbakekall invitasjonen
 label.role=Rolle
 label.root.disk.size=Rotdiskst\u00f8rrelse
-label.round.robin=Ringdistribusjon
 label.routing=Ruting
 label.rules=Regler
 label.running.vms=Kj\u00f8rende VMer
@@ -785,7 +786,6 @@ label.shared=Delt
 label.shutdown.provider=Steng tilbyder
 label.size=St\u00f8rrelse
 label.skip.guide=Jeg har brukt CloudStack tidligere. Hopp over denne veiviseren
-label.source=Kilde
 label.source.nat=Kilde NAT
 label.specify.IP.ranges=Spesifiser IP-rekker
 label.specify.vlan=Spesifiser VLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_nl_NL.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_nl_NL.properties b/client/WEB-INF/classes/resources/messages_nl_NL.properties
index 7f7cb9b..86653a5 100644
--- a/client/WEB-INF/classes/resources/messages_nl_NL.properties
+++ b/client/WEB-INF/classes/resources/messages_nl_NL.properties
@@ -808,11 +808,13 @@ label.latest.events=Laatste gebeurtenissen
 label.launch=Lanceer
 label.launch.vm=Lanceer VM
 label.launch.zone=Lanceer zone
+label.lb.algorithm.leastconn=Minste connecties
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=Bron
 label.LB.isolation=LB isolatie
 label.ldap.configuration=LDAP Configuratie
 label.ldap.group.name=LDAP Groep
 label.ldap.port=LDAP poort
-label.least.connections=Minste connecties
 label.level=Level
 label.linklocal.ip=Link Local IP Adres
 label.load.balancer=Load Balancer
@@ -1160,7 +1162,6 @@ label.role=Rol
 label.root.disk.controller=Root schijf controller
 label.root.disk.offering=Root Schijf Aanbieding
 label.root.disk.size=Grootte root volume
-label.round.robin=Round-robin
 label.router.vm.scaled.up=Router VM Omhoog  Geschaald
 label.routing=Routing
 label.rule.number=Regel Nummer
@@ -1241,7 +1242,6 @@ label.snapshots=Snapshots
 label.SNMP.community=SNMP Community
 label.SNMP.port=SNMP Poort
 label.sockets=CPU Sockets
-label.source=Bron
 label.source.nat=Source NAT
 label.specify.IP.ranges=Specificeer IP ranges
 label.specify.vlan=Specificeer VLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_pl.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_pl.properties b/client/WEB-INF/classes/resources/messages_pl.properties
index b28a00c..a0d1b35 100644
--- a/client/WEB-INF/classes/resources/messages_pl.properties
+++ b/client/WEB-INF/classes/resources/messages_pl.properties
@@ -284,7 +284,7 @@ label.lang.russian=Rosyjski
 label.lang.spanish=Hiszpia\u0144ski
 label.last.name=Nazwisko
 label.launch=Rozpocznij
-label.least.connections=Ostatnie po\u0142\u0105czenie
+label.lb.algorithm.leastconn=Ostatnie po\u0142\u0105czenie
 label.level=Poziom
 label.loading=Wczytywanie
 label.local=Lokalne

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_pt_BR.properties b/client/WEB-INF/classes/resources/messages_pt_BR.properties
index c833eef..fa77633 100644
--- a/client/WEB-INF/classes/resources/messages_pt_BR.properties
+++ b/client/WEB-INF/classes/resources/messages_pt_BR.properties
@@ -710,11 +710,13 @@ label.latest.events=\u00daltimos eventos
 label.launch=Executar
 label.launch.vm=Executar VM
 label.launch.zone=Executar zona.
+label.lb.algorithm.leastconn=Least connections
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=Origem
 label.LB.isolation=Isolamento de LB
 label.ldap.configuration=Configura\u00e7\u00e3o do LDAP
 label.ldap.group.name=Grupo LDAP
 label.ldap.port=Porta do LDAP
-label.least.connections=Least connections
 label.level=N\u00edvel
 label.linklocal.ip=Endere\u00e7o IP do Link Local
 label.load.balancer=Load Balancer
@@ -1019,7 +1021,6 @@ label.role=Fun\u00e7\u00e3o
 label.root.disk.controller=Controlador do disco Root
 label.root.disk.offering=Oferta de Disco ROOT
 label.root.disk.size=Tamanho do disco root
-label.round.robin=Round-robin
 label.routing=Roteamento
 label.rules=Regras
 label.running.vms=VMs Rodando
@@ -1089,7 +1090,6 @@ label.snapshot.s=Snapshot (s)
 label.snapshots=Snapshots
 label.sockets=Sockets
 label.source.nat=Source NAT
-label.source=Origem
 label.specify.IP.ranges=Especifique range de IP
 label.specify.vlan=Especificar VLAN
 label.specify.vxlan=Especificar VXLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_ru_RU.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_ru_RU.properties b/client/WEB-INF/classes/resources/messages_ru_RU.properties
index 8f0ba4a..7f57daa 100644
--- a/client/WEB-INF/classes/resources/messages_ru_RU.properties
+++ b/client/WEB-INF/classes/resources/messages_ru_RU.properties
@@ -674,8 +674,10 @@ label.latest.events=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0438 \u044
 label.launch=\u0417\u0430\u043f\u0443\u0441\u043a
 label.launch.vm=\u0417\u0430\u043f\u0443\u0441\u043a \u0412\u041c
 label.launch.zone=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u043e\u043d\u0443
+label.lb.algorithm.leastconn=Least connections
+label.lb.algorithm.roundrobin=Round-robin
+label.lb.algorithm.source=\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a
 label.LB.isolation=\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f LB
-label.least.connections=Least connections
 label.level=\u0423\u0440\u043e\u0432\u0435\u043d\u044c
 label.linklocal.ip=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441
 label.load.balancer=\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438
@@ -957,7 +959,6 @@ label.role=\u0420\u043e\u043b\u044c
 label.root.disk.controller=\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430
 label.root.disk.offering=\u0420\u0435\u0441\u0443\u0440\u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430
 label.root.disk.size=\u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430
-label.round.robin=Round-robin
 label.routing=\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f
 label.rules=\u041f\u0440\u0430\u0432\u0438\u043b\u0430
 label.running.vms=\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0412\u041c
@@ -1020,7 +1021,6 @@ label.snapshots=\u0421\u043d\u0438\u043c\u043a\u0438
 label.snapshot.s=\u0421\u043d\u0438\u043c\u043e\u043a/\u0441\u043d\u0438\u043c\u043a\u0438
 label.snapshot=\u0421\u043d\u0438\u043c\u043e\u043a
 label.source.nat=Source NAT
-label.source=\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a
 label.specify.IP.ranges=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432
 label.specify.vlan=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 VLAN
 label.specify.vxlan=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 VXLAN

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/client/WEB-INF/classes/resources/messages_zh_CN.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties
index e16a55b..2178495 100644
--- a/client/WEB-INF/classes/resources/messages_zh_CN.properties
+++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties
@@ -859,11 +859,13 @@ label.latest.events=\u6700\u65b0\u4e8b\u4ef6
 label.launch=\u542f\u52a8
 label.launch.vm=\u542f\u52a8 VM
 label.launch.zone=\u542f\u52a8\u8d44\u6e90\u57df
+label.lb.algorithm.leastconn=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5
+label.lb.algorithm.roundrobin=\u8f6e\u8be2\u7b97\u6cd5
+label.lb.algorithm.source=\u6e90\u7b97\u6cd5
 label.LB.isolation=\u8d1f\u8f7d\u5e73\u8861\u5668\u9694\u79bb
 label.ldap.configuration=LDAP \u914d\u7f6e
 label.ldap.group.name=LDAP \u7ec4
 label.ldap.port=LDAP \u7aef\u53e3
-label.least.connections=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5
 label.level=\u7ea7\u522b
 label.linklocal.ip=\u94fe\u63a5\u672c\u5730 IP \u5730\u5740
 label.load.balancer.type=\u8d1f\u8f7d\u5e73\u8861\u5668\u7c7b\u578b
@@ -1227,7 +1229,6 @@ label.root.certificate=\u6839\u8bc1\u4e66
 label.root.disk.controller=\u6839\u78c1\u76d8\u63a7\u5236\u5668
 label.root.disk.offering=\u6839\u78c1\u76d8\u65b9\u6848
 label.root.disk.size=\u6839\u78c1\u76d8\u5927\u5c0f
-label.round.robin=\u8f6e\u5faa
 label.router.vm.scaled.up=\u5df2\u6269\u5c55\u8def\u7531\u5668 VM
 label.routing.host=\u6b63\u5728\u8def\u7531\u4e3b\u673a
 label.routing=\u6b63\u5728\u8def\u7531
@@ -1315,7 +1316,6 @@ label.source.ip.address=\u6e90 IP \u5730\u5740
 label.source.nat.supported=\u652f\u6301 SourceNAT
 label.source.nat=\u6e90 NAT
 label.source.port=\u6e90\u7aef\u53e3
-label.source=\u6e90\u7b97\u6cd5
 label.specify.IP.ranges=\u6307\u5b9a IP \u8303\u56f4
 label.specify.vlan=\u6307\u5b9a VLAN
 label.specify.vxlan=\u6307\u5b9a VXLAN
@@ -2051,4 +2051,4 @@ state.Stopping=\u6b63\u5728\u505c\u6b62
 state.Suspended=\u5df2\u6682\u505c
 ui.listView.filters.all=\u5168\u90e8
 ui.listView.filters.mine=\u672c\u7528\u6237
-label.migrate.volume=Migrate Volume
\ No newline at end of file
+label.migrate.volume=Migrate Volume

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index 671f48f..e1c19f3 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -746,8 +746,10 @@ dictionary = {
 'label.latest.events': '<fmt:message key="label.latest.events" />',
 'label.launch': '<fmt:message key="label.launch" />',
 'label.launch.vm': '<fmt:message key="label.launch.vm" />',
+'label.lb.algorithm.leastconn': '<fmt:message key="label.lb.algorithm.leastconn" />',
+'label.lb.algorithm.roundrobin': '<fmt:message key="label.lb.algorithm.roundrobin" />',
+'label.lb.algorithm.source': '<fmt:message key="label.lb.algorithm.source" />',
 'label.LB.isolation': '<fmt:message key="label.LB.isolation" />',
-'label.least.connections': '<fmt:message key="label.least.connections" />',
 'label.level': '<fmt:message key="label.level" />',
 'label.linklocal.ip': '<fmt:message key="label.linklocal.ip" />',
 'label.load.balancer': '<fmt:message key="label.load.balancer" />',
@@ -1028,6 +1030,5 @@ dictionary = {
 'label.role': '<fmt:message key="label.role" />',
 'label.root.disk.controller': '<fmt:message key="label.root.disk.controller" />',
 'label.root.disk.offering': '<fmt:message key="label.root.disk.offering" />',
-'label.round.robin': '<fmt:message key="label.round.robin" />',
 };
 </script>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index c27b999..c31ba76 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1685,17 +1685,9 @@
                                             'algorithm': {
                                                 label: 'label.algorithm',
                                                 select: function(args) {
+                                                    var data = getLBAlgorithms(args.context.networks[0]);
                                                     args.response.success({
-                                                        data: [{
-                                                            name: 'roundrobin',
-                                                            description: _l('label.round.robin')
-                                                        }, {
-                                                            name: 'leastconn',
-                                                            description: _l('label.least.connections')
-                                                        }, {
-                                                            name: 'source',
-                                                            description: _l('label.source')
-                                                        }]
+                                                        data: data
                                                     });
                                                 }
                                             },
@@ -3525,20 +3517,9 @@
                                                 label: 'label.algorithm',
                                                 isEditable: true,
                                                 select: function(args) {
+                                                    var data = getLBAlgorithms(args.context.networks[0]);
                                                     args.response.success({
-                                                        data: [{
-                                                            id: 'roundrobin',
-                                                            name: 'roundrobin',
-                                                            description: _l('label.round.robin')
-                                                        }, {
-                                                            id: 'leastconn',
-                                                            name: 'leastconn',
-                                                            description: _l('label.least.connections')
-                                                        }, {
-                                                            id: 'source',
-                                                            name: 'source',
-                                                            description: _l('label.source')
-                                                        }]
+                                                        data: data
                                                     });
                                                 }
                                             },
@@ -6451,6 +6432,44 @@
 				});             		
         	} 
         }
+    };
+
+    var getLBAlgorithms = function(networkObj) {
+        if (!networkObj || !networkObj.service) {
+            return [];
+        }
+
+        var lbService = $.grep(networkObj.service, function(service) {
+            return service.name == 'Lb';
+        })[0];
+
+        if (!lbService || !lbService.capability) {
+            return [];
+        }
+
+        var algorithmCapabilities = $.grep(
+            lbService.capability,
+            function(capability) {
+                return capability.name == 'SupportedLbAlgorithms';
+            }
+        )[0];
+
+        if (!algorithmCapabilities) {
+            return [];
+        }
+
+        var algorithms = algorithmCapabilities.value.split(',');
+
+        if (!algorithms) {
+            return [];
+        }
+
+        var data = [];
+        $(algorithms).each(function() {
+            data.push({id: this.valueOf(), name: this.valueOf(), description: _l('label.lb.algorithm.' + this.valueOf())});
+        });
+
+        return data;
     }
 
 })(cloudStack, jQuery);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93f82134/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 0770cb2..dc1f47c 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -833,13 +833,13 @@
                                             args.response.success({
                                                 data: [{
                                                     id: 'source',
-                                                    description: 'source'
+                                                    description: _l('label.lb.algorithm.source')
                                                 }, {
                                                     id: 'roundrobin',
-                                                    description: 'roundrobin'
+                                                    description: _l('label.lb.algorithm.roundrobin')
                                                 }, {
                                                     id: 'leastconn',
-                                                    description: 'leastconn'
+                                                    description: _l('label.lb.algorithm.leastconn')
                                                 }]
                                             });
                                         }
@@ -3661,13 +3661,13 @@
                                             args.response.success({
                                                 data: [{
                                                     name: 'roundrobin',
-                                                    description: _l('label.round.robin')
+                                                    description: _l('label.lb.algorithm.roundrobin')
                                                 }, {
                                                     name: 'leastconn',
-                                                    description: _l('label.least.connections')
+                                                    description: _l('label.lb.algorithm.leastconn')
                                                 }, {
                                                     name: 'source',
-                                                    description: _l('label.source')
+                                                    description: _l('label.lb.algorithm.source')
                                                 }]
                                             });
                                         }


[47/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-6893: fix enum ValueOf issue which causes systemvm fail to start

(cherry picked from commit 63ff5a7cbc3341809884e47796476d47ace03961)
(cherry picked from commit d0e0edca111feb71e7cd8267d9c28820d85b12f9)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/daa57f67
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/daa57f67
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/daa57f67

Branch: refs/heads/useraccount-refactoring
Commit: daa57f67d63050202487ca672b230713fc2f0bcc
Parents: a2acae1
Author: Wei Zhou <w....@leaseweb.com>
Authored: Wed Jun 11 13:46:12 2014 +0200
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Thu Nov 27 16:58:08 2014 +0100

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/LibvirtComputingResource.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/daa57f67/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index d22487a..2afc291 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -3999,7 +3999,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
                 if ((volumeObjectTO.getIopsWriteRate() != null) && (volumeObjectTO.getIopsWriteRate() > 0))
                     disk.setIopsWriteRate(volumeObjectTO.getIopsWriteRate());
                 if (volumeObjectTO.getCacheMode() != null)
-                    disk.setCacheMode(DiskDef.diskCacheMode.valueOf(volumeObjectTO.getCacheMode().toString()));
+                    disk.setCacheMode(DiskDef.diskCacheMode.valueOf(volumeObjectTO.getCacheMode().toString().toUpperCase()));
             }
             vm.getDevices().addDevice(disk);
         }
@@ -4162,7 +4162,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
                     diskdef.setIopsWriteRate(iopsWriteRate);
 
                 if (cacheMode != null) {
-                    diskdef.setCacheMode(DiskDef.diskCacheMode.valueOf(cacheMode));
+                    diskdef.setCacheMode(DiskDef.diskCacheMode.valueOf(cacheMode.toUpperCase()));
                 }
             }
 


[23/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7934: Fixed cleanup issues test_escalations_volumes.py

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2fbef677
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2fbef677
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2fbef677

Branch: refs/heads/useraccount-refactoring
Commit: 2fbef677b0edfcd705c0df6d244f7327e8ea938c
Parents: 30a2ade
Author: Ashutosh K <as...@clogeny.com>
Authored: Tue Nov 18 15:06:19 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:53:51 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_escalations_volumes.py | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2fbef677/test/integration/component/test_escalations_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_escalations_volumes.py b/test/integration/component/test_escalations_volumes.py
index 7290325..1a17721 100644
--- a/test/integration/component/test_escalations_volumes.py
+++ b/test/integration/component/test_escalations_volumes.py
@@ -784,8 +784,6 @@ class TestVolumes(cloudstackTestCase):
 
         self.assertIsNotNone(snapshot_created, "Snapshot not created")
 
-        self.cleanup.append(snapshot_created)
-
         # Creating expected and actual values dictionaries
         expected_dict = {
             "id": volume_created.id,
@@ -1560,7 +1558,6 @@ class TestVolumes(cloudstackTestCase):
                 volume_created.id,
             )
             self.assertIsNotNone(snapshot_created, "Snapshot not created")
-            self.cleanup.append(snapshot_created)
 
             self.assertEquals(
                 volume_created.id,
@@ -1621,7 +1618,6 @@ class TestVolumes(cloudstackTestCase):
         # Deleting a single snapshot and verifying that snapshot does not
         # exists on page 2
         Snapshot.delete(snapshot_created, self.userapiclient)
-        self.cleanup.remove(snapshot_created)
 
         list_snapshot_page2 = Snapshot.list(
             self.userapiclient,
@@ -1855,7 +1851,6 @@ class TestVolumes(cloudstackTestCase):
             validateList(vol1_res)[0],
             PASS,
             "Volume list returned invalid response")
-        self.cleanup.append(vol1)
         vol1_size = vol1_res[0].size
         try:
             self.virtual_machine.attach_volume(self.userapiclient, vol1)
@@ -1875,7 +1870,6 @@ class TestVolumes(cloudstackTestCase):
             vol2,
             "Failed to create custom data disk with size %s" %
             self.services["custom_volume"]["customdisksize"])
-        self.cleanup.append(vol2)
         vol2_res = Volume.list(
             self.userapiclient,
             id=vol2.id


[17/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py
index e3d65bb..fce64b5 100644
--- a/test/integration/component/test_netscaler_lb.py
+++ b/test/integration/component/test_netscaler_lb.py
@@ -36,118 +36,11 @@ from marvin.lib.base import (Account,
 from marvin.lib.common import (get_domain,
                                get_zone,
                                get_template,
-                               GetNetscalerInfoFromConfig,
                                add_netscaler)
 from marvin.sshClient import SshClient
 import time
 
 
-class Services:
-
-    """Test netscaler services
-    """
-
-    def __init__(self):
-        self.services = {
-            "account": {
-                "email": "test@test.com",
-                "firstname": "Test",
-                "lastname": "User",
-                "username": "test",
-                # Random characters are appended for unique
-                # username
-                "password": "password",
-            },
-            "service_offering": {
-                "name": "Tiny Instance",
-                "displaytext": "Tiny Instance",
-                "cpunumber": 1,
-                "cpuspeed": 100,    # in MHz
-                                    "memory": 128,       # In MBs
-            },
-            "virtual_machine": {
-                "displayname": "TestVM",
-                "username": "root",
-                "password": "password",
-                "ssh_port": 22,
-                "hypervisor": 'XenServer',
-                "privateport": 22,
-                "publicport": 22,
-                "protocol": 'TCP',
-            },
-            "network_offering_dedicated": {
-                "name": 'Netscaler',
-                "displaytext": 'Netscaler',
-                "guestiptype": 'Isolated',
-                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                "traffictype": 'GUEST',
-                "availability": 'Optional',
-                "specifyVlan": False,
-                "specifyIpRanges": False,
-                "serviceProviderList": {
-                    "Dhcp": 'VirtualRouter',
-                    "Dns": 'VirtualRouter',
-                    "SourceNat": 'VirtualRouter',
-                    "PortForwarding": 'VirtualRouter',
-                    "Vpn": 'VirtualRouter',
-                    "Firewall": 'VirtualRouter',
-                    "Lb": 'Netscaler',
-                    "UserData": 'VirtualRouter',
-                    "StaticNat": 'VirtualRouter',
-                },
-                "serviceCapabilityList": {
-                    "SourceNat": {
-                        "SupportedSourceNatTypes": "peraccount"
-                    },
-                    "lb": {
-                        "SupportedLbIsolation": "dedicated"
-                    },
-                },
-            },
-            "network_offering": {
-                "name": 'Netscaler',
-                "displaytext": 'Netscaler',
-                "guestiptype": 'Isolated',
-                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                "traffictype": 'GUEST',
-                "availability": 'Optional',
-                "serviceProviderList": {
-                    "Dhcp": 'VirtualRouter',
-                    "Dns": 'VirtualRouter',
-                    "SourceNat": 'VirtualRouter',
-                    "PortForwarding": 'VirtualRouter',
-                    "Vpn": 'VirtualRouter',
-                    "Firewall": 'VirtualRouter',
-                    "Lb": 'Netscaler',
-                    "UserData": 'VirtualRouter',
-                    "StaticNat": 'VirtualRouter',
-                },
-            },
-            "network": {
-                "name": "Netscaler",
-                "displaytext": "Netscaler",
-            },
-            "lbrule": {
-                "name": "SSH",
-                "alg": "roundrobin",
-                # Algorithm used for load balancing
-                "privateport": 22,
-                "publicport": 22,
-                "openfirewall": False,
-            },
-            "natrule": {
-                "privateport": 22,
-                "publicport": 22,
-                "protocol": "TCP"
-            },
-            "ostype": 'CentOS 5.3 (64-bit)',
-            # Cent OS 5.3 (64 bit)
-            "sleep": 60,
-            "timeout": 10,
-            "mode": 'advanced'
-        }
-
-
 class TestLbSourceNat(cloudstackTestCase):
 
     @classmethod
@@ -156,38 +49,36 @@ class TestLbSourceNat(cloudstackTestCase):
         cls.testClient = super(TestLbSourceNat, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -208,7 +99,7 @@ class TestLbSourceNat(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -220,17 +111,6 @@ class TestLbSourceNat(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -252,7 +132,7 @@ class TestLbSourceNat(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -265,7 +145,7 @@ class TestLbSourceNat(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -301,7 +181,7 @@ class TestLbSourceNat(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -357,7 +237,7 @@ class TestLbSourceNat(cloudstackTestCase):
         with self.assertRaises(Exception):
             LoadBalancerRule.create(
                 self.apiclient,
-                self.services["lbrule"],
+                self.testdata["lbrule"],
                 ipaddressid=src_nat.id,
                 accountid=self.account.name
             )
@@ -372,39 +252,36 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         cls.testClient = super(TestLbOnIpWithPf, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -425,7 +302,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -437,17 +314,6 @@ class TestLbOnIpWithPf(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -469,7 +335,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -482,7 +348,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -518,7 +384,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -565,7 +431,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         NATRule.create(
             self.apiclient,
             virtual_machine_1,
-            self.services["natrule"],
+            self.testdata["natrule"],
             ipaddressid=ip_with_nat_rule.ipaddress.id
         )
 
@@ -576,7 +442,7 @@ class TestLbOnIpWithPf(cloudstackTestCase):
         with self.assertRaises(Exception):
             LoadBalancerRule.create(
                 self.apiclient,
-                self.services["lbrule"],
+                self.testdata["lbrule"],
                 ipaddressid=ip_with_nat_rule.ipaddress.id,
                 accountid=self.account.name
             )
@@ -591,39 +457,39 @@ class TestPfOnIpWithLb(cloudstackTestCase):
         cls.testClient = super(TestPfOnIpWithLb, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(
+                    cls.api_client,
+                    cls.zone.id,
+                    cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -644,7 +510,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -656,17 +522,6 @@ class TestPfOnIpWithLb(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -689,7 +544,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -702,7 +557,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -738,7 +593,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -785,7 +640,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
 
         LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -798,7 +653,7 @@ class TestPfOnIpWithLb(cloudstackTestCase):
             NATRule.create(
                 self.apiclient,
                 virtual_machine_1,
-                self.services["natrule"],
+                self.testdata["natrule"],
                 ipaddressid=ip_with_lb_rule.ipaddress.id
             )
         return
@@ -812,39 +667,39 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
         cls.testClient = super(TestLbOnNonSourceNat, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(
+                    cls.api_client,
+                    cls.zone.id,
+                    cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=False
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -865,7 +720,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -877,17 +732,6 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -909,7 +753,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -922,7 +766,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -958,7 +802,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1005,7 +849,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase):
 
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1035,39 +879,39 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
         cls.testClient = super(TestAddMultipleVmsLb, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(
+                    cls.api_client,
+                    cls.zone.id,
+                    cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -1088,7 +932,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -1100,17 +944,6 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1137,7 +970,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -1150,7 +983,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1186,7 +1019,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1233,7 +1066,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
 
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=ip_with_lb_rule.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1256,13 +1089,13 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
         lb_rule.assign(self.apiclient, [virtual_machine_1, virtual_machine_2])
 
         self.debug("SSH into netscaler: %s" %
-                   self.services["netscaler"]["ipaddress"])
+                   self.testdata["configurableData"]["netscaler"]["ipaddress"])
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
                 22,
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             self.debug("command: show server")
             res = ssh_client.execute("show server")
@@ -1309,7 +1142,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -1321,39 +1154,39 @@ class TestMultipleLbRules(cloudstackTestCase):
         cls.testClient = super(TestMultipleLbRules, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(
+                    cls.api_client,
+                    cls.zone.id,
+                    cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -1375,7 +1208,7 @@ class TestMultipleLbRules(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -1387,17 +1220,6 @@ class TestMultipleLbRules(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1420,7 +1242,7 @@ class TestMultipleLbRules(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -1433,7 +1255,7 @@ class TestMultipleLbRules(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1469,7 +1291,7 @@ class TestMultipleLbRules(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1518,10 +1340,10 @@ class TestMultipleLbRules(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             public_ip_1.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=public_ip_1.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1564,10 +1386,10 @@ class TestMultipleLbRules(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             public_ip_2.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=public_ip_2.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1648,39 +1470,36 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
             cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
         except Exception as e:
             cls.tearDownClass()
@@ -1701,7 +1520,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.account = Account.create(
             self.apiclient,
-            self.services["account"],
+            self.testdata["account"],
             admin=True,
             domainid=self.domain.id
         )
@@ -1713,17 +1532,6 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            interval = Configurations.list(
-                self.apiclient,
-                name='network.gc.interval'
-            )
-            wait = Configurations.list(
-                self.apiclient,
-                name='network.gc.wait'
-            )
-            # Sleep to ensure that all resources are deleted
-            time.sleep(int(interval[0].value) + int(wait[0].value))
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1747,7 +1555,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
                    self.network_offering.id)
         self.network = Network.create(
             self.apiclient,
-            self.services["network"],
+            self.testdata["network"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             networkofferingid=self.network_offering.id,
@@ -1760,7 +1568,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_1 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1796,7 +1604,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
         # Spawn an instance in that network
         virtual_machine_2 = VirtualMachine.create(
             self.apiclient,
-            self.services["virtual_machine"],
+            self.testdata["small"],
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
@@ -1845,10 +1653,10 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
             "Creating LB rule for IP address: %s with round robin algo" %
             public_ip.ipaddress.ipaddress)
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
         lb_rule_1 = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1882,7 +1690,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
         with self.assertRaises(Exception):
             LoadBalancerRule.create(
                 self.apiclient,
-                self.services["lbrule"],
+                self.testdata["lbrule"],
                 ipaddressid=public_ip.ipaddress.id,
                 accountid=self.account.name,
                 networkid=self.network.id
@@ -1892,12 +1700,12 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
             public_ip.ipaddress.ipaddress,
             str(2222)))
 
-        self.services["lbrule"]["alg"] = 'roundrobin'
-        self.services["lbrule"]["publicport"] = 2222
-        self.services["lbrule"]["name"] = 'SSH2'
+        self.testdata["lbrule"]["alg"] = 'roundrobin'
+        self.testdata["lbrule"]["publicport"] = 2222
+        self.testdata["lbrule"]["name"] = 'SSH2'
         lb_rule_2 = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -1949,7 +1757,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase):
             ssh = virtual_machine_1.get_ssh_client(
                 ipaddress=public_ip.ipaddress.ipaddress,
                 reconnect=True,
-                port=self.services["lbrule"]["publicport"]
+                port=self.testdata["lbrule"]["publicport"]
             )
             self.debug("Command: hostname")
             result = ssh.execute("hostname")
@@ -1978,43 +1786,40 @@ class TestLoadBalancingRule(cloudstackTestCase):
         cls.testClient = super(TestLoadBalancingRule, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
@@ -2022,7 +1827,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
             # Creating network using the network offering created
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
@@ -2032,7 +1837,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -2047,7 +1852,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
             )
             cls.lb_rule = LoadBalancerRule.create(
                 cls.api_client,
-                cls.services["lbrule"],
+                cls.testdata["lbrule"],
                 ipaddressid=cls.public_ip.ipaddress.id,
                 accountid=cls.account.name,
                 networkid=cls.network.id
@@ -2077,7 +1882,6 @@ class TestLoadBalancingRule(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -2156,10 +1960,10 @@ class TestLoadBalancingRule(cloudstackTestCase):
         self.debug("SSH into Netscaler to verify other resources are deleted")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip.ipaddress.ipaddress,
@@ -2188,7 +1992,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
 
@@ -2200,42 +2004,39 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
         cls.testClient = super(TestDeleteCreateLBRule, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
@@ -2243,7 +2044,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
             # Creating network using the network offering created
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
@@ -2253,7 +2054,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
             # Spawn an instance in that network
             cls.virtual_machine = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -2285,7 +2086,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.lb_rule = LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -2298,7 +2099,6 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -2317,10 +2117,10 @@ class TestDeleteCreateLBRule(cloudstackTestCase):
         self.debug("LB rule deleted")
 
         self.debug("Create a new LB rule with different public port")
-        self.services["lbrule"]["publicport"] = 23
+        self.testdata["lbrule"]["publicport"] = 23
         LoadBalancerRule.create(
             self.apiclient,
-            self.services["lbrule"],
+            self.testdata["lbrule"],
             ipaddressid=self.public_ip.ipaddress.id,
             accountid=self.account.name,
             networkid=self.network.id
@@ -2335,43 +2135,40 @@ class TestVmWithLb(cloudstackTestCase):
         cls.testClient = super(TestVmWithLb, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
-        cls.services = Services().services
+        # Fill testdata from the external config file
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
             cls.api_client,
             cls.zone.id,
-            cls.services["ostype"]
+            cls.testdata["ostype"]
         )
 
-        response = GetNetscalerInfoFromConfig(
-            cls.config
-        )
-        assert response[0] is not None, response[1]
-        cls.services["netscaler"] = response[0]
-        cls.services["netscaler"]["lbdevicededicated"] = False
+        cls.testdata["lbrule"]["publicport"] = 22
+        cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
 
         try:
-            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"])
+            cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
             cls._cleanup.append(cls.netscaler)
             cls.network_offering = NetworkOffering.create(
                 cls.api_client,
-                cls.services["network_offering"],
+                cls.testdata["nw_off_isolated_netscaler"],
                 conservemode=True
             )
             # Enable Network offering
             cls.network_offering.update(cls.api_client, state='Enabled')
-            cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-            cls.services["virtual_machine"]["template"] = cls.template.id
+            cls.testdata["small"]["zoneid"] = cls.zone.id
+            cls.testdata["small"]["template"] = cls.template.id
 
             cls.service_offering = ServiceOffering.create(
                 cls.api_client,
-                cls.services["service_offering"]
+                cls.testdata["service_offering"]
             )
             cls.account = Account.create(
                 cls.api_client,
-                cls.services["account"],
+                cls.testdata["account"],
                 admin=True,
                 domainid=cls.domain.id
             )
@@ -2379,7 +2176,7 @@ class TestVmWithLb(cloudstackTestCase):
             # Creating network using the network offering created
             cls.network = Network.create(
                 cls.api_client,
-                cls.services["network"],
+                cls.testdata["network"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 networkofferingid=cls.network_offering.id,
@@ -2389,7 +2186,7 @@ class TestVmWithLb(cloudstackTestCase):
             # Spawn an instance in that network
             cls.vm_1 = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -2397,7 +2194,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
             cls.vm_2 = VirtualMachine.create(
                 cls.api_client,
-                cls.services["virtual_machine"],
+                cls.testdata["small"],
                 accountid=cls.account.name,
                 domainid=cls.account.domainid,
                 serviceofferingid=cls.service_offering.id,
@@ -2412,7 +2209,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
             cls.lb_rule_1 = LoadBalancerRule.create(
                 cls.api_client,
-                cls.services["lbrule"],
+                cls.testdata["lbrule"],
                 ipaddressid=cls.public_ip_1.ipaddress.id,
                 accountid=cls.account.name,
                 networkid=cls.network.id
@@ -2426,7 +2223,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
             cls.lb_rule_2 = LoadBalancerRule.create(
                 cls.api_client,
-                cls.services["lbrule"],
+                cls.testdata["lbrule"],
                 ipaddressid=cls.public_ip_2.ipaddress.id,
                 accountid=cls.account.name,
                 networkid=cls.network.id
@@ -2456,7 +2253,6 @@ class TestVmWithLb(cloudstackTestCase):
             self.debug("Cleaning up the resources")
             # Clean up, terminate the created network offerings
             cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -2471,7 +2267,7 @@ class TestVmWithLb(cloudstackTestCase):
         # 3. All the LB rules should be removed from that public Ip
         # 4. In netscaler, make sure that all LB rules associated with that
         #    public Ip should get removed.
-        # 5. All servers and services service to that public Ip get deleted
+        # 5. All servers and testdata service to that public Ip get deleted
 
         self.debug("Deleting public IP: %s from network: %s" % (
             self.public_ip_2.ipaddress.ipaddress,
@@ -2494,10 +2290,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to verify other resources are deleted")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip_2.ipaddress.ipaddress,
@@ -2526,7 +2322,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -2579,10 +2375,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to rules still persist")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
 
             cmd = "show server"
@@ -2598,7 +2394,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -2651,10 +2447,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to rules still persist")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
 
             cmd = "show server"
@@ -2670,7 +2466,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns", "multihost"])
@@ -2763,10 +2559,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to rules still persist")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
 
             cmd = "show server"
@@ -2782,7 +2578,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -2850,10 +2646,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to rules still persist")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
 
             cmd = "show server"
@@ -2869,7 +2665,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -2881,7 +2677,7 @@ class TestVmWithLb(cloudstackTestCase):
         # 2. Destroy one of the user VM
         # 3. Until the time the Vm is in "Destroyed" state, the servies
         #    relating to this Vm will be marked as "Down".
-        # 4. Once the Vm gets expunged, then the servers and services
+        # 4. Once the Vm gets expunged, then the servers and testdata
         #    associated with this VM should get deleted and the LB rules
         #    should not be pointing to this Vm anymore.
 
@@ -2932,10 +2728,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to rules still persist")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
 
             cmd = "show server"
@@ -2951,7 +2747,7 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return
 
     @attr(tags=["advancedns"])
@@ -2964,7 +2760,7 @@ class TestVmWithLb(cloudstackTestCase):
         # 3. All the LB rules should be removed from that public Ip
         # 4. In netscaler, make sure that all LB rules associated with that
         #    public Ip should get removed.
-        # 5. All servers and services service to that public Ip get deleted
+        # 5. All servers and testdata service to that public Ip get deleted
 
         self.debug("Deleting public IP: %s from network: %s" % (
             self.public_ip_1.ipaddress.ipaddress,
@@ -2987,10 +2783,10 @@ class TestVmWithLb(cloudstackTestCase):
         self.debug("SSH into Netscaler to verify other resources are deleted")
         try:
             ssh_client = SshClient(
-                self.services["netscaler"]["ipaddress"],
-                self.services["netscaler"]["port"],
-                self.services["netscaler"]["username"],
-                self.services["netscaler"]["password"],
+                self.testdata["configurableData"]["netscaler"]["ipaddress"],
+                self.testdata["configurableData"]["netscaler"]["port"],
+                self.testdata["configurableData"]["netscaler"]["username"],
+                self.testdata["configurableData"]["netscaler"]["password"],
             )
             cmd = "show lb vserver Cloud-VirtualServer-%s-%s" % (
                 self.public_ip_1.ipaddress.ipaddress,
@@ -3019,5 +2815,5 @@ class TestVmWithLb(cloudstackTestCase):
             )
         except Exception as e:
             self.fail("SSH Access failed for %s: %s" %
-                      (self.services["netscaler"]["ipaddress"], e))
+                      (self.testdata["configurableData"]["netscaler"]["ipaddress"], e))
         return


[36/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Add validation for domain names passed via global pamaremets


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/86895ec1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/86895ec1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/86895ec1

Branch: refs/heads/useraccount-refactoring
Commit: 86895ec13c11bdf4dc1feab0a3dfa003e02fde12
Parents: 3d6635a
Author: amoghvk <am...@citrix.com>
Authored: Wed Nov 26 14:45:50 2014 -0800
Committer: amoghvk <am...@citrix.com>
Committed: Wed Nov 26 14:45:50 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java  | 21 ++++++++++----------
 .../configuration/ConfigurationManagerImpl.java |  9 +++++++++
 2 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/86895ec1/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 0ef0e25..a1dd882 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -16,6 +16,15 @@
 // under the License.
 package com.cloud.configuration;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
+import org.apache.cloudstack.framework.config.ConfigKey;
+
 import com.cloud.agent.AgentManager;
 import com.cloud.consoleproxy.ConsoleProxyManager;
 import com.cloud.ha.HighAvailabilityManager;
@@ -29,14 +38,6 @@ import com.cloud.storage.snapshot.SnapshotManager;
 import com.cloud.template.TemplateManager;
 import com.cloud.vm.UserVmManager;
 import com.cloud.vm.snapshot.VMSnapshotManager;
-import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
-import org.apache.cloudstack.framework.config.ConfigKey;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.StringTokenizer;
 
 public enum Config {
 
@@ -438,7 +439,7 @@ public enum Config {
             "Console proxy command port that is used to communicate with management server",
             null),
     ConsoleProxyRestart("Console Proxy", AgentManager.class, Boolean.class, "consoleproxy.restart", "true", "Console proxy restart flag, defaulted to true", null),
-    ConsoleProxyUrlDomain("Console Proxy", AgentManager.class, String.class, "consoleproxy.url.domain", "", "Console proxy url domain", null),
+    ConsoleProxyUrlDomain("Console Proxy", AgentManager.class, String.class, "consoleproxy.url.domain", "", "Console proxy url domain", "domainName"),
     ConsoleProxyLoadscanInterval(
             "Console Proxy",
             AgentManager.class,
@@ -774,7 +775,7 @@ public enum Config {
             "secstorage.ssl.cert.domain",
             "",
             "SSL certificate used to encrypt copy traffic between zones",
-            null),
+            "domainName"),
     SecStorageCapacityStandby(
             "Advanced",
             AgentManager.class,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/86895ec1/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 57b50e6..9d25b30 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -327,6 +327,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
 
     private int _maxVolumeSizeInGb = Integer.parseInt(Config.MaxVolumeSize.getDefaultValue());
     private long _defaultPageSize = Long.parseLong(Config.DefaultPageSize.getDefaultValue());
+    private static final String DOMAIN_NAME_PATTERN = "^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$";
     protected Set<String> configValuesForValidation;
     private Set<String> weightBasedParametersForValidation;
     private Set<String> overprovisioningFactorsForValidation;
@@ -838,6 +839,14 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if (!NetUtils.verifyInstanceName(value)) {
                     return "Instance name can not contain hyphen, space or plus sign";
                 }
+            } else if (range.equalsIgnoreCase("domainName")) {
+                String domainName = value;
+                if (value.startsWith("*")) {
+                    domainName = value.substring(2); //skip the "*."
+                }
+                if (!domainName.matches(DOMAIN_NAME_PATTERN)) {
+                    return "Please enter a valid string for domain name, prefixed with '*.' if applicable";
+                }
             } else if (range.equals("routes")) {
                 String[] routes = value.split(",");
                 for (String route : routes) {


[34/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Revert "VM detail view: Disable 'change service offering' action per CLOUDSTACK-4200"

This reverts commit 73087bc3ffed4200e4e0a298b9e5539e248449a1.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/837a17b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/837a17b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/837a17b3

Branch: refs/heads/useraccount-refactoring
Commit: 837a17b3da8e419143a9d6ee9ad67c69deebdb0b
Parents: db9c97e
Author: Brian Federle <br...@citrix.com>
Authored: Wed Nov 26 14:18:01 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Nov 26 14:18:01 2014 -0800

----------------------------------------------------------------------
 ui/scripts/instances.js | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/837a17b3/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 7ee5db4..11aa725 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1459,9 +1459,6 @@
 
                     scaleUp: {
                         label: 'label.change.service.offering',
-                        preFilter: function() {
-                            return false;
-                        },
                         createForm: {
                             title: 'label.change.service.offering',
                             desc: function(args) {


[30/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7960: [Automation] Creation of Volume from Snapshot fails due to StringIndexOutOfBoundsException
Fixed the appropriate CopyCommand handler in simulator plugin


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4798db0d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4798db0d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4798db0d

Branch: refs/heads/useraccount-refactoring
Commit: 4798db0de1862bbdf7f2af67f7684f2f3430609e
Parents: bf56584
Author: Koushik Das <ko...@apache.org>
Authored: Wed Nov 26 16:00:54 2014 +0530
Committer: Koushik Das <ko...@apache.org>
Committed: Wed Nov 26 17:30:44 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/resource/SimulatorStorageProcessor.java         | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4798db0d/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
index 418dd0c..527b32f 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
@@ -151,7 +151,7 @@ public class SimulatorStorageProcessor implements StorageProcessor {
         int index = snapshot.getPath().lastIndexOf("/");
 
         String snapshotName = snapshot.getPath().substring(index + 1);
-        String snapshotRelPath = null;
+        String snapshotRelPath = "snapshots";
         SnapshotObjectTO newSnapshot = new SnapshotObjectTO();
         newSnapshot.setPath(snapshotRelPath + File.separator + snapshotName);
         return new CopyCmdAnswer(newSnapshot);
@@ -218,7 +218,6 @@ public class SimulatorStorageProcessor implements StorageProcessor {
         SnapshotObjectTO snapshot = (SnapshotObjectTO)srcData;
         String snapshotPath = snapshot.getPath();
         int index = snapshotPath.lastIndexOf("/");
-        snapshotPath = snapshotPath.substring(0, index);
         String snapshotName = snapshotPath.substring(index + 1);
         VolumeObjectTO newVol = new VolumeObjectTO();
         newVol.setPath(snapshotName);


[28/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7969: SC: Win8.1: Key translation fails for some  EN-US  keyboard keys.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a45ddb51
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a45ddb51
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a45ddb51

Branch: refs/heads/useraccount-refactoring
Commit: a45ddb514c13b0b72d47468fb2254e69520d37f6
Parents: ef2aa2c
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Wed Nov 26 13:28:25 2014 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Wed Nov 26 13:35:24 2014 +0530

----------------------------------------------------------------------
 ui/index.jsp | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a45ddb51/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 1000101..5ba6301 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -430,6 +430,7 @@
                                                 <option value="us">Standard (US) keyboard</option>
                                                 <option value="uk">UK keyboard</option>
                                                 <option value="jp">Japanese keyboard</option>
+                                                <option value="sc">Simplified Chinese keyboard</option>
                                             </select>
                                         </div>
                                     </div>


[51/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7908: Add user_id column to vm_instance table

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e25886b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e25886b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e25886b

Branch: refs/heads/useraccount-refactoring
Commit: 1e25886bd229a3b7b7aecafe2dc7eaeede47982e
Parents: 0128d62
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Nov 28 17:07:02 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Nov 28 23:32:37 2014 +0530

----------------------------------------------------------------------
 api/src/com/cloud/user/User.java                |   1 +
 .../api/command/user/vm/ListVMsCmd.java         |   8 +
 .../com/cloud/upgrade/dao/Upgrade450to460.java  |  39 ++++
 .../schema/src/com/cloud/vm/ConsoleProxyVO.java |   4 +-
 .../schema/src/com/cloud/vm/DomainRouterVO.java |  12 +-
 .../src/com/cloud/vm/SecondaryStorageVmVO.java  |   4 +-
 engine/schema/src/com/cloud/vm/UserVmVO.java    |   4 +-
 .../schema/src/com/cloud/vm/VMInstanceVO.java   |   9 +-
 .../network/lb/LoadBalanceRuleHandler.java      |  10 +-
 .../lb/InternalLoadBalancerVMManagerImpl.java   |  11 +-
 .../InternalLBVMManagerTest.java                |   2 +-
 .../InternalLBVMServiceTest.java                |   4 +-
 .../test/resources/lb_mgr.xml                   |   6 +-
 .../test/resources/lb_svc.xml                   |   4 +
 .../contrail/management/ServiceManagerImpl.java |   8 +-
 .../management/ServiceVirtualMachine.java       |   4 +-
 .../management/ManagementServerMock.java        |   2 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   5 +
 .../com/cloud/api/query/vo/UserVmJoinVO.java    |   7 +
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   2 +-
 .../cloud/network/router/NetworkHelperImpl.java |  11 +-
 .../security/SecurityManagerMBeanImpl.java      |   2 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  15 +-
 .../element/VirtualRouterElementTest.java       |   1 +
 .../cloud/storage/VolumeApiServiceImplTest.java |   8 +-
 server/test/com/cloud/vm/UserVmManagerTest.java |   2 +-
 .../com/cloud/vm/dao/UserVmDaoImplTest.java     |   2 +-
 .../affinity/AffinityApiUnitTest.java           |   2 +-
 .../SecondaryStorageManagerImpl.java            |   2 +-
 setup/db/db/schema-450to460.sql                 | 197 ++++++++++++++++++-
 30 files changed, 346 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/api/src/com/cloud/user/User.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/User.java b/api/src/com/cloud/user/User.java
index 36e9028..a2dcd1f 100644
--- a/api/src/com/cloud/user/User.java
+++ b/api/src/com/cloud/user/User.java
@@ -22,6 +22,7 @@ import org.apache.cloudstack.api.InternalIdentity;
 
 public interface User extends OwnedBy, InternalIdentity {
     public static final long UID_SYSTEM = 1;
+    public static final long UID_ADMIN = 2;
 
     @Override
     public long getId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index 76e3db0..7484759 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.List;
 
+import org.apache.cloudstack.api.response.UserResponse;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.RoleType;
@@ -126,6 +127,9 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
     @Parameter(name = ApiConstants.DISPLAY_VM, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin})
     private Boolean display;
 
+    @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, required = true, description = "the user ID that created the VM and is under the account that owns the VM")
+    private Long userId;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -142,6 +146,10 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
         return ids;
     }
 
+    public Long getUserId() {
+        return userId;
+    }
+
     public String getName() {
         return name;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
index 990371c..a0fdb54 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
@@ -19,6 +19,9 @@ package com.cloud.upgrade.dao;
 
 import java.io.File;
 import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
 
 import org.apache.log4j.Logger;
 
@@ -55,6 +58,42 @@ public class Upgrade450to460 implements DbUpgrade {
 
     @Override
     public void performDataMigration(Connection conn) {
+        updateVMInstanceUserId(conn);
+    }
+
+    public void updateVMInstanceUserId(Connection conn) {
+        // For schemas before this, copy first user from an account_id which deployed already running VMs
+        s_logger.debug("Updating vm_instance column user_id using first user in vm_instance's account_id");
+        String vmInstanceSql = "SELECT id, account_id FROM `cloud`.`vm_instance`";
+        String userSql = "SELECT id FROM `cloud`.`user` where account_id=?";
+        String userIdUpdateSql = "update `cloud`.`vm_instance` set user_id=? where id=?";
+        try(PreparedStatement selectStatement = conn.prepareStatement(vmInstanceSql)) {
+            ResultSet results = selectStatement.executeQuery();
+            while (results.next()) {
+                long vmId = results.getLong(1);
+                long accountId = results.getLong(2);
+                try (PreparedStatement selectUserStatement = conn.prepareStatement(userSql)) {
+                    selectUserStatement.setLong(1, accountId);
+                    ResultSet userResults = selectUserStatement.executeQuery();
+                    if (userResults.next()) {
+                        long userId = userResults.getLong(1);
+                        try (PreparedStatement updateStatement = conn.prepareStatement(userIdUpdateSql)) {
+                            updateStatement.setLong(1, userId);
+                            updateStatement.setLong(2, vmId);
+                            updateStatement.executeUpdate();
+                        } catch (SQLException e) {
+                            throw new CloudRuntimeException("Unable to update user ID " + userId + " on vm_instance id=" + vmId, e);
+                        }
+                    }
+
+                } catch (SQLException e) {
+                    throw new CloudRuntimeException("Unable to update user ID using accountId " + accountId + " on vm_instance id=" + vmId, e);
+                }
+            }
+        } catch (SQLException e) {
+            throw new CloudRuntimeException("Unable to update user Ids for previously deployed VMs", e);
+        }
+        s_logger.debug("Done updating user Ids for previously deployed VMs");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/vm/ConsoleProxyVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/ConsoleProxyVO.java b/engine/schema/src/com/cloud/vm/ConsoleProxyVO.java
index 670bc6a..9d79193 100644
--- a/engine/schema/src/com/cloud/vm/ConsoleProxyVO.java
+++ b/engine/schema/src/com/cloud/vm/ConsoleProxyVO.java
@@ -144,8 +144,8 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
      *
      */
     public ConsoleProxyVO(long id, long serviceOfferingId, String name, long templateId, HypervisorType hypervisorType, long guestOSId, long dataCenterId, long domainId,
-            long accountId, int activeSession, boolean haEnabled) {
-        super(id, serviceOfferingId, name, name, Type.ConsoleProxy, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+                          long accountId, long userId, int activeSession, boolean haEnabled) {
+        super(id, serviceOfferingId, name, name, Type.ConsoleProxy, templateId, hypervisorType, guestOSId, domainId, accountId, userId, haEnabled);
         this.activeSession = activeSession;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/vm/DomainRouterVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/DomainRouterVO.java b/engine/schema/src/com/cloud/vm/DomainRouterVO.java
index b7d9d8e..f08177c 100644
--- a/engine/schema/src/com/cloud/vm/DomainRouterVO.java
+++ b/engine/schema/src/com/cloud/vm/DomainRouterVO.java
@@ -76,9 +76,9 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
     private Long vpcId;
 
     public DomainRouterVO(long id, long serviceOfferingId, long elementId, String name, long templateId, HypervisorType hypervisorType, long guestOSId, long domainId,
-            long accountId, boolean isRedundantRouter, int priority, boolean isPriorityBumpUp, RedundantState redundantState, boolean haEnabled, boolean stopPending,
-            Long vpcId) {
-        super(id, serviceOfferingId, name, name, Type.DomainRouter, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+                          long accountId, long userId, boolean isRedundantRouter, int priority, boolean isPriorityBumpUp, RedundantState redundantState, boolean haEnabled, boolean stopPending,
+                          Long vpcId) {
+        super(id, serviceOfferingId, name, name, Type.DomainRouter, templateId, hypervisorType, guestOSId, domainId, accountId, userId, haEnabled);
         this.elementId = elementId;
         this.isRedundantRouter = isRedundantRouter;
         this.priority = priority;
@@ -89,9 +89,9 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
     }
 
     public DomainRouterVO(long id, long serviceOfferingId, long elementId, String name, long templateId, HypervisorType hypervisorType, long guestOSId, long domainId,
-            long accountId, boolean isRedundantRouter, int priority, boolean isPriorityBumpUp, RedundantState redundantState, boolean haEnabled, boolean stopPending,
-            VirtualMachine.Type vmType, Long vpcId) {
-        super(id, serviceOfferingId, name, name, vmType, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+                          long accountId, long userId, boolean isRedundantRouter, int priority, boolean isPriorityBumpUp, RedundantState redundantState, boolean haEnabled, boolean stopPending,
+                          Type vmType, Long vpcId) {
+        super(id, serviceOfferingId, name, name, vmType, templateId, hypervisorType, guestOSId, domainId, accountId, userId, haEnabled);
         this.elementId = elementId;
         this.isRedundantRouter = isRedundantRouter;
         this.priority = priority;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/vm/SecondaryStorageVmVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/SecondaryStorageVmVO.java b/engine/schema/src/com/cloud/vm/SecondaryStorageVmVO.java
index 042ac83..98b1725 100644
--- a/engine/schema/src/com/cloud/vm/SecondaryStorageVmVO.java
+++ b/engine/schema/src/com/cloud/vm/SecondaryStorageVmVO.java
@@ -64,8 +64,8 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
     private Date lastUpdateTime;
 
     public SecondaryStorageVmVO(long id, long serviceOfferingId, String name, long templateId, HypervisorType hypervisorType, long guestOSId, long dataCenterId,
-            long domainId, long accountId, Role role, boolean haEnabled) {
-        super(id, serviceOfferingId, name, name, Type.SecondaryStorageVm, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+                                long domainId, long accountId, long userId, Role role, boolean haEnabled) {
+        super(id, serviceOfferingId, name, name, Type.SecondaryStorageVm, templateId, hypervisorType, guestOSId, domainId, accountId, userId, haEnabled);
         this.role = role;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/vm/UserVmVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/UserVmVO.java b/engine/schema/src/com/cloud/vm/UserVmVO.java
index 81308af..f6740f8 100644
--- a/engine/schema/src/com/cloud/vm/UserVmVO.java
+++ b/engine/schema/src/com/cloud/vm/UserVmVO.java
@@ -70,8 +70,8 @@ public class UserVmVO extends VMInstanceVO implements UserVm {
     }
 
     public UserVmVO(long id, String instanceName, String displayName, long templateId, HypervisorType hypervisorType, long guestOsId, boolean haEnabled,
-            boolean limitCpuUse, long domainId, long accountId, long serviceOfferingId, String userData, String name, Long diskOfferingId) {
-        super(id, serviceOfferingId, name, instanceName, Type.User, templateId, hypervisorType, guestOsId, domainId, accountId, haEnabled, limitCpuUse, diskOfferingId);
+                    boolean limitCpuUse, long domainId, long accountId, long userId, long serviceOfferingId, String userData, String name, Long diskOfferingId) {
+        super(id, serviceOfferingId, name, instanceName, Type.User, templateId, hypervisorType, guestOsId, domainId, accountId, userId, haEnabled, limitCpuUse, diskOfferingId);
         this.userData = userData;
         this.displayName = displayName;
         this.details = new HashMap<String, String>();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/VMInstanceVO.java b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
index d542f33..8d48302 100644
--- a/engine/schema/src/com/cloud/vm/VMInstanceVO.java
+++ b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
@@ -141,6 +141,9 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     @Column(name = "account_id")
     protected long accountId;
 
+    @Column(name = "user_id")
+    protected long userId;
+
     @Column(name = "service_offering_id")
     protected long serviceOfferingId;
 
@@ -186,7 +189,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     protected Long powerHostId;
 
     public VMInstanceVO(long id, long serviceOfferingId, String name, String instanceName, Type type, Long vmTemplateId, HypervisorType hypervisorType, long guestOSId,
-            long domainId, long accountId, boolean haEnabled) {
+                        long domainId, long accountId, long userId, boolean haEnabled) {
         this.id = id;
         hostName = name != null ? name : uuid;
         if (vmTemplateId != null) {
@@ -213,8 +216,8 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     }
 
     public VMInstanceVO(long id, long serviceOfferingId, String name, String instanceName, Type type, Long vmTemplateId, HypervisorType hypervisorType, long guestOSId,
-            long domainId, long accountId, boolean haEnabled, boolean limitResourceUse, Long diskOfferingId) {
-        this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+                        long domainId, long accountId, long userId, boolean haEnabled, boolean limitResourceUse, Long diskOfferingId) {
+        this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, userId, haEnabled);
         limitCpuUse = limitResourceUse;
         this.diskOfferingId = diskOfferingId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/LoadBalanceRuleHandler.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/LoadBalanceRuleHandler.java b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/LoadBalanceRuleHandler.java
index 32292cd..14c8fca 100644
--- a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/LoadBalanceRuleHandler.java
+++ b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/LoadBalanceRuleHandler.java
@@ -27,6 +27,7 @@ import java.util.Random;
 
 import javax.inject.Inject;
 
+import com.cloud.user.dao.UserDao;
 import org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRuleCmd;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
@@ -140,6 +141,8 @@ public class LoadBalanceRuleHandler {
     private PhysicalNetworkServiceProviderDao _physicalProviderDao;
     @Inject
     private VirtualRouterProviderDao _vrProviderDao;
+    @Inject
+    private UserDao _userDao;
 
     static final private String ELB_VM_NAME_PREFIX = "l";
 
@@ -272,8 +275,13 @@ public class LoadBalanceRuleHandler {
                     throw new CloudRuntimeException("Cannot find virtual router provider " + typeString + " as service provider " + provider.getId());
                 }
 
+                long userId = CallContext.current().getCallingUserId();
+                if (CallContext.current().getCallingAccount().getId() != owner.getId()) {
+                    userId =  _userDao.listByAccount(owner.getAccountId()).get(0).getId();
+                }
+
                 elbVm = new DomainRouterVO(id, _elasticLbVmOffering.getId(), vrProvider.getId(), VirtualMachineName.getSystemVmName(id, _instance, ELB_VM_NAME_PREFIX),
-                        template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), false, 0, false, RedundantState.UNKNOWN,
+                        template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), userId, false, 0, false, RedundantState.UNKNOWN,
                         _elasticLbVmOffering.getOfferHA(), false, VirtualMachine.Type.ElasticLoadBalancerVm, null);
                 elbVm.setRole(Role.LB);
                 elbVm = _routerDao.persist(elbVm);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
index 8b5b3e0..db54153 100644
--- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
+++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
@@ -27,6 +27,8 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import com.cloud.user.dao.UserDao;
+import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO;
@@ -164,6 +166,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
     VMTemplateDao _templateDao;
     @Inject
     ResourceManager _resourceMgr;
+    @Inject
+    UserDao _userDao;
 
     @Override
     public boolean finalizeVirtualMachineProfile(VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) {
@@ -760,9 +764,14 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                     continue;
                 }
 
+                long userId = CallContext.current().getCallingUserId();
+                if (CallContext.current().getCallingAccount().getId() != owner.getId()) {
+                    userId =  _userDao.listByAccount(owner.getAccountId()).get(0).getId();
+                }
+
                 internalLbVm =
                     new DomainRouterVO(id, routerOffering.getId(), internalLbProviderId, VirtualMachineName.getSystemVmName(id, _instance, InternalLbVmNamePrefix),
-                        template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), false, 0, false,
+                        template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), userId, false, 0, false,
                         RedundantState.UNKNOWN, false, false, VirtualMachine.Type.InternalLoadBalancerVm, vpcId);
                 internalLbVm.setRole(Role.INTERNAL_LB_VM);
                 internalLbVm = _internalLbVmDao.persist(internalLbVm);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
index 375ba5e..b675feb 100644
--- a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
+++ b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
@@ -126,7 +126,7 @@ public class InternalLBVMManagerTest extends TestCase {
         ComponentContext.initComponentsLifeCycle();
 
         vm =
-            new DomainRouterVO(1L, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, false, 0, false, null, false, false,
+            new DomainRouterVO(1L, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, 1, false, 0, false, null, false, false,
                 VirtualMachine.Type.InternalLoadBalancerVm, null);
         vm.setRole(Role.INTERNAL_LB_VM);
         vm = setId(vm, 1);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
index 11a0bed..2b00046 100644
--- a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
+++ b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
@@ -101,11 +101,11 @@ public class InternalLBVMServiceTest extends TestCase {
         CallContext.register(_accountMgr.getSystemUser(), _accountMgr.getSystemAccount());
 
         DomainRouterVO validVm =
-            new DomainRouterVO(validVmId, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, false, 0, false, null, false, false,
+            new DomainRouterVO(validVmId, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, 1, false, 0, false, null, false, false,
                 VirtualMachine.Type.InternalLoadBalancerVm, null);
         validVm.setRole(Role.INTERNAL_LB_VM);
         DomainRouterVO nonInternalLbVm =
-            new DomainRouterVO(validVmId, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, false, 0, false, null, false, false,
+            new DomainRouterVO(validVmId, off.getId(), 1, "alena", 1, HypervisorType.XenServer, 1, 1, 1, 1, false, 0, false, null, false, false,
                 VirtualMachine.Type.DomainRouter, null);
         nonInternalLbVm.setRole(Role.VIRTUAL_ROUTER);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/internal-loadbalancer/test/resources/lb_mgr.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/resources/lb_mgr.xml b/plugins/network-elements/internal-loadbalancer/test/resources/lb_mgr.xml
index 1ad6403..4f202b3 100644
--- a/plugins/network-elements/internal-loadbalancer/test/resources/lb_mgr.xml
+++ b/plugins/network-elements/internal-loadbalancer/test/resources/lb_mgr.xml
@@ -40,7 +40,11 @@
     <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl">
         <property name="name" value="InternalLoadBalancerVMManager"/>
     </bean>
-  
+
+    <bean id="UserDao" class="com.cloud.user.dao.UserDaoImpl">
+        <property name="name" value="UserDao"/>
+    </bean>
+
     <bean class="org.apache.cloudstack.internallbvmmgr.LbChildTestConfiguration" />
     
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/internal-loadbalancer/test/resources/lb_svc.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/resources/lb_svc.xml b/plugins/network-elements/internal-loadbalancer/test/resources/lb_svc.xml
index fa822f3..73054f5 100644
--- a/plugins/network-elements/internal-loadbalancer/test/resources/lb_svc.xml
+++ b/plugins/network-elements/internal-loadbalancer/test/resources/lb_svc.xml
@@ -40,6 +40,10 @@
     <bean id="InternalLoadBalancerVMService" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl">
         <property name="name" value="InternalLoadBalancerVMService"/>
     </bean>
+
+    <bean id="UserDao" class="com.cloud.user.dao.UserDaoImpl">
+        <property name="name" value="UserDao"/>
+    </bean>
   
     <bean class="org.apache.cloudstack.internallbvmmgr.LbChildTestConfiguration" />
     

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java
index f34eacc..1927a70 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java
@@ -109,9 +109,15 @@ public class ServiceManagerImpl implements ServiceManager {
         networks.put((NetworkVO)left, new ArrayList<NicProfile>());
         networks.put((NetworkVO)right, new ArrayList<NicProfile>());
         String instanceName = VirtualMachineName.getVmName(id, owner.getId(), "SRV");
+
+        long userId = CallContext.current().getCallingUserId();
+        if (CallContext.current().getCallingAccount().getId() != owner.getId()) {
+            userId =  _userDao.listByAccount(owner.getAccountId()).get(0).getId();
+        }
+
         ServiceVirtualMachine svm =
             new ServiceVirtualMachine(id, instanceName, name, template.getId(), serviceOffering.getId(), template.getHypervisorType(), template.getGuestOSId(),
-                zone.getId(), owner.getDomainId(), owner.getAccountId(), false);
+                zone.getId(), owner.getDomainId(), owner.getAccountId(), userId, false);
 
         // database synchronization code must be able to distinguish service instance VMs.
         Map<String, String> kvmap = new HashMap<String, String>();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceVirtualMachine.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceVirtualMachine.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceVirtualMachine.java
index 8985bc1..676afc9 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceVirtualMachine.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceVirtualMachine.java
@@ -22,7 +22,7 @@ import com.cloud.vm.UserVmVO;
 
 public class ServiceVirtualMachine extends UserVmVO {
     public ServiceVirtualMachine(long id, String instanceName, String name, long templateId, long serviceOfferingId, HypervisorType hypervisorType, long guestOSId,
-            long dataCenterId, long domainId, long accountId, boolean haEnabled) {
-        super(id, instanceName, name, templateId, hypervisorType, guestOSId, false, false, domainId, accountId, serviceOfferingId, null, name, null);
+                                 long dataCenterId, long domainId, long accountId, long userId, boolean haEnabled) {
+        super(id, instanceName, name, templateId, hypervisorType, guestOSId, false, false, domainId, accountId, userId, serviceOfferingId, null, name, null);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java
index 50419ea..3dfcc0f 100644
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java
@@ -239,7 +239,7 @@ public class ManagementServerMock {
         long id = _userVmDao.getNextInSequence(Long.class, "id");
         UserVmVO vm =
             new UserVmVO(id, name, name, tmpl.getId(), HypervisorType.XenServer, tmpl.getGuestOSId(), false, false, _zone.getDomainId(), Account.ACCOUNT_ID_SYSTEM,
-                small.getId(), null, name, null);
+                    1, small.getId(), null, name, null);
         vm.setState(com.cloud.vm.VirtualMachine.State.Running);
         vm.setHostId(_hostId);
         vm.setDataCenterId(network.getDataCenterId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 418b81c..8912c6c 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -772,6 +772,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
         boolean listAll = cmd.listAll();
         Long id = cmd.getId();
+        Long userId = cmd.getUserId();
         Map<String, String> tags = cmd.getTags();
         Boolean display = cmd.getDisplay();
         Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean, ListProjectResourcesCriteria>(
@@ -862,6 +863,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             sb.and("instanceGroupId", sb.entity().getInstanceGroupId(), SearchCriteria.Op.EQ);
         }
 
+        if (userId != null) {
+            sb.and("userId", sb.entity().getUserId(), SearchCriteria.Op.EQ);
+        }
+
         if (networkId != null) {
             sb.and("networkId", sb.entity().getNetworkId(), SearchCriteria.Op.EQ);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
index 2b0b155..66e2efc 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -51,6 +51,9 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
     @Column(name = "display_name", updatable = false, nullable = false, length = 255)
     private String displayName = null;
 
+    @Column(name = "userId")
+    private long userId;
+
     @Column(name = "account_id")
     private long accountId;
 
@@ -410,6 +413,10 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
         return displayName;
     }
 
+    public long getUserId() {
+        return userId;
+    }
+
     @Override
     public long getAccountId() {
         return accountId;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 65930aa..64009a7 100644
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -719,7 +719,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
 
         ConsoleProxyVO proxy =
             new ConsoleProxyVO(id, _serviceOffering.getId(), name, template.getId(), template.getHypervisorType(), template.getGuestOSId(), dataCenterId,
-                systemAcct.getDomainId(), systemAcct.getId(), 0, _serviceOffering.getOfferHA());
+                systemAcct.getDomainId(), systemAcct.getId(), _accountMgr.getSystemUser().getId(), 0, _serviceOffering.getOfferHA());
         proxy.setDynamicallyScalable(template.isDynamicallyScalable());
         proxy = _consoleProxyDao.persist(proxy);
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/network/router/NetworkHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java
index 968251c..2fdad27 100644
--- a/server/src/com/cloud/network/router/NetworkHelperImpl.java
+++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java
@@ -28,6 +28,8 @@ import javax.annotation.PostConstruct;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import com.cloud.user.dao.UserDao;
+import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.log4j.Logger;
@@ -147,6 +149,8 @@ public class NetworkHelperImpl implements NetworkHelper {
     private RouterControlHelper _routerControlHelper;
     @Inject
     protected NetworkOrchestrationService _networkMgr;
+    @Inject
+    private UserDao _userDao;
 
     protected final Map<HypervisorType, ConfigKey<String>> hypervisorsMap = new HashMap<>();
 
@@ -513,9 +517,14 @@ public class NetworkHelperImpl implements NetworkHelper {
                 // VPC because it is not a VPC offering.
                 Long vpcId = routerDeploymentDefinition.getVpc() != null ? routerDeploymentDefinition.getVpc().getId() : null;
 
+                long userId = CallContext.current().getCallingUserId();
+                if (CallContext.current().getCallingAccount().getId() != owner.getId()) {
+                    userId =  _userDao.listByAccount(owner.getAccountId()).get(0).getId();
+                }
+
                 router = new DomainRouterVO(id, routerOffering.getId(), routerDeploymentDefinition.getVirtualProvider().getId(), VirtualMachineName.getRouterName(id,
                         s_vmInstanceName), template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(),
-                        routerDeploymentDefinition.isRedundant(), 0, false, RedundantState.UNKNOWN, offerHA, false, vpcId);
+                        userId, routerDeploymentDefinition.isRedundant(), 0, false, RedundantState.UNKNOWN, offerHA, false, vpcId);
 
                 router.setDynamicallyScalable(template.isDynamicallyScalable());
                 router.setRole(Role.VIRTUAL_ROUTER);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/network/security/SecurityManagerMBeanImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/security/SecurityManagerMBeanImpl.java b/server/src/com/cloud/network/security/SecurityManagerMBeanImpl.java
index 4c64fca..7b768ab 100644
--- a/server/src/com/cloud/network/security/SecurityManagerMBeanImpl.java
+++ b/server/src/com/cloud/network/security/SecurityManagerMBeanImpl.java
@@ -128,7 +128,7 @@ public class SecurityManagerMBeanImpl extends StandardMBean implements SecurityG
     @Override
     public void simulateVmStart(Long vmId) {
         //all we need is the vmId
-        VMInstanceVO vm = new VMInstanceVO(vmId, 5, "foo", "foo", Type.User, null, HypervisorType.Any, 8, 1, 1, false, false, null);
+        VMInstanceVO vm = new VMInstanceVO(vmId, 5, "foo", "foo", Type.User, null, HypervisorType.Any, 8, 1, 1, 1, false, false, null);
         _sgMgr.handleVmStarted(vm);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 0cab57c..39788e9 100644
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2938,7 +2938,12 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
 
         checkIfHostNameUniqueInNtwkDomain(hostName, networkList);
 
-        UserVmVO vm = commitUserVm(zone, template, hostName, displayName, owner, diskOfferingId, diskSize, userData, caller, isDisplayVm, keyboard, accountId, offering,
+        long userId = CallContext.current().getCallingUserId();
+        if (CallContext.current().getCallingAccount().getId() != owner.getId()) {
+            userId =  _userDao.listByAccount(owner.getAccountId()).get(0).getId();
+        }
+
+        UserVmVO vm = commitUserVm(zone, template, hostName, displayName, owner, diskOfferingId, diskSize, userData, caller, isDisplayVm, keyboard, accountId, userId, offering,
                 isIso, sshPublicKey, networkNicMap, id, instanceName, uuidName, hypervisorType, customParameters);
 
         // Assign instance to the group
@@ -2996,14 +3001,14 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
     }
 
     private UserVmVO commitUserVm(final DataCenter zone, final VirtualMachineTemplate template, final String hostName, final String displayName, final Account owner,
-            final Long diskOfferingId, final Long diskSize, final String userData, final Account caller, final Boolean isDisplayVm, final String keyboard,
-            final long accountId, final ServiceOfferingVO offering, final boolean isIso, final String sshPublicKey, final LinkedHashMap<String, NicProfile> networkNicMap,
-            final long id, final String instanceName, final String uuidName, final HypervisorType hypervisorType, final Map<String, String> customParameters) throws InsufficientCapacityException {
+                                  final Long diskOfferingId, final Long diskSize, final String userData, final Account caller, final Boolean isDisplayVm, final String keyboard,
+                                  final long accountId, final long userId, final ServiceOfferingVO offering, final boolean isIso, final String sshPublicKey, final LinkedHashMap<String, NicProfile> networkNicMap,
+                                  final long id, final String instanceName, final String uuidName, final HypervisorType hypervisorType, final Map<String, String> customParameters) throws InsufficientCapacityException {
         return Transaction.execute(new TransactionCallbackWithException<UserVmVO, InsufficientCapacityException>() {
             @Override
             public UserVmVO doInTransaction(TransactionStatus status) throws InsufficientCapacityException {
                 UserVmVO vm = new UserVmVO(id, instanceName, displayName, template.getId(), hypervisorType, template.getGuestOSId(), offering.getOfferHA(), offering
-                        .getLimitCpuUse(), owner.getDomainId(), owner.getId(), offering.getId(), userData, hostName, diskOfferingId);
+                        .getLimitCpuUse(), owner.getDomainId(), owner.getId(), userId, offering.getId(), userData, hostName, diskOfferingId);
                 vm.setUuid(uuidName);
                 vm.setDynamicallyScalable(template.isDynamicallyScalable());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/test/com/cloud/network/element/VirtualRouterElementTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/element/VirtualRouterElementTest.java b/server/test/com/cloud/network/element/VirtualRouterElementTest.java
index f1d9ce0..f2403ca 100644
--- a/server/test/com/cloud/network/element/VirtualRouterElementTest.java
+++ b/server/test/com/cloud/network/element/VirtualRouterElementTest.java
@@ -285,6 +285,7 @@ public class VirtualRouterElementTest {
                 /* guestOSId */ 0L,
                 /* domainId */ 0L,
                 /* accountId */ 1L,
+                /* userId */ 1L,
                 /* isRedundantRouter */ false,
                 /* priority */ 0,
                 /* isPriorityBumpUp */ false,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/test/com/cloud/storage/VolumeApiServiceImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/storage/VolumeApiServiceImplTest.java b/server/test/com/cloud/storage/VolumeApiServiceImplTest.java
index c60aa50..0786059 100644
--- a/server/test/com/cloud/storage/VolumeApiServiceImplTest.java
+++ b/server/test/com/cloud/storage/VolumeApiServiceImplTest.java
@@ -122,7 +122,7 @@ public class VolumeApiServiceImplTest {
             when(_svc._volsDao.findById(1L)).thenReturn(volumeOfRunningVm);
 
             UserVmVO runningVm = new UserVmVO(1L, "vm", "vm", 1, HypervisorType.XenServer, 1L, false,
-                    false, 1L, 1L, 1L, null, "vm", null);
+                    false, 1L, 1L, 1, 1L, null, "vm", null);
             runningVm.setState(State.Running);
             runningVm.setDataCenterId(1L);
             when(_svc._userVmDao.findById(1L)).thenReturn(runningVm);
@@ -134,7 +134,7 @@ public class VolumeApiServiceImplTest {
             when(_svc._volsDao.findById(2L)).thenReturn(volumeOfStoppedVm);
 
             UserVmVO stoppedVm = new UserVmVO(2L, "vm", "vm", 1, HypervisorType.XenServer, 1L, false,
-                    false, 1L, 1L, 1L, null, "vm", null);
+                    false, 1L, 1L, 1, 1L, null, "vm", null);
             stoppedVm.setState(State.Stopped);
             stoppedVm.setDataCenterId(1L);
             when(_svc._userVmDao.findById(2L)).thenReturn(stoppedVm);
@@ -142,7 +142,7 @@ public class VolumeApiServiceImplTest {
 
             // volume of hyperV vm id=3
             UserVmVO hyperVVm = new UserVmVO(3L, "vm", "vm", 1, HypervisorType.Hyperv, 1L, false,
-                    false, 1L, 1L, 1L, null, "vm", null);
+                    false, 1L, 1L, 1, 1L, null, "vm", null);
             hyperVVm.setState(State.Stopped);
             hyperVVm.setDataCenterId(1L);
             when(_svc._userVmDao.findById(3L)).thenReturn(hyperVVm);
@@ -199,7 +199,7 @@ public class VolumeApiServiceImplTest {
 
             // vm having root volume
             UserVmVO vmHavingRootVolume = new UserVmVO(4L, "vm", "vm", 1, HypervisorType.XenServer, 1L, false,
-                    false, 1L, 1L, 1L, null, "vm", null);
+                    false, 1L, 1L, 1, 1L, null, "vm", null);
             vmHavingRootVolume.setState(State.Stopped);
             vmHavingRootVolume.setDataCenterId(1L);
             when(_svc._userVmDao.findById(4L)).thenReturn(vmHavingRootVolume);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/test/com/cloud/vm/UserVmManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/UserVmManagerTest.java b/server/test/com/cloud/vm/UserVmManagerTest.java
index d86e55e..af76d17 100644
--- a/server/test/com/cloud/vm/UserVmManagerTest.java
+++ b/server/test/com/cloud/vm/UserVmManagerTest.java
@@ -625,7 +625,7 @@ public class UserVmManagerTest {
         Account oldAccount = new AccountVO("testaccount", 1, "networkdomain", (short)0, UUID.randomUUID().toString());
         Account newAccount = new AccountVO("testaccount", 1, "networkdomain", (short)1, UUID.randomUUID().toString());
 
-        UserVmVO vm = new UserVmVO(10L, "test", "test", 1L, HypervisorType.Any, 1L, false, false, 1L, 1L, 5L, "test", "test", 1L);
+        UserVmVO vm = new UserVmVO(10L, "test", "test", 1L, HypervisorType.Any, 1L, false, false, 1L, 1L, 1, 5L, "test", "test", 1L);
         vm.setState(VirtualMachine.State.Stopped);
         when(_vmDao.findById(anyLong())).thenReturn(vm);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
index b46ac7d..49de99a 100644
--- a/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
+++ b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
@@ -47,7 +47,7 @@ public class UserVmDaoImplTest extends TestCase {
 
         // Persist the data.
         UserVmVO vo =
-            new UserVmVO(vmId, instanceName, displayName, templateId, hypervisor, guestOsId, haEnabled, limitCpuUse, domainId, accountId, serviceOfferingId, userdata,
+            new UserVmVO(vmId, instanceName, displayName, templateId, hypervisor, guestOsId, haEnabled, limitCpuUse, domainId, accountId, 1, serviceOfferingId, userdata,
                 name, diskOfferingId);
         dao.persist(vo);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index 7bfe351..b12dbaa 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -203,7 +203,7 @@ public class AffinityApiUnitTest {
     @Test(expected = InvalidParameterValueException.class)
     public void updateAffinityGroupVMRunning() throws ResourceInUseException {
 
-        UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any, 21L, false, false, domainId, 200L, 5L, "", "test", 1L);
+        UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any, 21L, false, false, domainId, 200L, 1, 5L, "", "test", 1L);
         vm.setState(VirtualMachine.State.Running);
         when(_vmDao.findById(10L)).thenReturn(vm);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
index 3ba4242..870b4da 100644
--- a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
+++ b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
@@ -573,7 +573,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
 
         SecondaryStorageVmVO secStorageVm =
             new SecondaryStorageVmVO(id, _serviceOffering.getId(), name, template.getId(), template.getHypervisorType(), template.getGuestOSId(), dataCenterId,
-                systemAcct.getDomainId(), systemAcct.getId(), role, _serviceOffering.getOfferHA());
+                systemAcct.getDomainId(), systemAcct.getId(), _accountMgr.getSystemUser().getId(), role, _serviceOffering.getOfferHA());
         secStorageVm.setDynamicallyScalable(template.isDynamicallyScalable());
         secStorageVm = _secStorageVmDao.persist(secStorageVm);
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e25886b/setup/db/db/schema-450to460.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-450to460.sql b/setup/db/db/schema-450to460.sql
index 8480c85..cd2e663 100644
--- a/setup/db/db/schema-450to460.sql
+++ b/setup/db/db/schema-450to460.sql
@@ -19,4 +19,199 @@
 -- Schema upgrade from 4.5.0 to 4.6.0
 --
 
-INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'management-server', "stats.output.uri", "", "URI to additionally send StatsCollector statistics to", "", NULL, NULL, 0);
\ No newline at end of file
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'management-server', "stats.output.uri", "", "URI to additionally send StatsCollector statistics to", "", NULL, NULL, 0);
+
+ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `user_id` bigint unsigned NOT NULL DEFAULT 1 COMMENT 'user id of VM deployer';
+
+DROP VIEW IF EXISTS `cloud`.`user_vm_view`;
+CREATE VIEW `cloud`.`user_vm_view` AS
+    select
+        vm_instance.id id,
+        vm_instance.name name,
+        user_vm.display_name display_name,
+        user_vm.user_data user_data,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        instance_group.id instance_group_id,
+        instance_group.uuid instance_group_uuid,
+        instance_group.name instance_group_name,
+        vm_instance.uuid uuid,
+        vm_instance.user_id user_id,
+        vm_instance.last_host_id last_host_id,
+        vm_instance.vm_type type,
+        vm_instance.vnc_password vnc_password,
+        vm_instance.limit_cpu_use limit_cpu_use,
+        vm_instance.created created,
+        vm_instance.state state,
+        vm_instance.removed removed,
+        vm_instance.ha_enabled ha_enabled,
+        vm_instance.hypervisor_type hypervisor_type,
+        vm_instance.instance_name instance_name,
+        vm_instance.guest_os_id guest_os_id,
+        vm_instance.display_vm display_vm,
+        guest_os.uuid guest_os_uuid,
+        vm_instance.pod_id pod_id,
+        host_pod_ref.uuid pod_uuid,
+        vm_instance.private_ip_address private_ip_address,
+        vm_instance.private_mac_address private_mac_address,
+        vm_instance.vm_type vm_type,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.is_security_group_enabled security_group_enabled,
+        data_center.networktype data_center_type,
+        host.id host_id,
+        host.uuid host_uuid,
+        host.name host_name,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        vm_template.name template_name,
+        vm_template.display_text template_display_text,
+        vm_template.enable_password password_enabled,
+        iso.id iso_id,
+        iso.uuid iso_uuid,
+        iso.name iso_name,
+        iso.display_text iso_display_text,
+        service_offering.id service_offering_id,
+        svc_disk_offering.uuid service_offering_uuid,
+        disk_offering.uuid disk_offering_uuid,
+        disk_offering.id disk_offering_id,
+        Case
+             When (`cloud`.`service_offering`.`cpu` is null) then (`custom_cpu`.`value`)
+             Else ( `cloud`.`service_offering`.`cpu`)
+        End as `cpu`,
+        Case
+            When (`cloud`.`service_offering`.`speed` is null) then (`custom_speed`.`value`)
+            Else ( `cloud`.`service_offering`.`speed`)
+        End as `speed`,
+        Case
+            When (`cloud`.`service_offering`.`ram_size` is null) then (`custom_ram_size`.`value`)
+            Else ( `cloud`.`service_offering`.`ram_size`)
+        END as `ram_size`,
+        svc_disk_offering.name service_offering_name,
+        disk_offering.name disk_offering_name,
+        storage_pool.id pool_id,
+        storage_pool.uuid pool_uuid,
+        storage_pool.pool_type pool_type,
+        volumes.id volume_id,
+        volumes.uuid volume_uuid,
+        volumes.device_id volume_device_id,
+        volumes.volume_type volume_type,
+        security_group.id security_group_id,
+        security_group.uuid security_group_uuid,
+        security_group.name security_group_name,
+        security_group.description security_group_description,
+        nics.id nic_id,
+        nics.uuid nic_uuid,
+        nics.network_id network_id,
+        nics.ip4_address ip_address,
+        nics.ip6_address ip6_address,
+        nics.ip6_gateway ip6_gateway,
+        nics.ip6_cidr ip6_cidr,
+        nics.default_nic is_default_nic,
+        nics.gateway gateway,
+        nics.netmask netmask,
+        nics.mac_address mac_address,
+        nics.broadcast_uri broadcast_uri,
+        nics.isolation_uri isolation_uri,
+        vpc.id vpc_id,
+        vpc.uuid vpc_uuid,
+        networks.uuid network_uuid,
+        networks.name network_name,
+        networks.traffic_type traffic_type,
+        networks.guest_type guest_type,
+        user_ip_address.id public_ip_id,
+        user_ip_address.uuid public_ip_uuid,
+        user_ip_address.public_ip_address public_ip_address,
+        ssh_keypairs.keypair_name keypair_name,
+        resource_tags.id tag_id,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id,
+        affinity_group.id affinity_group_id,
+        affinity_group.uuid affinity_group_uuid,
+        affinity_group.name affinity_group_name,
+        affinity_group.description affinity_group_description,
+        vm_instance.dynamically_scalable dynamically_scalable
+
+    from
+        `cloud`.`user_vm`
+            inner join
+        `cloud`.`vm_instance` ON vm_instance.id = user_vm.id
+            and vm_instance.removed is NULL
+            inner join
+        `cloud`.`account` ON vm_instance.account_id = account.id
+            inner join
+        `cloud`.`domain` ON vm_instance.domain_id = domain.id
+            left join
+        `cloud`.`guest_os` ON vm_instance.guest_os_id = guest_os.id
+            left join
+        `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`instance_group_vm_map` ON vm_instance.id = instance_group_vm_map.instance_id
+            left join
+        `cloud`.`instance_group` ON instance_group_vm_map.group_id = instance_group.id
+            left join
+        `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+            left join
+        `cloud`.`host` ON vm_instance.host_id = host.id
+            left join
+        `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+            left join
+        `cloud`.`vm_template` iso ON iso.id = user_vm.iso_id
+            left join
+        `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+            left join
+        `cloud`.`disk_offering` svc_disk_offering ON vm_instance.service_offering_id = svc_disk_offering.id
+            left join
+        `cloud`.`disk_offering` ON vm_instance.disk_offering_id = disk_offering.id
+            left join
+        `cloud`.`volumes` ON vm_instance.id = volumes.instance_id
+            left join
+        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+            left join
+        `cloud`.`security_group_vm_map` ON vm_instance.id = security_group_vm_map.instance_id
+            left join
+        `cloud`.`security_group` ON security_group_vm_map.security_group_id = security_group.id
+            left join
+        `cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
+            left join
+        `cloud`.`networks` ON nics.network_id = networks.id
+            left join
+        `cloud`.`vpc` ON networks.vpc_id = vpc.id and vpc.removed is null
+            left join
+        `cloud`.`user_ip_address` ON user_ip_address.vm_id = vm_instance.id
+            left join
+        `cloud`.`user_vm_details` as ssh_details ON ssh_details.vm_id = vm_instance.id
+            and ssh_details.name = 'SSH.PublicKey'
+            left join
+        `cloud`.`ssh_keypairs` ON ssh_keypairs.public_key = ssh_details.value
+            left join
+        `cloud`.`resource_tags` ON resource_tags.resource_id = vm_instance.id
+            and resource_tags.resource_type = 'UserVm'
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+            and async_job.instance_type = 'VirtualMachine'
+            and async_job.job_status = 0
+            left join
+        `cloud`.`affinity_group_vm_map` ON vm_instance.id = affinity_group_vm_map.instance_id
+            left join
+        `cloud`.`affinity_group` ON affinity_group_vm_map.affinity_group_id = affinity_group.id
+            left join
+        `cloud`.`user_vm_details` `custom_cpu`  ON (((`custom_cpu`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_cpu`.`name` = 'CpuNumber')))
+            left join
+        `cloud`.`user_vm_details` `custom_speed`  ON (((`custom_speed`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_speed`.`name` = 'CpuSpeed')))
+           left join
+        `cloud`.`user_vm_details` `custom_ram_size`  ON (((`custom_ram_size`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_ram_size`.`name` = 'memory')));


[03/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
4.4.2 upgrade schema
remove 441to450 ddl
(cherry picked from commit 5578616143f2eb1aded26b86101c73858a67fa35)
(cherry picked from commit f18d6238b0219061e5ad81dc8852de6290da9e55)

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java

schema: Add upgrade paths from 4.3.2 to 4.4.0

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit 73c62837b5f9e0c4acb1f513c32f3c9579316e00)

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
	engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
	setup/db/db/schema-441to450.sql

merged new work from schema-441to450.sql into schema-442to450.sql


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3cb78fc7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3cb78fc7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3cb78fc7

Branch: refs/heads/useraccount-refactoring
Commit: 3cb78fc74221e521c205b21590e6d8a4a24e6b91
Parents: d475b62
Author: Daan Hoogland <da...@onecht.net>
Authored: Thu Nov 13 20:01:35 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Nov 24 16:25:44 2014 +0100

----------------------------------------------------------------------
 .../cloud/upgrade/DatabaseUpgradeChecker.java   | 138 ++--
 .../com/cloud/upgrade/dao/Upgrade441to442.java  |  64 ++
 .../com/cloud/upgrade/dao/Upgrade441to450.java  | 239 ------
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 234 ++++++
 setup/db/db/schema-441to442.sql                 |  21 +
 setup/db/db/schema-441to450-cleanup.sql         |  33 -
 setup/db/db/schema-441to450.sql                 | 770 -------------------
 setup/db/db/schema-442to450-cleanup.sql         |  33 +
 setup/db/db/schema-442to450.sql                 | 770 +++++++++++++++++++
 9 files changed, 1203 insertions(+), 1099 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index c7216cb..dcf32d8 100644
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -69,7 +69,8 @@ import com.cloud.upgrade.dao.Upgrade430to440;
 import com.cloud.upgrade.dao.Upgrade431to440;
 import com.cloud.upgrade.dao.Upgrade432to440;
 import com.cloud.upgrade.dao.Upgrade440to441;
-import com.cloud.upgrade.dao.Upgrade441to450;
+import com.cloud.upgrade.dao.Upgrade441to442;
+import com.cloud.upgrade.dao.Upgrade442to450;
 import com.cloud.upgrade.dao.Upgrade450to460;
 import com.cloud.upgrade.dao.UpgradeSnapshot217to224;
 import com.cloud.upgrade.dao.UpgradeSnapshot223to224;
@@ -100,8 +101,8 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
                 new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
                 new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
                 new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
-                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.1.8", new DbUpgrade[] {new Upgrade218to22(), new Upgrade221to222(), new UpgradeSnapshot217to224(),
                 new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(), new Upgrade225to226(),
@@ -109,7 +110,8 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
                 new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
                 new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
                 new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.1.9", new DbUpgrade[] {new Upgrade218to22(), new Upgrade221to222(), new UpgradeSnapshot217to224(),
                 new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(), new Upgrade225to226(),
@@ -117,161 +119,183 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
                 new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
                 new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
                 new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.1", new DbUpgrade[] {new Upgrade221to222(), new UpgradeSnapshot223to224(), new Upgrade222to224(),
                 new Upgrade224to225(), new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(),
                 new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
                 new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
                 new Upgrade410to420(),
-                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.2", new DbUpgrade[] {new Upgrade222to224(), new UpgradeSnapshot223to224(), new Upgrade224to225(),
                 new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
                 new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
                 new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.3", new DbUpgrade[] {new Upgrade222to224(), new UpgradeSnapshot223to224(), new Upgrade224to225(),
                 new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
                 new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
                 new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.4", new DbUpgrade[] {new Upgrade224to225(), new Upgrade225to226(), new Upgrade227to228(),
                 new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(),
                 new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(),
                 new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.5", new DbUpgrade[] {new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(),
                 new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
                 new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
-                new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.6", new DbUpgrade[] {new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
                 new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
                 new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.7", new DbUpgrade[] {new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
                 new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
                 new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
                 new Upgrade410to420(),
-                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+            new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.8", new DbUpgrade[] {new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
-                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30()
-        , new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-        new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(),
+                new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.9", new DbUpgrade[] {new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(),
                 new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(),
                 new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.10", new DbUpgrade[] {new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
                 new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
                 new Upgrade410to420(),
                 new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
-
-        _upgradeMap.put("2.2.10", new DbUpgrade[] {new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
-                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.12", new DbUpgrade[] {new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
                 new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(), new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.13", new DbUpgrade[] {new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(),
                 new Upgrade301to302(), new Upgrade302to40(),
-                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
+                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(),
                 new Upgrade450to460()});
 
         _upgradeMap.put("2.2.14", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
                 new Upgrade302to40(), new Upgrade40to41(),
-                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
-
-        _upgradeMap.put("2.2.13", new DbUpgrade[] {new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
-                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
-
-        _upgradeMap.put("2.2.14", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
-                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.0", new DbUpgrade[] {new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
-                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.1", new DbUpgrade[] {new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.2", new DbUpgrade[] {new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.0.0", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.0.1", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
+
+        _upgradeMap.put("4.0.1", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to442(), new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.0.2", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.1.0", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade441to442(), new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade441to442(), new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.2.0", new DbUpgrade[] {new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
+        _upgradeMap.put("4.2.0", new DbUpgrade[] {new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(),
                 new Upgrade450to460()});
 
-        _upgradeMap.put("4.2.1", new DbUpgrade[] {new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.2.1", new DbUpgrade[] {new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.3.0", new DbUpgrade[] {new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.3.0", new DbUpgrade[] {new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.3.1", new DbUpgrade[] {new Upgrade431to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.3.1", new DbUpgrade[] {new Upgrade431to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.3.2", new DbUpgrade[] {new Upgrade432to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.3.2", new DbUpgrade[] {new Upgrade432to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.4.0", new DbUpgrade[] {new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.4.0", new DbUpgrade[] {new Upgrade440to441(), new Upgrade441to442(),
+            new Upgrade442to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.4.1", new DbUpgrade[] {new Upgrade441to450(), new Upgrade450to460()});
+        _upgradeMap.put("4.4.1", new DbUpgrade[] {new Upgrade441to442(), new Upgrade442to450(), new Upgrade450to460()});
+
+        _upgradeMap.put("4.4.2", new DbUpgrade[] {new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("4.5.0", new DbUpgrade[] {new Upgrade450to460()});
 
         //CP Upgrades
         _upgradeMap.put("3.0.3", new DbUpgrade[] {new Upgrade303to304(), new Upgrade304to305(), new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
-                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(),
-                new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.4", new DbUpgrade[] {new Upgrade304to305(), new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(), new Upgrade410to420(),
-                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450(),
-                new Upgrade450to460()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.5", new DbUpgrade[] {new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(), new Upgrade410to420(), new Upgrade420to421(),
-                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.6", new DbUpgrade[] {new Upgrade306to307(), new Upgrade307to410(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.7", new DbUpgrade[] {new Upgrade307to410(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
-                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.15", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
                 new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
                 new Upgrade410to420(),
                 new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.16", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
                 new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
                 new Upgrade410to420(),
                 new Upgrade420to421(), new Upgrade421to430(),
-                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+                new Upgrade442to450(), new Upgrade450to460()});
     }
 
     protected void runScript(Connection conn, File file) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to442.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to442.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to442.java
new file mode 100644
index 0000000..bd50dfb
--- /dev/null
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to442.java
@@ -0,0 +1,64 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.upgrade.dao;
+
+import java.io.File;
+import java.sql.Connection;
+
+import org.apache.log4j.Logger;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.script.Script;
+
+public class Upgrade441to442 implements DbUpgrade {
+    final static Logger s_logger = Logger.getLogger(Upgrade441to442.class);
+
+    @Override
+    public String[] getUpgradableVersionRange() {
+        return new String[] {"4.4.1", "4.4.2"};
+    }
+
+    @Override
+    public String getUpgradedVersion() {
+        return "4.4.2";
+    }
+
+    @Override
+    public boolean supportsRollingUpgrade() {
+        return false;
+    }
+
+    @Override
+    public File[] getPrepareScripts() {
+        String script = Script.findScript("", "db/schema-441to442.sql");
+        if (script == null) {
+            throw new CloudRuntimeException("Unable to find db/schema-441to442.sql");
+        }
+
+        return new File[] {new File(script)};
+    }
+
+    @Override
+    public void performDataMigration(Connection conn) {
+    }
+
+    @Override
+    public File[] getCleanupScripts() {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
deleted file mode 100644
index 4e2bcad..0000000
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
+++ /dev/null
@@ -1,239 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package com.cloud.upgrade.dao;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.cloud.hypervisor.Hypervisor;
-import org.apache.log4j.Logger;
-
-import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.utils.script.Script;
-
-public class Upgrade441to450 implements DbUpgrade {
-    final static Logger s_logger = Logger.getLogger(Upgrade441to450.class);
-
-    @Override
-    public String[] getUpgradableVersionRange() {
-        return new String[] {"4.4.1", "4.5.0"};
-    }
-
-    @Override
-    public String getUpgradedVersion() {
-        return "4.5.0";
-    }
-
-    @Override
-    public boolean supportsRollingUpgrade() {
-        return false;
-    }
-
-    @Override
-    public File[] getPrepareScripts() {
-        String script = Script.findScript("", "db/schema-441to450.sql");
-        if (script == null) {
-            throw new CloudRuntimeException("Unable to find db/schema-441to450.sql");
-        }
-
-        return new File[] {new File(script)};
-    }
-
-    @Override
-    public void performDataMigration(Connection conn) {
-        updateSystemVmTemplates(conn);
-        dropInvalidKeyFromStoragePoolTable(conn);
-        dropDuplicatedForeignKeyFromAsyncJobTable(conn);
-    }
-
-
-    @Override
-    public File[] getCleanupScripts() {
-        String script = Script.findScript("", "db/schema-441to450-cleanup.sql");
-        if (script == null) {
-            throw new CloudRuntimeException("Unable to find db/schema-441to450-cleanup.sql");
-        }
-
-        return new File[] {new File(script)};
-    }
-
-    private void updateSystemVmTemplates(Connection conn) {
-        s_logger.debug("Updating System Vm template IDs");
-        try {
-            //Get all hypervisors in use
-            Set<Hypervisor.HypervisorType> hypervisorsListInUse = new HashSet<Hypervisor.HypervisorType>();
-            try (PreparedStatement sel_hyp_type_pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null");) {
-                try (ResultSet hyp_type_rs = sel_hyp_type_pstmt.executeQuery();) {
-                    while (hyp_type_rs.next()) {
-                        switch (Hypervisor.HypervisorType.getType(hyp_type_rs.getString(1))) {
-                            case XenServer:
-                                hypervisorsListInUse.add(Hypervisor.HypervisorType.XenServer);
-                                break;
-                            case KVM:
-                                hypervisorsListInUse.add(Hypervisor.HypervisorType.KVM);
-                                break;
-                            case VMware:
-                                hypervisorsListInUse.add(Hypervisor.HypervisorType.VMware);
-                                break;
-                            case Hyperv:
-                                hypervisorsListInUse.add(Hypervisor.HypervisorType.Hyperv);
-                                break;
-                            case LXC:
-                                hypervisorsListInUse.add(Hypervisor.HypervisorType.LXC);
-                                break;
-                        }
-                    }
-                } catch (SQLException e) {
-                    throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                }
-            } catch (SQLException e) {
-                throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-            }
-            Map<Hypervisor.HypervisorType, String> NewTemplateNameList = new HashMap<Hypervisor.HypervisorType, String>() {
-                {
-                    put(Hypervisor.HypervisorType.XenServer, "systemvm-xenserver-4.5");
-                    put(Hypervisor.HypervisorType.VMware, "systemvm-vmware-4.5");
-                    put(Hypervisor.HypervisorType.KVM, "systemvm-kvm-4.5");
-                    put(Hypervisor.HypervisorType.LXC, "systemvm-lxc-4.5");
-                    put(Hypervisor.HypervisorType.Hyperv, "systemvm-hyperv-4.5");
-                }
-            };
-            Map<Hypervisor.HypervisorType, String> routerTemplateConfigurationNames = new HashMap<Hypervisor.HypervisorType, String>() {
-                {
-                    put(Hypervisor.HypervisorType.XenServer, "router.template.xen");
-                    put(Hypervisor.HypervisorType.VMware, "router.template.vmware");
-                    put(Hypervisor.HypervisorType.KVM, "router.template.kvm");
-                    put(Hypervisor.HypervisorType.LXC, "router.template.lxc");
-                    put(Hypervisor.HypervisorType.Hyperv, "router.template.hyperv");
-                }
-            };
-            Map<Hypervisor.HypervisorType, String> newTemplateUrl = new HashMap<Hypervisor.HypervisorType, String>() {
-                {
-                    put(Hypervisor.HypervisorType.XenServer, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-xen.vhd.bz2");
-                    put(Hypervisor.HypervisorType.VMware, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-vmware.ova");
-                    put(Hypervisor.HypervisorType.KVM, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-kvm.qcow2.bz2");
-                    put(Hypervisor.HypervisorType.LXC, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-kvm.qcow2.bz2");
-                    put(Hypervisor.HypervisorType.Hyperv, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-hyperv.vhd.zip");
-                }
-            };
-            Map<Hypervisor.HypervisorType, String> newTemplateChecksum = new HashMap<Hypervisor.HypervisorType, String>() {
-                {
-                    put(Hypervisor.HypervisorType.XenServer, "2b15ab4401c2d655264732d3fc600241");
-                    put(Hypervisor.HypervisorType.VMware, "3106a79a4ce66cd7f6a7c50e93f2db57");
-                    put(Hypervisor.HypervisorType.KVM, "aa9f501fecd3de1daeb9e2f357f6f002");
-                    put(Hypervisor.HypervisorType.LXC, "aa9f501fecd3de1daeb9e2f357f6f002");
-                    put(Hypervisor.HypervisorType.Hyperv, "70bd30ea02ee9ed67d2c6b85c179cee9");
-                }
-            };
-            for (Map.Entry<Hypervisor.HypervisorType, String> hypervisorAndTemplateName : NewTemplateNameList.entrySet()) {
-                s_logger.debug("Updating " + hypervisorAndTemplateName.getKey() + " System Vms");
-                try (PreparedStatement sel_templ_pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = ? and removed is null order by id desc limit 1");)
-                {
-                    //Get 4.5.0 system Vm template Id for corresponding hypervisor
-                    sel_templ_pstmt.setString(1, hypervisorAndTemplateName.getValue());
-                    try (ResultSet rs = sel_templ_pstmt.executeQuery();)
-                    {
-                        if (rs.next()) {
-                            long templateId = rs.getLong(1);
-                            try(PreparedStatement update_cloud_templ_pstmt = conn.prepareStatement("update `cloud`.`vm_template` set type='SYSTEM' where id = ?");)
-                            {
-                                update_cloud_templ_pstmt.setLong(1, templateId);
-                                update_cloud_templ_pstmt.executeUpdate();
-                                // update templete ID of system Vms
-                            }catch (SQLException e) {
-                                throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                            }
-                            try(PreparedStatement update_instance_pstmt = conn.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = ?");) {
-                                update_instance_pstmt.setLong(1, templateId);
-                                update_instance_pstmt.setString(2, hypervisorAndTemplateName.getKey().toString());
-                                update_instance_pstmt.executeUpdate();
-                            }catch (SQLException e) {
-                                throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                            }
-                            // Change value of global configuration parameter router.template.* for the corresponding hypervisor
-                            try(PreparedStatement  update_cloud_pstmt = conn.prepareStatement("UPDATE `cloud`.`configuration` SET value = ? WHERE name = ?");)
-                            {
-                                update_cloud_pstmt.setString(1, hypervisorAndTemplateName.getValue());
-                                update_cloud_pstmt.setString(2, routerTemplateConfigurationNames.get(hypervisorAndTemplateName.getKey()));
-                                update_cloud_pstmt.executeUpdate();
-                            }catch (SQLException e) {
-                                throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                            }
-                        } else {
-                            if (hypervisorsListInUse.contains(hypervisorAndTemplateName.getKey())) {
-                                throw new CloudRuntimeException("4.5.0 " + hypervisorAndTemplateName.getKey() + " SystemVm template not found. Cannot upgrade system Vms");
-                            } else {
-                                s_logger.warn("4.5.0 " + hypervisorAndTemplateName.getKey() + " SystemVm template not found. " + hypervisorAndTemplateName.getKey() + " hypervisor is not used, so not failing upgrade");
-                                // Update the latest template URLs for corresponding hypervisor
-                                try (PreparedStatement update_pstmt = conn.prepareStatement("UPDATE `cloud`.`vm_template` SET url = ? , checksum = ? WHERE hypervisor_type = ? AND type = 'SYSTEM' AND removed is null order by id desc limit 1");) {
-                                    update_pstmt.setString(1, newTemplateUrl.get(hypervisorAndTemplateName.getKey()));
-                                    update_pstmt.setString(2, newTemplateChecksum.get(hypervisorAndTemplateName.getKey()));
-                                    update_pstmt.setString(3, hypervisorAndTemplateName.getKey().toString());
-                                    update_pstmt.executeUpdate();
-                                } catch (SQLException e) {
-                                    throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                                }
-                            }
-                        }
-                    } catch (SQLException e) {
-                        throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-                    }
-                }
-                s_logger.debug("Updating System Vm Template IDs Complete");
-            }
-        }catch(SQLException e){
-            throw new CloudRuntimeException("updateSystemVmTemplates:Exception:" + e.getMessage(), e);
-        }
-    }
-
-
-    private void dropInvalidKeyFromStoragePoolTable(Connection conn) {
-        HashMap<String, List<String>> uniqueKeys = new HashMap<String, List<String>>();
-        List<String> keys = new ArrayList<String>();
-
-        keys.add("id_2");
-        uniqueKeys.put("storage_pool", keys);
-
-        s_logger.debug("Dropping id_2 key from storage_pool table");
-        for (Map.Entry<String, List<String>> entry: uniqueKeys.entrySet()) {
-            DbUpgradeUtils.dropKeysIfExist(conn,entry.getKey(), entry.getValue(), false);
-        }
-    }
-
-    private void dropDuplicatedForeignKeyFromAsyncJobTable(Connection conn) {
-        HashMap<String, List<String>> foreignKeys = new HashMap<String, List<String>>();
-        List<String> keys = new ArrayList<String>();
-
-        keys.add("fk_async_job_join_map__join_job_id");
-        foreignKeys.put("async_job_join_map", keys);
-
-        s_logger.debug("Dropping fk_async_job_join_map__join_job_id key from async_job_join_map table");
-        for (Map.Entry<String, List<String>> entry: foreignKeys.entrySet()) {
-            DbUpgradeUtils.dropKeysIfExist(conn,entry.getKey(), entry.getValue(), true);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
new file mode 100644
index 0000000..dc1057f
--- /dev/null
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
@@ -0,0 +1,234 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.upgrade.dao;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.cloud.hypervisor.Hypervisor;
+import org.apache.log4j.Logger;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.script.Script;
+
+public class Upgrade442to450 implements DbUpgrade {
+    final static Logger s_logger = Logger.getLogger(Upgrade442to450.class);
+
+    @Override
+    public String[] getUpgradableVersionRange() {
+        return new String[] {"4.4.2", "4.5.0"};
+    }
+
+    @Override
+    public String getUpgradedVersion() {
+        return "4.5.0";
+    }
+
+    @Override
+    public boolean supportsRollingUpgrade() {
+        return false;
+    }
+
+    @Override
+    public File[] getPrepareScripts() {
+        String script = Script.findScript("", "db/schema-442to450.sql");
+        if (script == null) {
+            throw new CloudRuntimeException("Unable to find db/schema-442to450.sql");
+        }
+
+        return new File[] {new File(script)};
+    }
+
+    @Override
+    public void performDataMigration(Connection conn) {
+        updateSystemVmTemplates(conn);
+        dropInvalidKeyFromStoragePoolTable(conn);
+        dropDuplicatedForeignKeyFromAsyncJobTable(conn);
+    }
+
+
+    @Override
+    public File[] getCleanupScripts() {
+        String script = Script.findScript("", "db/schema-442to450-cleanup.sql");
+        if (script == null) {
+            throw new CloudRuntimeException("Unable to find db/schema-442to450-cleanup.sql");
+        }
+
+        return new File[] {new File(script)};
+    }
+
+    private void updateSystemVmTemplates(Connection conn) {
+        PreparedStatement pstmt = null;
+        ResultSet rs = null;
+        s_logger.debug("Updating System Vm template IDs");
+        try{
+            //Get all hypervisors in use
+            Set<Hypervisor.HypervisorType> hypervisorsListInUse = new HashSet<Hypervisor.HypervisorType>();
+            try {
+                pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null");
+                rs = pstmt.executeQuery();
+                while(rs.next()){
+                    switch (Hypervisor.HypervisorType.getType(rs.getString(1))) {
+                        case XenServer: hypervisorsListInUse.add(Hypervisor.HypervisorType.XenServer);
+                            break;
+                        case KVM:       hypervisorsListInUse.add(Hypervisor.HypervisorType.KVM);
+                            break;
+                        case VMware:    hypervisorsListInUse.add(Hypervisor.HypervisorType.VMware);
+                            break;
+                        case Hyperv:    hypervisorsListInUse.add(Hypervisor.HypervisorType.Hyperv);
+                            break;
+                        case LXC:       hypervisorsListInUse.add(Hypervisor.HypervisorType.LXC);
+                            break;
+                    }
+                }
+            } catch (SQLException e) {
+                throw new CloudRuntimeException("Error while listing hypervisors in use", e);
+            }
+
+            Map<Hypervisor.HypervisorType, String> NewTemplateNameList = new HashMap<Hypervisor.HypervisorType, String>(){
+                {   put(Hypervisor.HypervisorType.XenServer, "systemvm-xenserver-4.5");
+                    put(Hypervisor.HypervisorType.VMware, "systemvm-vmware-4.5");
+                    put(Hypervisor.HypervisorType.KVM, "systemvm-kvm-4.5");
+                    put(Hypervisor.HypervisorType.LXC, "systemvm-lxc-4.5");
+                    put(Hypervisor.HypervisorType.Hyperv, "systemvm-hyperv-4.5");
+                }
+            };
+
+            Map<Hypervisor.HypervisorType, String> routerTemplateConfigurationNames = new HashMap<Hypervisor.HypervisorType, String>(){
+                {   put(Hypervisor.HypervisorType.XenServer, "router.template.xen");
+                    put(Hypervisor.HypervisorType.VMware, "router.template.vmware");
+                    put(Hypervisor.HypervisorType.KVM, "router.template.kvm");
+                    put(Hypervisor.HypervisorType.LXC, "router.template.lxc");
+                    put(Hypervisor.HypervisorType.Hyperv, "router.template.hyperv");
+                }
+            };
+
+            Map<Hypervisor.HypervisorType, String> newTemplateUrl = new HashMap<Hypervisor.HypervisorType, String>(){
+                {   put(Hypervisor.HypervisorType.XenServer, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-xen.vhd.bz2");
+                    put(Hypervisor.HypervisorType.VMware, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-vmware.ova");
+                    put(Hypervisor.HypervisorType.KVM, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-kvm.qcow2.bz2");
+                    put(Hypervisor.HypervisorType.LXC, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-kvm.qcow2.bz2");
+                    put(Hypervisor.HypervisorType.Hyperv, "http://download.cloud.com/templates/4.5/systemvm64template-4.5-hyperv.vhd.zip");
+                }
+            };
+
+            Map<Hypervisor.HypervisorType, String> newTemplateChecksum = new HashMap<Hypervisor.HypervisorType, String>(){
+                {   put(Hypervisor.HypervisorType.XenServer, "2b15ab4401c2d655264732d3fc600241");
+                    put(Hypervisor.HypervisorType.VMware, "3106a79a4ce66cd7f6a7c50e93f2db57");
+                    put(Hypervisor.HypervisorType.KVM, "aa9f501fecd3de1daeb9e2f357f6f002");
+                    put(Hypervisor.HypervisorType.LXC, "aa9f501fecd3de1daeb9e2f357f6f002");
+                    put(Hypervisor.HypervisorType.Hyperv, "70bd30ea02ee9ed67d2c6b85c179cee9");
+                }
+            };
+
+            for (Map.Entry<Hypervisor.HypervisorType, String> hypervisorAndTemplateName : NewTemplateNameList.entrySet()){
+                s_logger.debug("Updating " + hypervisorAndTemplateName.getKey() + " System Vms");
+                try {
+                    //Get 4.5.0 system Vm template Id for corresponding hypervisor
+                    pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = ? and removed is null order by id desc limit 1");
+                    pstmt.setString(1, hypervisorAndTemplateName.getValue());
+                    rs = pstmt.executeQuery();
+                    if(rs.next()){
+                        long templateId = rs.getLong(1);
+                        rs.close();
+                        pstmt.close();
+                        pstmt = conn.prepareStatement("update `cloud`.`vm_template` set type='SYSTEM' where id = ?");
+                        pstmt.setLong(1, templateId);
+                        pstmt.executeUpdate();
+                        pstmt.close();
+                        // update templete ID of system Vms
+                        pstmt = conn.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = ?");
+                        pstmt.setLong(1, templateId);
+                        pstmt.setString(2, hypervisorAndTemplateName.getKey().toString());
+                        pstmt.executeUpdate();
+                        pstmt.close();
+                        // Change value of global configuration parameter router.template.* for the corresponding hypervisor
+                        pstmt = conn.prepareStatement("UPDATE `cloud`.`configuration` SET value = ? WHERE name = ?");
+                        pstmt.setString(1, hypervisorAndTemplateName.getValue());
+                        pstmt.setString(2, routerTemplateConfigurationNames.get(hypervisorAndTemplateName.getKey()));
+                        pstmt.executeUpdate();
+                        pstmt.close();
+                    } else {
+                        if (hypervisorsListInUse.contains(hypervisorAndTemplateName.getKey())){
+                            throw new CloudRuntimeException("4.5.0 " + hypervisorAndTemplateName.getKey() + " SystemVm template not found. Cannot upgrade system Vms");
+                        } else {
+                            s_logger.warn("4.5.0 " + hypervisorAndTemplateName.getKey() + " SystemVm template not found. " + hypervisorAndTemplateName.getKey() + " hypervisor is not used, so not failing upgrade");
+                            // Update the latest template URLs for corresponding hypervisor
+                            pstmt = conn.prepareStatement("UPDATE `cloud`.`vm_template` SET url = ? , checksum = ? WHERE hypervisor_type = ? AND type = 'SYSTEM' AND removed is null order by id desc limit 1");
+                            pstmt.setString(1, newTemplateUrl.get(hypervisorAndTemplateName.getKey()));
+                            pstmt.setString(2, newTemplateChecksum.get(hypervisorAndTemplateName.getKey()));
+                            pstmt.setString(3, hypervisorAndTemplateName.getKey().toString());
+                            pstmt.executeUpdate();
+                            pstmt.close();
+                        }
+                    }
+                } catch (SQLException e) {
+                    throw new CloudRuntimeException("Error while updating "+ hypervisorAndTemplateName.getKey() +" systemVm template", e);
+                }
+            }
+            s_logger.debug("Updating System Vm Template IDs Complete");
+        } finally {
+            try {
+                if (rs != null) {
+                    rs.close();
+                }
+
+                if (pstmt != null) {
+                    pstmt.close();
+                }
+            } catch (SQLException e) {
+            }
+        }
+    }
+
+
+    private void dropInvalidKeyFromStoragePoolTable(Connection conn) {
+        HashMap<String, List<String>> uniqueKeys = new HashMap<String, List<String>>();
+        List<String> keys = new ArrayList<String>();
+
+        keys.add("id_2");
+        uniqueKeys.put("storage_pool", keys);
+
+        s_logger.debug("Dropping id_2 key from storage_pool table");
+        for (Map.Entry<String, List<String>> entry: uniqueKeys.entrySet()) {
+            DbUpgradeUtils.dropKeysIfExist(conn,entry.getKey(), entry.getValue(), false);
+        }
+    }
+
+    private void dropDuplicatedForeignKeyFromAsyncJobTable(Connection conn) {
+        HashMap<String, List<String>> foreignKeys = new HashMap<String, List<String>>();
+        List<String> keys = new ArrayList<String>();
+
+        keys.add("fk_async_job_join_map__join_job_id");
+        foreignKeys.put("async_job_join_map", keys);
+
+        s_logger.debug("Dropping fk_async_job_join_map__join_job_id key from async_job_join_map table");
+        for (Map.Entry<String, List<String>> entry: foreignKeys.entrySet()) {
+            DbUpgradeUtils.dropKeysIfExist(conn,entry.getKey(), entry.getValue(), true);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/setup/db/db/schema-441to442.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-441to442.sql b/setup/db/db/schema-441to442.sql
new file mode 100644
index 0000000..3b1618c
--- /dev/null
+++ b/setup/db/db/schema-441to442.sql
@@ -0,0 +1,21 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+--;
+-- Schema upgrade from 4.4.1 to 4.4.2;
+--;
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/setup/db/db/schema-441to450-cleanup.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-441to450-cleanup.sql b/setup/db/db/schema-441to450-cleanup.sql
deleted file mode 100644
index d657d2e..0000000
--- a/setup/db/db/schema-441to450-cleanup.sql
+++ /dev/null
@@ -1,33 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---   http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied.  See the License for the
--- specific language governing permissions and limitations
--- under the License.
-
---
--- Schema cleanup from 4.4.0 to 4.5.0
---
-
-UPDATE `cloud`.`configuration`
-SET name = 'router.template.xenserver'
-Where name = 'router.template.xen';
-
-UPDATE `cloud`.`configuration`
-SET name = 'xenserver.nics.max',
-description = 'Maximum allowed nics for Vms created on XenServer'
-Where name = 'xen.nics.max';
-
-UPDATE `cloud`.`configuration`
-SET value = 'XenServer'
-Where value = 'Xen';
\ No newline at end of file


[48/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Add support for Debian 7 on KVM/LXC


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9f4c267d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9f4c267d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9f4c267d

Branch: refs/heads/useraccount-refactoring
Commit: 9f4c267d5651fdd2b429a52f8792812f229c44d8
Parents: daa57f6
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Thu Nov 27 20:40:38 2014 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Thu Nov 27 20:40:38 2014 +0100

----------------------------------------------------------------------
 setup/db/db/schema-442to450.sql | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f4c267d/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 14dcc51..267e655 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -981,3 +981,10 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervis
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.1', 'rhel6_64Guest', 253, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5.5', 'rhel6Guest', 252, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '5,5', 'rhel6_64Guest', 253, utc_timestamp(), 0);
+
+--Support for Debian 7 on KVM/LXC
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Debian GNU/Linux 7(32-bit)', 183, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Debian GNU/Linux 7(64-bit)', 184, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'LXC', 'default', 'Debian GNU/Linux 7(32-bit)', 183, utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'LXC', 'default', 'Debian GNU/Linux 7(64-bit)', 184, utc_timestamp(), 0);
+


[13/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7965: Fix script related to force delete domain test case

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f825288
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f825288
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f825288

Branch: refs/heads/useraccount-refactoring
Commit: 4f825288290cc7ec67301a3aa1306d30eb1e682b
Parents: 9585aa0
Author: Ashutosh K <as...@clogeny.com>
Authored: Mon Nov 24 16:16:55 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:18:16 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_persistent_networks.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f825288/test/integration/component/test_persistent_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_persistent_networks.py b/test/integration/component/test_persistent_networks.py
index f782700..ff563df 100644
--- a/test/integration/component/test_persistent_networks.py
+++ b/test/integration/component/test_persistent_networks.py
@@ -2784,15 +2784,15 @@ class TestVPCNetworkOperations(cloudstackTestCase):
                 "vlan must not be null for persistent network: %s" %
                 persistent_network_2.id)
 
-            # Force delete domain
-            child_domain.delete(self.apiclient, cleanup=True)
-
         except Exception as e:
             self.cleanup.append(account_1)
             self.cleanup.append(account_2)
             self.cleanup.append(child_domain)
             self.fail(e)
 
+        # Force delete domain
+        child_domain.delete(self.apiclient, cleanup=True)
+
         self.debug("Waiting for account.cleanup.interval" +
                    " to cleanup any remaining resouces")
         # Sleep 3*account.gc to ensure that all resources are deleted


[08/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7966:
remove snapshot_store_ref entry, in which role is Primary, during
storage GC


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e5b3d02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e5b3d02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e5b3d02

Branch: refs/heads/useraccount-refactoring
Commit: 4e5b3d028dc990f27484b79db67926c4371715ac
Parents: 73087bc
Author: Edison Su <su...@gmail.com>
Authored: Mon Nov 24 14:25:29 2014 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Mon Nov 24 14:27:56 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/storage/StorageManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5b3d02/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 1184320..e78a015 100644
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -1176,6 +1176,10 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
                         }
 
                         _snapshotDao.remove(destroyedSnapshotStoreVO.getSnapshotId());
+                        SnapshotDataStoreVO snapshotOnPrimary = _snapshotStoreDao.findBySnapshot(destroyedSnapshotStoreVO.getSnapshotId(), DataStoreRole.Primary);
+                        if (snapshotOnPrimary != null) {
+                            _snapshotStoreDao.remove(snapshotOnPrimary.getId());
+                        }
                         _snapshotStoreDao.remove(destroyedSnapshotStoreVO.getId());
                     }
 


[38/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7977
Fix password generator, add guards for minimum length


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/960b7bbf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/960b7bbf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/960b7bbf

Branch: refs/heads/useraccount-refactoring
Commit: 960b7bbf742bbba62cd25bc62b700c6c829e35f2
Parents: 95ea203
Author: amoghvk <am...@citrix.com>
Authored: Wed Nov 26 15:08:48 2014 -0800
Committer: amoghvk <am...@citrix.com>
Committed: Wed Nov 26 15:08:48 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java  |  8 ++++++
 .../configuration/ConfigurationManagerImpl.java |  5 ++++
 .../src/com/cloud/utils/PasswordGenerator.java  | 26 ++++++++++++++------
 .../com/cloud/utils/PasswordGeneratorTest.java  |  7 +++---
 4 files changed, 35 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index a1dd882..cd0824e 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -908,6 +908,14 @@ public enum Config {
             "0",
             "Default disk I/O read rate in requests per second allowed in User vm's disk.",
             null),
+    VmPasswordLength(
+            "Advanced",
+            ManagementServer.class,
+            Integer.class,
+            "vm.password.length",
+            "6",
+            "Specifies the length of a randomly generated password",
+            null),
     VmDiskThrottlingIopsWriteRate(
             "Advanced",
             ManagementServer.class,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 714e6fc..918dd93 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -367,6 +367,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         configValuesForValidation.add("xenserver.heartbeat.interval");
         configValuesForValidation.add("xenserver.heartbeat.timeout");
         configValuesForValidation.add("incorrect.login.attempts.allowed");
+        configValuesForValidation.add("vm.password.length");
     }
 
     private void weightBasedParametersForValidation() {
@@ -780,6 +781,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if (val <= 0) {
                     throw new InvalidParameterValueException("Please enter a positive value for the configuration parameter:" + name);
                 }
+                //TODO - better validation for all password pamameters
+                if ("vm.password.length".equalsIgnoreCase(name) && val < 6) {
+                    throw new InvalidParameterValueException("Please enter a value greater than 6 for the configuration parameter:" + name);
+                }
             } catch (NumberFormatException e) {
                 s_logger.error("There was an error trying to parse the integer value for:" + name);
                 throw new InvalidParameterValueException("There was an error trying to parse the integer value for:" + name);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/utils/src/com/cloud/utils/PasswordGenerator.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/PasswordGenerator.java b/utils/src/com/cloud/utils/PasswordGenerator.java
index b6e4bed..6fa2843 100644
--- a/utils/src/com/cloud/utils/PasswordGenerator.java
+++ b/utils/src/com/cloud/utils/PasswordGenerator.java
@@ -35,18 +35,28 @@ public class PasswordGenerator {
     static private char[] alphaNumeric = new char[] {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
         'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '2', '3', '4', '5', '6', '7', '8', '9'};
 
+    static private int minLength = 3;
+
     public static String generateRandomPassword(int num) {
         Random r = new SecureRandom();
         StringBuilder password = new StringBuilder();
 
-        // Generate random 3-character string with a lowercase character,
-        // uppercase character, and a digit
-        password.append(generateLowercaseChar(r)).append(generateUppercaseChar(r)).append(generateDigit(r));
-
-        // Generate a random n-character string with only lowercase
-        // characters
-        for (int i = 0; i < num; i++) {
-            password.append(generateLowercaseChar(r));
+        //Guard for num < minLength
+        if (num < minLength) {
+            //Add alphanumeric chars at random
+            for (int i = 0; i < minLength; i++) {
+                password.append(generateAlphaNumeric(r));
+            }
+        } else {
+            // Generate random 3-character string with a lowercase character,
+            // uppercase character, and a digit
+            password.append(generateLowercaseChar(r)).append(generateUppercaseChar(r)).append(generateDigit(r));
+
+            // Generate a random n-character string with only lowercase
+            // characters
+            for (int i = 0; i < num - 3; i++) {
+                password.append(generateLowercaseChar(r));
+            }
         }
 
         return password.toString();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/utils/test/com/cloud/utils/PasswordGeneratorTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/PasswordGeneratorTest.java b/utils/test/com/cloud/utils/PasswordGeneratorTest.java
index 3e82d98..bd87987 100644
--- a/utils/test/com/cloud/utils/PasswordGeneratorTest.java
+++ b/utils/test/com/cloud/utils/PasswordGeneratorTest.java
@@ -25,10 +25,11 @@ import org.junit.Test;
 public class PasswordGeneratorTest {
     @Test
     public void generateRandomPassword() {
-        // actual length is requested length + 3
+        // actual length is requested length, minimum length is 3
         Assert.assertTrue(PasswordGenerator.generateRandomPassword(0).length() == 3);
-        Assert.assertTrue(PasswordGenerator.generateRandomPassword(1).length() == 4);
-        String password = PasswordGenerator.generateRandomPassword(0);
+        Assert.assertTrue(PasswordGenerator.generateRandomPassword(1).length() == 3);
+        Assert.assertTrue(PasswordGenerator.generateRandomPassword(5).length() == 5);
+        String password = PasswordGenerator.generateRandomPassword(8);
         // TODO: this might give more help to bruteforcing than desired
         // the actual behavior is that the first character is a random lowercase
         // char


[10/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7917: Validating Load Balancer Rule when updating LB + unit test

Signed-off-by: Rajani Karuturi <ra...@gmail.com>
(cherry picked from commit c919ff83d81528b89017b5f5731b2e46350e3dfa)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/02ca6f2e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/02ca6f2e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/02ca6f2e

Branch: refs/heads/useraccount-refactoring
Commit: 02ca6f2e5b7d8ffdc917ed09d8600c38e668ea17
Parents: 7ff31f1
Author: Daniel Vega <da...@corp.globo.com>
Authored: Wed Nov 19 19:01:35 2014 -0200
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Tue Nov 25 15:55:30 2014 +0530

----------------------------------------------------------------------
 .../lb/LoadBalancingRulesManagerImpl.java       |   6 +
 .../network/lb/UpdateLoadBalancerTest.java      | 127 +++++++++++++++++++
 2 files changed, 133 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ca6f2e/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index a28d108..fbb862e 100644
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -2102,6 +2102,12 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             lb.setDisplay(forDisplay);
         }
 
+        // Validate rule in LB provider
+        LoadBalancingRule rule = getLoadBalancerRuleToApply(lb);
+        if (!validateLbRule(rule)) {
+            throw new InvalidParameterValueException("Modifications in lb rule " + lbRuleId + " are not supported.");
+        }
+
         boolean success = _lbDao.update(lbRuleId, lb);
 
         // If algorithm is changed, have to reapply the lb config

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ca6f2e/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java b/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
new file mode 100644
index 0000000..f3a938c
--- /dev/null
+++ b/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
@@ -0,0 +1,127 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.network.lb;
+
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.UUID;
+
+import org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd;
+import org.apache.cloudstack.context.CallContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InOrder;
+import org.mockito.Mockito;
+
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.Network;
+import com.cloud.network.NetworkModel;
+import com.cloud.network.PublicIpAddress;
+import com.cloud.network.as.dao.AutoScaleVmGroupDao;
+import com.cloud.network.dao.LBHealthCheckPolicyDao;
+import com.cloud.network.dao.LBStickinessPolicyDao;
+import com.cloud.network.dao.LoadBalancerCertMapDao;
+import com.cloud.network.dao.LoadBalancerDao;
+import com.cloud.network.dao.LoadBalancerVMMapDao;
+import com.cloud.network.dao.LoadBalancerVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.element.LoadBalancingServiceProvider;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.MockAccountManagerImpl;
+import com.cloud.user.UserVO;
+
+public class UpdateLoadBalancerTest {
+
+    LoadBalancingRulesManagerImpl _lbMgr = new LoadBalancingRulesManagerImpl();
+
+    private UpdateLoadBalancerRuleCmd updateLbRuleCmd;
+    private LoadBalancerDao lbDao = Mockito.mock(LoadBalancerDao.class);
+    private NetworkDao netDao = Mockito.mock(NetworkDao.class);
+    private NetworkModel netModel = Mockito.mock(NetworkModel.class);
+    private LoadBalancingServiceProvider lbServiceProvider= Mockito.mock(LoadBalancingServiceProvider.class);
+
+    private static long domainId = 5L;
+    private static String accountName = "admin";
+
+    @Before
+    public void setUp() {
+        _lbMgr._accountMgr = new MockAccountManagerImpl();
+        _lbMgr._autoScaleVmGroupDao = Mockito.mock(AutoScaleVmGroupDao.class);
+        _lbMgr._networkDao = netDao;
+        _lbMgr._networkModel = netModel;
+        _lbMgr._lb2healthcheckDao = Mockito.mock(LBHealthCheckPolicyDao.class);
+        _lbMgr._lb2stickinesspoliciesDao = Mockito.mock(LBStickinessPolicyDao.class);
+        _lbMgr._lb2VmMapDao = Mockito.mock(LoadBalancerVMMapDao.class);
+        _lbMgr._lbCertMapDao = Mockito.mock(LoadBalancerCertMapDao.class);
+        _lbMgr._lbDao = lbDao;
+        _lbMgr._lbProviders = new ArrayList<LoadBalancingServiceProvider>();
+        _lbMgr._lbProviders.add(lbServiceProvider);
+
+        updateLbRuleCmd = new UpdateLoadBalancerRuleCmd();
+
+        AccountVO account = new AccountVO(accountName, domainId, "networkDomain", Account.ACCOUNT_TYPE_NORMAL, "uuid");
+        UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString());
+        CallContext.register(user, account);
+    }
+
+    @Test
+    public void testValidateRuleBeforeUpdateLB() throws ResourceAllocationException, ResourceUnavailableException, InsufficientCapacityException {
+
+        LoadBalancerVO lb = new LoadBalancerVO(null, null, null, 0L, 0, 0, null, 0L, 0L, domainId, null);
+
+        when(lbDao.findById(anyLong())).thenReturn(lb);
+        when(netModel.getPublicIpAddress(anyLong())).thenReturn(Mockito.mock(PublicIpAddress.class));
+        when(netDao.findById(anyLong())).thenReturn(Mockito.mock(NetworkVO.class));
+        when(lbServiceProvider.validateLBRule(any(Network.class), any(LoadBalancingRule.class))).thenReturn(true);
+        when(lbDao.update(anyLong(), eq(lb))).thenReturn(true);
+
+        _lbMgr.updateLoadBalancerRule(updateLbRuleCmd);
+
+        InOrder inOrder = Mockito.inOrder(lbServiceProvider, lbDao);
+        inOrder.verify(lbServiceProvider).validateLBRule(any(Network.class), any(LoadBalancingRule.class));
+        inOrder.verify(lbDao).update(anyLong(), eq(lb));
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void testRuleNotValidated() throws ResourceAllocationException, ResourceUnavailableException, InsufficientCapacityException {
+
+        LoadBalancerVO lb = new LoadBalancerVO(null, null, null, 0L, 0, 0, null, 0L, 0L, domainId, null);
+
+        when(lbDao.findById(anyLong())).thenReturn(lb);
+        when(netModel.getPublicIpAddress(anyLong())).thenReturn(Mockito.mock(PublicIpAddress.class));
+        when(netDao.findById(anyLong())).thenReturn(Mockito.mock(NetworkVO.class));
+        when(lbServiceProvider.validateLBRule(any(Network.class), any(LoadBalancingRule.class))).thenReturn(false);
+
+        _lbMgr.updateLoadBalancerRule(updateLbRuleCmd);
+    }
+
+    @After
+    public void tearDown() {
+        CallContext.unregister();
+    }
+
+}
\ No newline at end of file


[31/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Convert the usage server service to systemd


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f9cfd4d5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f9cfd4d5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f9cfd4d5

Branch: refs/heads/useraccount-refactoring
Commit: f9cfd4d5090d3653ea5d5ea237d75e730af478e7
Parents: 870ede5
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Nov 26 15:15:06 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Nov 26 15:15:06 2014 +0100

----------------------------------------------------------------------
 packaging/centos7/cloud-usage-sysd      |  90 ++++++++++++++++
 packaging/centos7/cloud-usage.rc        | 156 ---------------------------
 packaging/centos7/cloud-usage.service   |  37 +++++++
 packaging/centos7/cloud-usage.sysconfig |  31 ++++++
 packaging/centos7/cloud.spec            |  16 ++-
 5 files changed, 172 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9cfd4d5/packaging/centos7/cloud-usage-sysd
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-usage-sysd b/packaging/centos7/cloud-usage-sysd
new file mode 100755
index 0000000..a7c0f2f
--- /dev/null
+++ b/packaging/centos7/cloud-usage-sysd
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. /etc/sysconfig/cloudstack-usage
+
+start() {
+    if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+        echo "$PROGNAME apparently already running"
+        exit 0
+    fi
+
+    if hostname --fqdn >/dev/null 2>&1 ; then
+        true
+    else
+        echo "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
+        exit 1
+    fi
+
+    echo -n "Starting $PROGNAME" "$SHORTNAME"
+
+    if /usr/bin/jsvc -pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
+      -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
+        RETVAL=$?
+    then
+        rc=0
+        sleep 1
+        if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+            rc=1
+        fi
+    else
+        rc=1
+    fi
+
+    if [ $rc -ne 0 ]; then
+        echo > "$PIDFILE"
+        exit 1
+    fi
+}
+
+stop() {
+    echo -n "Stopping $PROGNAME" "$SHORTNAME"
+    if [ -e $PIDFILE ] ; then
+        kill $(<$PIDFILE) > /dev/null 2>&1
+        echo > $PIDFILE
+    else
+        echo Unable to stop $SHORTNAME, no pid file
+        echo > $PIDFILE
+        exit 1
+    fi
+}
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status -p $PIDFILE $SHORTNAME
+        RETVAL=$?
+        ;;
+    restart | force-reload)
+        stop
+        sleep 3
+        start
+        ;;
+    *)
+    echo "Usage: $0 {start|stop|restart|force-reload|status}"
+    RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9cfd4d5/packaging/centos7/cloud-usage.rc
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-usage.rc b/packaging/centos7/cloud-usage.rc
deleted file mode 100755
index 7741137..0000000
--- a/packaging/centos7/cloud-usage.rc
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/bin/bash
-
-### BEGIN INIT INFO
-# Provides:          cloudstack-usage
-# Required-Start:    $network $local_fs
-# Required-Stop:     $network $local_fs
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
-# Short-Description: Start/stop Apache CloudStack Usage Monitor
-# Description: This scripts Starts/Stops the Apache CloudStack Usage Monitor
-##  The CloudStack Usage Monitor is a part of the Apache CloudStack project and is used
-##  for storing usage statistics from instances.
-## JSVC (Java daemonizing) is used for starting and stopping the usage monitor.
-### END INIT INFO
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-. /etc/rc.d/init.d/functions
-
-SHORTNAME="cloudstack-usage"
-PIDFILE=/var/run/"$SHORTNAME".pid
-LOCKFILE=/var/lock/subsys/"$SHORTNAME"
-LOGDIR=/var/log/cloudstack/usage
-LOGFILE=${LOGDIR}/usage.log
-PROGNAME="CloudStack Usage Monitor"
-CLASS="com.cloud.usage.UsageServer"
-PROG="jsvc"
-DAEMON="/usr/bin/jsvc"
-USER=cloud
-
-unset OPTIONS
-[ -r /etc/sysconfig/default/"$SHORTNAME" ] && source /etc/sysconfig/default/"$SHORTNAME"
-
-setJavaHome() {
-  # use $JAVA_HOME if defined
-  if [ -n "$JAVA_HOME" ] ; then
-    return
-  fi
-
-  # try java first
-  java=$(which java 2>/dev/null || :)
-
-  # try javac if java is not found
-  if [ -z "$java" ] ; then
-    java=$(which javac 2>/dev/null || :)
-  fi
-
-  if [ -n "$java" ] ; then
-    JAVA_HOME=$(dirname $(dirname $(readlink -e $java)))
-    export JAVA_HOME
-    return
-  fi
-
-  # didnt find java home. exiting with error
-  exit 1
-}
-
-setJavaHome
-
-SCP=""
-DCP=""
-UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar`":"`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':'`
-JCP="/usr/share/java/commons-daemon.jar":"/usr/share/java/mysql-connector-java.jar"
-
-# We need to append the JSVC daemon  and mysql-connector JAR to the classpath
-# AgentShell implements the JSVC daemon methods
-export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/cloudstack/usage"
-
-start() {
-    if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
-        echo "$PROGNAME apparently already running"
-        exit 0
-    fi
-
-    if hostname --fqdn >/dev/null 2>&1 ; then
-        true
-    else
-        echo "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
-        exit 1
-    fi
-
-    echo -n "Starting $PROGNAME" "$SHORTNAME"
-
-    if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
-      -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
-        RETVAL=$?
-    then
-        rc=0
-        sleep 1
-        if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
-            failure
-            rc=1
-        fi
-    else
-        rc=1
-    fi
-
-    if [ $rc -eq 0 ]; then
-        success
-    else
-        failure
-        rm -f "$PIDFILE"
-    fi
-    echo
-}
-
-stop() {
-    echo -n "Stopping $PROGNAME" "$SHORTNAME"
-    killproc -p $PIDFILE $DAEMON
-    if [ "$?" -eq 0 ]; then
-        success
-    else
-        failure
-    fi
-    rm -f "$PIDFILE"
-    echo
-}
-
-case "$1" in
-    start)
-        start
-        ;;
-    stop)
-        stop
-        ;;
-    status)
-        status -p $PIDFILE $SHORTNAME
-        RETVAL=$?
-        ;;
-    restart | force-reload)
-        stop
-        sleep 3
-        start
-        ;;
-    *)
-    echo "Usage: $0 {start|stop|restart|force-reload|status}"
-    RETVAL=3
-esac
-
-exit $RETVAL
-

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9cfd4d5/packaging/centos7/cloud-usage.service
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-usage.service b/packaging/centos7/cloud-usage.service
new file mode 100644
index 0000000..a1bbc1dd
--- /dev/null
+++ b/packaging/centos7/cloud-usage.service
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Systemd unit file for CloudStack Management server
+# 
+# clone tomcat service, see /usr/lib/systemd/system/tomcat.service
+
+[Unit]
+Description=CloudStack Usage Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/cloudstack-usage-sysd start
+ExecStop=/usr/sbin/cloudstack-usage-sysd stop
+SuccessExitStatus=143
+User=cloud
+Group=cloud
+EnvironmentFile=/etc/sysconfig/cloudstack-usage
+
+[Install]
+WantedBy=multi-user.target
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9cfd4d5/packaging/centos7/cloud-usage.sysconfig
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud-usage.sysconfig b/packaging/centos7/cloud-usage.sysconfig
new file mode 100755
index 0000000..4154fef
--- /dev/null
+++ b/packaging/centos7/cloud-usage.sysconfig
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+SHORTNAME="cloudstack-usage"
+PIDFILE=/var/run/"$SHORTNAME".pid
+LOCKFILE=/var/lock/subsys/"$SHORTNAME"
+LOGDIR=/var/log/cloudstack/usage
+LOGFILE=${LOGDIR}/usage.log
+PROGNAME="CloudStack Usage Monitor"
+CLASS="com.cloud.usage.UsageServer"
+USER=cloud
+
+UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar`":"`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':'`
+JCP="/usr/share/java/commons-daemon.jar":"/usr/share/java/mysql-connector-java.jar"
+
+CLASSPATH="$UCP:$JCP:/etc/cloudstack/usage"
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9cfd4d5/packaging/centos7/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index 01fe7ea..2308c3d 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -138,6 +138,7 @@ Requires: java => 1.7.0
 Requires: jsvc
 Requires: jakarta-commons-daemon
 Requires: jakarta-commons-daemon-jsvc
+Requires: mysql-connector-java
 Group: System Environment/Libraries
 %description usage
 The CloudStack usage calculation service
@@ -318,7 +319,11 @@ install -D usage/target/cloud-usage-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir
 install -D usage/target/transformed/db.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/db.properties
 install -D usage/target/transformed/log4j-cloud_usage.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/log4j-cloud.xml
 cp usage/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib/
-install -D packaging/centos7/cloud-usage.rc ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/%{name}-usage
+install -D packaging/centos7/cloud-usage.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-usage.service
+install -D packaging/centos7/cloud-usage.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}-usage
+install -D packaging/centos7/cloud-usage-sysd ${RPM_BUILD_ROOT}/usr/sbin/%{name}-usage-sysd
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/run
+touch ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}-usage.pid
 mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/usage/
 
 # CLI
@@ -441,6 +446,10 @@ if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then
     mv %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/cloud.rpmsave/agent/agent.properties.rpmsave
 fi
 
+%pre usage
+id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
+     -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
+
 %preun usage
 /sbin/service cloudstack-usage stop || true
 if [ "$1" == "0" ] ; then
@@ -555,12 +564,15 @@ fi
 %{_defaultdocdir}/%{name}-common-%{version}/NOTICE
 
 %files usage
-%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-usage
+%attr(0644,root,root) %{_sysconfdir}/sysconfig/%{name}-usage
+%attr(0755,root,root) /usr/sbin/%{name}-usage-sysd
+%attr(0644,root,root) %{_unitdir}/%{name}-usage.service
 %attr(0644,root,root) %{_datadir}/%{name}-usage/*.jar
 %attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar
 %dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/usage
 %attr(0644,root,root) %{_sysconfdir}/%{name}/usage/db.properties
 %attr(0644,root,root) %{_sysconfdir}/%{name}/usage/log4j-cloud.xml
+%attr(0644,cloud,cloud) %{_localstatedir}/run/%{name}-usage.pid
 %{_defaultdocdir}/%{name}-usage-%{version}/LICENSE
 %{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
 


[33/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
UI cleanup


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db9c97e7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db9c97e7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db9c97e7

Branch: refs/heads/useraccount-refactoring
Commit: db9c97e7f4701034fa30d952b58e4928610c504a
Parents: 4798db0
Author: Brian Federle <br...@citrix.com>
Authored: Thu Aug 22 13:14:54 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Nov 26 11:48:27 2014 -0800

----------------------------------------------------------------------
 ui/scripts/ui/core.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db9c97e7/ui/scripts/ui/core.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 94edb19..c5816a0 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -285,6 +285,9 @@
             .appendTo(this);
         var context = args.context;
 
+        // Cleanup login
+        $('.login').remove();
+
         // Create pageElems
         $.each(pageElems, function(id, fn) {
             var $elem = $('<div>').attr({


[46/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
Merge branch 'feature/centos7-rpm' of https://github.com/apache/cloudstack


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a2acae13
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a2acae13
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a2acae13

Branch: refs/heads/useraccount-refactoring
Commit: a2acae13e377161078e2b97f177374f029bc39da
Parents: 9d31e59 b249c91
Author: Daan Hoogland <da...@onecht.net>
Authored: Thu Nov 27 15:06:23 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Nov 27 15:06:23 2014 +0100

----------------------------------------------------------------------
 packaging/centos63/cloud.spec                   |   42 +-
 packaging/centos63/default/macros.spec          |   27 -
 packaging/centos63/default/tomcat.sh            |   18 -
 packaging/centos63/package.sh                   |  168 ---
 .../centos63/rhel7/cloud-management.service     |   32 -
 packaging/centos63/rhel7/macros.spec            |   27 -
 packaging/centos63/rhel7/tomcat.sh              |   18 -
 packaging/centos63/tomcat.sh                    |   18 +
 packaging/centos7/cloud-agent.rc                |  117 ++
 packaging/centos7/cloud-ipallocator.rc          |   96 ++
 packaging/centos7/cloud-management.service      |   37 +
 packaging/centos7/cloud-management.sudoers      |   22 +
 packaging/centos7/cloud-management.sysconfig    |   48 +
 packaging/centos7/cloud-usage-sysd              |   90 ++
 packaging/centos7/cloud-usage.service           |   37 +
 packaging/centos7/cloud-usage.sysconfig         |   31 +
 packaging/centos7/cloud.limits                  |    2 +
 packaging/centos7/cloud.spec                    |  617 +++++++++
 packaging/centos7/cloudstack-agent.te           |   33 +
 packaging/centos7/cloudstack-sccs               |   20 +
 packaging/centos7/replace.properties            |   60 +
 packaging/centos7/tomcat7/catalina.properties   |   81 ++
 .../centos7/tomcat7/cloud-bridge.properties     |   25 +
 .../centos7/tomcat7/commons-logging.properties  |   30 +
 packaging/centos7/tomcat7/db.properties         |  107 ++
 .../centos7/tomcat7/ec2-service.properties      |   25 +
 .../centos7/tomcat7/environment.properties      |   22 +
 packaging/centos7/tomcat7/log4j-cloud.xml       |  217 ++++
 packaging/centos7/tomcat7/server.xml            |  112 ++
 packaging/centos7/tomcat7/tomcat-users.xml      |   31 +
 packaging/centos7/tomcat7/web.xml               | 1188 ++++++++++++++++++
 packaging/package.sh                            |  156 +++
 32 files changed, 3237 insertions(+), 317 deletions(-)
----------------------------------------------------------------------



[49/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

Posted by bh...@apache.org.
CLOUDSTACK-7989: Ignore Auth API calls in unauthenticated HTTP handlers

If an auth API call (such as login, logout) is called on unauthenticated port
such as the 8096 integration server port, we need to ignore such API calls
as calling auth APIs on 8096 is un-necessary and is undefined.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/21a6bef5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/21a6bef5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/21a6bef5

Branch: refs/heads/useraccount-refactoring
Commit: 21a6bef53b05d430f2cff53ae37033432603136d
Parents: 9f4c267
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Nov 28 15:43:29 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Nov 28 15:43:29 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java            | 17 +++++++++++------
 .../api/auth/APIAuthenticationManagerImpl.java     |  3 ++-
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21a6bef5/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 435efa0..e60af3b 100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -66,6 +66,7 @@ import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.ResponseObject;
 import org.apache.cloudstack.api.ResponseObject.ResponseView;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.auth.APIAuthenticationManager;
 import org.apache.cloudstack.api.command.admin.account.ListAccountsCmdByAdmin;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
@@ -204,6 +205,8 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
     private ConfigurationDao _configDao;
     @Inject
     private EntityManager _entityMgr;
+    @Inject
+    APIAuthenticationManager _authManager;
 
     List<PluggableService> _pluggableServices;
     List<APIChecker> _apiAccessCheckers;
@@ -485,6 +488,10 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
                 }
                 throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "Invalid request, no command sent");
             } else {
+                // Don't allow Login/Logout APIs to go past this point
+                if (_authManager.getAPIAuthenticator(command[0]) != null) {
+                    return null;
+                }
                 final Map<String, String> paramMap = new HashMap<String, String>();
                 final Set keys = params.keySet();
                 final Iterator keysIter = keys.iterator();
@@ -522,12 +529,10 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
                     else
                         buildAuditTrail(auditTrailSb, command[0], response);
                 } else {
-                    if (!command[0].equalsIgnoreCase("login") && !command[0].equalsIgnoreCase("logout")) {
-                        final String errorString = "Unknown API command: " + command[0];
-                        s_logger.warn(errorString);
-                        auditTrailSb.append(" " + errorString);
-                        throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
-                    }
+                    final String errorString = "Unknown API command: " + command[0];
+                    s_logger.warn(errorString);
+                    auditTrailSb.append(" " + errorString);
+                    throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
                 }
             }
         } catch (final InvalidParameterValueException ex) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21a6bef5/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
index fc21b19..9d0ab68 100644
--- a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
+++ b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
@@ -57,7 +57,7 @@ public class APIAuthenticationManagerImpl extends ManagerBase implements APIAuth
             APICommand command = authenticator.getAnnotation(APICommand.class);
             if (command != null && !command.name().isEmpty()
                     && APIAuthenticator.class.isAssignableFrom(authenticator)) {
-                s_authenticators.put(command.name(), authenticator);
+                s_authenticators.put(command.name().toLowerCase(), authenticator);
             }
         }
         return true;
@@ -81,6 +81,7 @@ public class APIAuthenticationManagerImpl extends ManagerBase implements APIAuth
 
     @Override
     public APIAuthenticator getAPIAuthenticator(String name) {
+        name = name.toLowerCase();
         APIAuthenticator apiAuthenticator = null;
         if (s_authenticators != null && s_authenticators.containsKey(name)) {
             try {