Projects >> CloudStack-archive >>98445f6b71c17e58fd3001f18ce5a6bffea1cfda

Chunk
Conflicting content
    public static final String BIND_DN = "binddn";
    public static final String BIND_PASSWORD = "bindpass";
    public static final String CATEGORY = "category";
<<<<<<< HEAD
    public static final String CERTIFICATE = "certificate";
    public static final String PRIVATE_KEY = "privatekey";
    public static final String DOMAIN_SUFFIX = "domainsuffix";
    public static final String DNS_SEARCH_ORDER = "dnssearchorder";
=======
    public static final String CERTIFICATE = "certificate";    
    public static final String PRIVATE_KEY = "privatekey";    
    public static final String DOMAIN_SUFFIX = "domainsuffix";    
    public static final String DNS_SEARCH_ORDER = "dnssearchorder";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String CIDR = "cidr";
    public static final String CIDR_LIST = "cidrlist";
    public static final String CLEANUP = "cleanup";
Solution content
    public static final String BIND_DN = "binddn";
    public static final String BIND_PASSWORD = "bindpass";
    public static final String CATEGORY = "category";
    public static final String CERTIFICATE = "certificate";    
    public static final String PRIVATE_KEY = "privatekey";    
    public static final String DOMAIN_SUFFIX = "domainsuffix";    
    public static final String DNS_SEARCH_ORDER = "dnssearchorder";    
    public static final String CIDR = "cidr";
    public static final String CIDR_LIST = "cidrlist";
    public static final String CLEANUP = "cleanup";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String JOB_STATUS = "jobstatus";
    public static final String LASTNAME = "lastname";
    public static final String LEVEL = "level";
<<<<<<< HEAD
    public static final String LIMIT_CPU_USE = "limitcpuuse";
=======
    public static final String LIMIT_CPU_USE = "limitcpuuse";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String LOCK = "lock";
    public static final String LUN = "lun";
    public static final String LBID = "lbruleid";
Solution content
    public static final String JOB_STATUS = "jobstatus";
    public static final String LASTNAME = "lastname";
    public static final String LEVEL = "level";
    public static final String LIMIT_CPU_USE = "limitcpuuse";    
    public static final String LOCK = "lock";
    public static final String LUN = "lun";
    public static final String LBID = "lbruleid";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String PORTAL = "portal";
    public static final String PORT_FORWARDING_SERVICE_ID = "portforwardingserviceid";
    public static final String PRIVATE_INTERFACE = "privateinterface";
<<<<<<< HEAD
    public static final String PRIVATE_IP = "privateip";
    public static final String PRIVATE_PORT = "privateport";
    public static final String PRIVATE_START_PORT = "privateport";
=======
    public static final String PRIVATE_IP = "privateip";    
    public static final String PRIVATE_PORT = "privateport";
    public static final String PRIVATE_START_PORT = "privateport";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String PRIVATE_END_PORT = "privateendport";
    public static final String PRIVATE_ZONE = "privatezone";
    public static final String PROTOCOL = "protocol";
Solution content
    public static final String PORTAL = "portal";
    public static final String PORT_FORWARDING_SERVICE_ID = "portforwardingserviceid";
    public static final String PRIVATE_INTERFACE = "privateinterface";
    public static final String PRIVATE_IP = "privateip";    
    public static final String PRIVATE_PORT = "privateport";
    public static final String PRIVATE_START_PORT = "privateport";    
    public static final String PRIVATE_END_PORT = "privateendport";
    public static final String PRIVATE_ZONE = "privatezone";
    public static final String PROTOCOL = "protocol";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String PUBLIC_IP_ID = "publicipid";
    public static final String PUBLIC_IP = "publicip";
    public static final String PUBLIC_PORT = "publicport";
<<<<<<< HEAD
    public static final String PUBLIC_START_PORT = "publicport";
=======
    public static final String PUBLIC_START_PORT = "publicport";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String PUBLIC_END_PORT = "publicendport";
    public static final String PUBLIC_ZONE = "publiczone";
    public static final String RECEIVED_BYTES = "receivedbytes";
Solution content
    public static final String PUBLIC_IP_ID = "publicipid";
    public static final String PUBLIC_IP = "publicip";
    public static final String PUBLIC_PORT = "publicport";
    public static final String PUBLIC_START_PORT = "publicport";    
    public static final String PUBLIC_END_PORT = "publicendport";
    public static final String PUBLIC_ZONE = "publiczone";
    public static final String RECEIVED_BYTES = "receivedbytes";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String SNAPSHOT_ID = "snapshotid";
    public static final String SNAPSHOT_POLICY_ID = "snapshotpolicyid";
    public static final String SNAPSHOT_TYPE = "snapshottype";
<<<<<<< HEAD
    public static final String SOURCE_ZONE_ID = "sourcezoneid";
=======
    public static final String SOURCE_ZONE_ID = "sourcezoneid";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String START_DATE = "startdate";
    public static final String START_IP = "startip";
    public static final String START_PORT = "startport";
Solution content
    public static final String SNAPSHOT_ID = "snapshotid";
    public static final String SNAPSHOT_POLICY_ID = "snapshotpolicyid";
    public static final String SNAPSHOT_TYPE = "snapshottype";
    public static final String SOURCE_ZONE_ID = "sourcezoneid";    
    public static final String START_DATE = "startdate";
    public static final String START_IP = "startip";
    public static final String START_PORT = "startport";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String SERVICE_LIST = "servicelist";
    public static final String CAN_ENABLE_INDIVIDUAL_SERVICE = "canenableindividualservice";
    public static final String SUPPORTED_SERVICES = "supportedservices";
<<<<<<< HEAD
    public static final String NSP_ID = "nspid";
    public static final String ACL_TYPE = "acltype";
=======
    public static final String NSP_ID= "nspid";
    public static final String ACL_TYPE= "acltype";
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String SUBDOMAIN_ACCESS = "subdomainaccess";
    public static final String LOAD_BALANCER_DEVICE_ID = "lbdeviceid";
    public static final String LOAD_BALANCER_DEVICE_NAME = "lbdevicename";
Solution content
    public static final String SERVICE_LIST = "servicelist";
    public static final String CAN_ENABLE_INDIVIDUAL_SERVICE = "canenableindividualservice";
    public static final String SUPPORTED_SERVICES = "supportedservices";
    public static final String NSP_ID= "nspid";
    public static final String ACL_TYPE= "acltype";
    public static final String SUBDOMAIN_ACCESS = "subdomainaccess";
    public static final String LOAD_BALANCER_DEVICE_ID = "lbdeviceid";
    public static final String LOAD_BALANCER_DEVICE_NAME = "lbdevicename";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String REMOVED = "removed";
    public static final String IKE_POLICY = "ikepolicy";
    public static final String ESP_POLICY = "esppolicy";
<<<<<<< HEAD
    public static final String LIFETIME = "lifetime";
    public static final String FOR_VPC = "forvpc";
=======
    public static final String LIFETIME = "lifetime";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String SOURCE = "source";
    public static final String COUNTER_ID = "counterid";
    public static final String AGGR_OPERATOR = "aggroperator";
Solution content
    public static final String REMOVED = "removed";
    public static final String IKE_POLICY = "ikepolicy";
    public static final String ESP_POLICY = "esppolicy";
    public static final String LIFETIME = "lifetime";
    public static final String FOR_VPC = "forvpc";
    public static final String SOURCE = "source";
    public static final String COUNTER_ID = "counterid";
    public static final String AGGR_OPERATOR = "aggroperator";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String AGGR_OPERATOR = "aggroperator";
    public static final String AGGR_FUNCTION = "aggrfunction";
    public static final String AGGR_VALUE = "aggrvalue";
<<<<<<< HEAD
    public static final String THRESHOLD = "threshold";
=======
    public static final String THRESHOLD = "threshold";    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static final String RELATIONAL_OPERATOR = "relationaloperator";
    public static final String SNMP_COMMUNITY = "snmpcommunity";
    public static final String SNMP_PORT = "snmpport";
Solution content
    public static final String AGGR_OPERATOR = "aggroperator";
    public static final String AGGR_FUNCTION = "aggrfunction";
    public static final String AGGR_VALUE = "aggrvalue";
    public static final String THRESHOLD = "threshold";
    public static final String RELATIONAL_OPERATOR = "relationaloperator";
    public static final String SNMP_COMMUNITY = "snmpcommunity";
    public static final String SNMP_PORT = "snmpport";
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    public static final String ACTION = "action";
    public static final String CONDITION_ID = "conditionid";
    public static final String CONDITION_IDS = "conditionids";
<<<<<<< HEAD

    public enum HostDetails {
        all, capacity, events, stats, min;
    }

    public enum VMDetails {
        all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min;
    }

    public enum LDAPParams {
        hostname, port, usessl, queryfilter, searchbase, dn, passwd, truststore, truststorepass;

        @Override
        public String toString() {
=======
    
    public enum HostDetails {
        all, capacity, events, stats, min;
    }
    
    public enum VMDetails {
        all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min;
    }
    
    public enum LDAPParams {
        hostname, port, usessl, queryfilter, searchbase, dn, passwd, truststore, truststorepass;
        
        @Override
        public String toString(){
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            return "ldap." + name();
        }
    }
Solution content
    public static final String ACTION = "action";
    public static final String CONDITION_ID = "conditionid";
    public static final String CONDITION_IDS = "conditionids";
    
    public enum HostDetails {
        all, capacity, events, stats, min;
    }
    
    public enum VMDetails {
        all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min;
    }
    
    public enum LDAPParams {
        hostname, port, usessl, queryfilter, searchbase, dn, passwd, truststore, truststorepass;
        
        @Override
        public String toString(){
            return "ldap." + name();
        }
    }
File
ApiConstants.java
Developer's decision
Version 1
Kind of conflict
Annotation
Enum declaration
Enum signature
Enum value
Method signature
Chunk
Conflicting content
// 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.
<<<<<<< HEAD
//
=======
// 
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.api;
Solution content
// 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.
// 
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.api;
File
ResponseGenerator.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
    LDAPConfigResponse createLDAPConfigResponse(String hostname, Integer port, Boolean useSSL, String queryFilter, String baseSearch, String dn);

    StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result);
<<<<<<< HEAD

=======
    
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    /**
     * @param tableName
     *            TODO
Solution content
    LDAPConfigResponse createLDAPConfigResponse(String hostname, Integer port, Boolean useSSL, String queryFilter, String baseSearch, String dn);

    StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result);
    
    /**
     * @param tableName
     *            TODO
File
ResponseGenerator.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
    /**
     * @param resourceTag
<<<<<<< HEAD
     * @param keyValueOnly TODO
     * @return
     */
    ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag, boolean keyValueOnly);
=======
     * @return
     */
    ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag);
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9

    Site2SiteVpnGatewayResponse createSite2SiteVpnGatewayResponse(Site2SiteVpnGateway result);
Solution content
    /**
     * @param resourceTag
     * @param keyValueOnly TODO
     * @return
     */
    ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag, boolean keyValueOnly);

    Site2SiteVpnGatewayResponse createSite2SiteVpnGatewayResponse(Site2SiteVpnGateway result);
File
ResponseGenerator.java
Developer's decision
Version 1
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
     */
    StaticRouteResponse createStaticRouteResponse(StaticRoute result);

<<<<<<< HEAD
=======
    PrivateGatewayResponse createPrivateGatewayResponseResponse(PrivateGateway result);

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result);

    Site2SiteVpnConnectionResponse createSite2SiteVpnConnectionResponse(Site2SiteVpnConnection result);
Solution content
     */
    StaticRouteResponse createStaticRouteResponse(StaticRoute result);

    Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result);

    Site2SiteVpnConnectionResponse createSite2SiteVpnConnectionResponse(Site2SiteVpnConnection result);
File
ResponseGenerator.java
Developer's decision
Version 1
Kind of conflict
Method interface
Chunk
Conflicting content
<<<<<<< HEAD
// Copyright 2012 Citrix Systems, Inc. Licensed under the
// Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License.  Citrix Systems, Inc.
// reserves all rights not expressly granted by 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.
// 
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.network;

import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.cloud.acl.ControlledEntity;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType;
import com.cloud.utils.fsm.FiniteState;
import com.cloud.utils.fsm.StateMachine;

/**
 * owned by an account. 
 */
public interface Network extends ControlledEntity {
    
    public enum GuestType {
        Shared,
        Isolated
    }

    public static class Service {
        private static List supportedServices = new ArrayList();

        public static final Service Vpn = new Service("Vpn", Capability.SupportedVpnProtocols, Capability.VpnTypes);
        public static final Service Dhcp = new Service("Dhcp");
        public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification);
        public static final Service Gateway = new Service("Gateway");
        public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, 
                Capability.MultipleIps, Capability.TrafficStatistics);
        public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation,
                Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps, 
            }
                Capability.SupportedStickinessMethods, Capability.ElasticLb);
        public static final Service UserData = new Service("UserData");
        public static final Service SourceNat = new Service("SourceNat", Capability.SupportedSourceNatTypes, Capability.RedundantRouter);
        public static final Service StaticNat = new Service("StaticNat", Capability.ElasticIp);
        public static final Service PortForwarding = new Service("PortForwarding");
        public static final Service SecurityGroup = new Service("SecurityGroup");
        public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);

        private String name;
        private Capability[] caps;

        public Service(String name, Capability... caps) {
            this.name = name;
            this.caps = caps;
            supportedServices.add(this);
        }  

        public String getName() {
            return name;
        }

        public Capability[] getCapabilities() {
            return caps;
        }

        public boolean containsCapability(Capability cap) {
            boolean success = false;
            if (caps != null) {

                int length = caps.length;
                for (int i = 0; i< length; i++) {
                    if (caps[i].getName().equalsIgnoreCase(cap.getName())) {
                        success = true;
                        break;
                    }
                }
            } 

            return success;
        }
        
        public static Service getService(String serviceName) {
            for (Service service : supportedServices) {
                if (service.getName().equalsIgnoreCase(serviceName)) {
                    return service;
                }
            }
            return null;
        }
        
        public static List listAllServices(){
            return supportedServices;
        }
    }

    /**
     * Provider -> NetworkElement must always be one-to-one mapping. Thus for each NetworkElement we need a separate Provider added in here.
     */
    public static class Provider {
        private static List supportedProviders = new ArrayList();
        
        public static final Provider VirtualRouter = new Provider("VirtualRouter", false);
        public static final Provider JuniperSRX = new Provider("JuniperSRX", true);
        public static final Provider F5BigIp = new Provider("F5BigIp", true);
        public static final Provider Netscaler = new Provider("Netscaler", true);
        public static final Provider ExternalDhcpServer = new Provider("ExternalDhcpServer", true);
        public static final Provider ExternalGateWay = new Provider("ExternalGateWay", true);
        public static final Provider ElasticLoadBalancerVm = new Provider("ElasticLoadBalancerVm", false);
        public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false);
        public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
        public static final Provider None = new Provider("None", false);

        private String name;
        private boolean isExternal;

        public Provider(String name, boolean isExternal) {
            this.name = name;
            this.isExternal = isExternal;
            supportedProviders.add(this);
        }

        public String getName() {
            return name;
        }
        
        public boolean isExternal() {
            return isExternal;
        }
        
        public static Provider getProvider(String providerName) {
            for (Provider provider : supportedProviders) {
                if (provider.getName().equalsIgnoreCase(providerName)) {
                    return provider;
                }
            return null;
        }
    }

    public static class Capability {

        private static List supportedCapabilities = new ArrayList();
        
        public static final Capability SupportedProtocols = new Capability("SupportedProtocols");
        public static final Capability SupportedLBAlgorithms = new Capability("SupportedLbAlgorithms");
        public static final Capability SupportedLBIsolation = new Capability("SupportedLBIsolation");
        public static final Capability SupportedStickinessMethods = new Capability("SupportedStickinessMethods");
        public static final Capability MultipleIps = new Capability("MultipleIps");
        public static final Capability SupportedSourceNatTypes = new Capability("SupportedSourceNatTypes");
        public static final Capability SupportedVpnProtocols = new Capability("SupportedVpnTypes");
        public static final Capability VpnTypes = new Capability("VpnTypes");
        public static final Capability TrafficStatistics = new Capability("TrafficStatistics");
        public static final Capability LoadBalancingSupportedIps = new Capability("LoadBalancingSupportedIps");
        public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
        public static final Capability RedundantRouter = new Capability("RedundantRouter");
        public static final Capability ElasticIp = new Capability("ElasticIp");
        public boolean isExternal() {
        }
        public static final Capability ElasticLb = new Capability("ElasticLb");
        public static final Capability AutoScaleCounters = new Capability("AutoScaleCounters");


        private String name;

        public Capability(String name) {
            this.name = name;
            supportedCapabilities.add(this);
        }

        public String getName() {
            return name;
        }

        public static Capability getCapability(String capabilityName) {
            for (Capability capability : supportedCapabilities) {
                if (capability.getName().equalsIgnoreCase(capabilityName)) {
                    return capability;
                }
            }
            return null;
        }
    }

    enum Event {
        ImplementNetwork,
        DestroyNetwork,
        OperationSucceeded,
        OperationFailed;
    }

    enum State implements FiniteState {
        Allocated("Indicates the network configuration is in allocated but not setup"),
        Setup("Indicates the network configuration is setup"),
        Implementing("Indicates the network configuration is being implemented"),
        Implemented("Indicates the network configuration is in use"),
        Shutdown("Indicates the network configuration is being destroyed"),
        Destroy("Indicates that the network is destroyed");


        @Override
        public StateMachine getStateMachine() {
            return s_fsm;
        }

        @Override
        public State getNextState(Event event) {
            return s_fsm.getNextState(this, event);
        }

        @Override
        public List getFromStates(Event event) {
            return s_fsm.getFromStates(this, event);
        }

        @Override
        public Set getPossibleEvents() {
            return s_fsm.getPossibleEvents(this);
        }

        String _description;

        @Override
        public String getDescription() {
            return _description;
        }

        private State(String description) {
            _description = description;
        }

        private static StateMachine s_fsm = new StateMachine();
        static {
            s_fsm.addTransition(State.Allocated, Event.ImplementNetwork, State.Implementing);
            s_fsm.addTransition(State.Implementing, Event.OperationSucceeded, State.Implemented);
            s_fsm.addTransition(State.Implementing, Event.OperationFailed, State.Shutdown);
            s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown);
            s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated);
            s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented);
        }
    }

    /**
     * @return id of the network profile.  Null means the network profile is not from the database.
     */
    long getId();

    String getName();

    Mode getMode();

    BroadcastDomainType getBroadcastDomainType();

    TrafficType getTrafficType();

    String getGateway();

    String getCidr();

    long getDataCenterId();

    long getNetworkOfferingId();

    State getState();

    long getRelated();

    URI getBroadcastUri();

    String getDisplayText();

    String getReservationId();

    String getNetworkDomain();

    GuestType getGuestType();

    Long getPhysicalNetworkId();

    void setPhysicalNetworkId(Long physicalNetworkId);

	ACLType getAclType();
	
	boolean isRestartRequired();

	boolean getSpecifyIpRanges();

    /**
     * @return
     */
    Long getVpcId();
}
=======
// Copyright 2012 Citrix Systems, Inc. Licensed under the
// Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License.  Citrix Systems, Inc.
// reserves all rights not expressly granted by 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.
// 
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.network;

import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.cloud.acl.ControlledEntity;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType;
import com.cloud.utils.fsm.FiniteState;
import com.cloud.utils.fsm.StateMachine;

/**
 * owned by an account. 
 */
public interface Network extends ControlledEntity {

    public enum GuestType {
        Shared,
        Isolated
    }

    public static class Service {
        private static List supportedServices = new ArrayList();

        public static final Service Vpn = new Service("Vpn", Capability.SupportedVpnProtocols, Capability.VpnTypes);
        public static final Service Dhcp = new Service("Dhcp");
        public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification);
        public static final Service Gateway = new Service("Gateway");
        public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, 
                Capability.MultipleIps, Capability.TrafficStatistics, Capability.FirewallType);
        public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation,
                Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps, 
                Capability.SupportedStickinessMethods, Capability.ElasticLb);
        public static final Service UserData = new Service("UserData");
        public static final Service SourceNat = new Service("SourceNat", Capability.SupportedSourceNatTypes, Capability.RedundantRouter);
        public static final Service StaticNat = new Service("StaticNat", Capability.ElasticIp);
        public static final Service PortForwarding = new Service("PortForwarding");
        public static final Service SecurityGroup = new Service("SecurityGroup");

        private String name;
        private Capability[] caps;

        public Service(String name, Capability... caps) {
            this.name = name;
            this.caps = caps;
            supportedServices.add(this);
        }  

        public String getName() {
            return name;
        public Capability[] getCapabilities() {
            return caps;
        }

        public boolean containsCapability(Capability cap) {
            boolean success = false;
            if (caps != null) {
                int length = caps.length;
                for (int i = 0; i< length; i++) {
                    if (caps[i].getName().equalsIgnoreCase(cap.getName())) {
                        success = true;
                        break;
                    }
                }
            } 

            return success;
        }
        
        public static Service getService(String serviceName) {
            for (Service service : supportedServices) {
                if (service.getName().equalsIgnoreCase(serviceName)) {
                    return service;
                }
            }
            return null;
        }
        
        public static List listAllServices(){
            return supportedServices;
        }
    }

    /**
     * Provider -> NetworkElement must always be one-to-one mapping. Thus for each NetworkElement we need a separate Provider added in here.
     */
    public static class Provider {
        private static List supportedProviders = new ArrayList();
        
        public static final Provider VirtualRouter = new Provider("VirtualRouter", false);
        public static final Provider JuniperSRX = new Provider("JuniperSRX", true);
        public static final Provider F5BigIp = new Provider("F5BigIp", true);
        public static final Provider Netscaler = new Provider("Netscaler", true);
        public static final Provider ExternalDhcpServer = new Provider("ExternalDhcpServer", true);
        public static final Provider ExternalGateWay = new Provider("ExternalGateWay", true);
        public static final Provider ElasticLoadBalancerVm = new Provider("ElasticLoadBalancerVm", false);
        public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false);
        public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
        public static final Provider None = new Provider("None", false);

        private String name;
        private boolean isExternal;

        public Provider(String name, boolean isExternal) {
            this.name = name;
            this.isExternal = isExternal;
            supportedProviders.add(this);
        }

        public String getName() {
            return name;
        }
        
            return isExternal;
        }
        
        public static Provider getProvider(String providerName) {
            for (Provider provider : supportedProviders) {
                if (provider.getName().equalsIgnoreCase(providerName)) {
                    return provider;
                }
            }
            return null;
        }
    }

    public static class Capability {

        private static List supportedCapabilities = new ArrayList();
        
        public static final Capability SupportedProtocols = new Capability("SupportedProtocols");
        public static final Capability SupportedLBAlgorithms = new Capability("SupportedLbAlgorithms");
        public static final Capability SupportedLBIsolation = new Capability("SupportedLBIsolation");
        public static final Capability SupportedStickinessMethods = new Capability("SupportedStickinessMethods");
        public static final Capability MultipleIps = new Capability("MultipleIps");
        public static final Capability SupportedSourceNatTypes = new Capability("SupportedSourceNatTypes");
        public static final Capability SupportedVpnProtocols = new Capability("SupportedVpnTypes");
        public static final Capability VpnTypes = new Capability("VpnTypes");
        public static final Capability TrafficStatistics = new Capability("TrafficStatistics");
        public static final Capability LoadBalancingSupportedIps = new Capability("LoadBalancingSupportedIps");
        public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
        public static final Capability RedundantRouter = new Capability("RedundantRouter");
        public static final Capability ElasticIp = new Capability("ElasticIp");
        public static final Capability ElasticLb = new Capability("ElasticLb");
        public static final Capability FirewallType = new Capability("FirewallType");
        public static final Capability AutoScaleCounters = new Capability("AutoScaleCounters");


        private String name;

        public Capability(String name) {
            this.name = name;
            supportedCapabilities.add(this);
        }

        public String getName() {
            return name;
        }

        public static Capability getCapability(String capabilityName) {
            for (Capability capability : supportedCapabilities) {
                if (capability.getName().equalsIgnoreCase(capabilityName)) {
                    return capability;
                }
            }
            return null;
        }
    }

    enum Event {
        ImplementNetwork,
        DestroyNetwork,
        OperationSucceeded,
        OperationFailed;
    }

    enum State implements FiniteState {
        Allocated("Indicates the network configuration is in allocated but not setup"),
        Setup("Indicates the network configuration is setup"),
        Implementing("Indicates the network configuration is being implemented"),
        Implemented("Indicates the network configuration is in use"),
        Shutdown("Indicates the network configuration is being destroyed"),
        Destroy("Indicates that the network is destroyed");


        @Override
        public StateMachine getStateMachine() {
            return s_fsm;
        }

        @Override
        public State getNextState(Event event) {
            return s_fsm.getNextState(this, event);
        }

        @Override
        public List getFromStates(Event event) {
            return s_fsm.getFromStates(this, event);
        }

        @Override
        public Set getPossibleEvents() {
            return s_fsm.getPossibleEvents(this);
        }

        String _description;

        @Override
        public String getDescription() {
            return _description;
        }

        private State(String description) {
            _description = description;
        }

        private static StateMachine s_fsm = new StateMachine();
        static {
            s_fsm.addTransition(State.Allocated, Event.ImplementNetwork, State.Implementing);
            s_fsm.addTransition(State.Implementing, Event.OperationSucceeded, State.Implemented);
            s_fsm.addTransition(State.Implementing, Event.OperationFailed, State.Shutdown);
            s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown);
            s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated);
            s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented);
        }
    }

    /**
     * @return id of the network profile.  Null means the network profile is not from the database.
     */
    long getId();

    String getName();

    Mode getMode();

    BroadcastDomainType getBroadcastDomainType();

    TrafficType getTrafficType();

    String getGateway();

    String getCidr();

    long getDataCenterId();

    long getNetworkOfferingId();

    State getState();

    long getRelated();

    URI getBroadcastUri();

    String getDisplayText();

    String getReservationId();

    String getNetworkDomain();

    GuestType getGuestType();

    Long getPhysicalNetworkId();

    void setPhysicalNetworkId(Long physicalNetworkId);

    ACLType getAclType();
    
    boolean isRestartRequired();

    boolean getSpecifyIpRanges();

    /**
     * @return
     */
    Long getVpcId();
}
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
Solution content
// Copyright 2012 Citrix Systems, Inc. Licensed under the
// Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License.  Citrix Systems, Inc.
// reserves all rights not expressly granted by 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.
// 
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.network;

import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.cloud.acl.ControlledEntity;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType;
import com.cloud.utils.fsm.FiniteState;
import com.cloud.utils.fsm.StateMachine;

/**
 * owned by an account. 
 */
public interface Network extends ControlledEntity {
    
    public enum GuestType {
        Shared,
        Isolated
    }

    public static class Service {
        private static List supportedServices = new ArrayList();

        public static final Service Vpn = new Service("Vpn", Capability.SupportedVpnProtocols, Capability.VpnTypes);

        public String getName() {

    Mode getMode();
        public static final Service Dhcp = new Service("Dhcp");
        public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification);
        public static final Service Gateway = new Service("Gateway");
        public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, 
                Capability.MultipleIps, Capability.TrafficStatistics);
        public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation,
                Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps, 
                Capability.SupportedStickinessMethods, Capability.ElasticLb);
        public static final Service UserData = new Service("UserData");
        public static final Service SourceNat = new Service("SourceNat", Capability.SupportedSourceNatTypes, Capability.RedundantRouter);
        public static final Service StaticNat = new Service("StaticNat", Capability.ElasticIp);
        public static final Service PortForwarding = new Service("PortForwarding");
        public static final Service SecurityGroup = new Service("SecurityGroup");
        public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);

        private String name;
        private Capability[] caps;

        public Service(String name, Capability... caps) {
            this.name = name;
            this.caps = caps;
            supportedServices.add(this);
        }  

            return name;
        }

        public Capability[] getCapabilities() {
            return caps;
        }

        public boolean containsCapability(Capability cap) {
            boolean success = false;
            if (caps != null) {
                int length = caps.length;
                for (int i = 0; i< length; i++) {
                    if (caps[i].getName().equalsIgnoreCase(cap.getName())) {
                        success = true;
                        break;
                    }
                }
            } 

            return success;
        }
        
        public static Service getService(String serviceName) {
            for (Service service : supportedServices) {
                if (service.getName().equalsIgnoreCase(serviceName)) {
                    return service;
                }
            }
            return null;
        }
        
        public static List listAllServices(){
            return supportedServices;
        }
    }

    /**
     * Provider -> NetworkElement must always be one-to-one mapping. Thus for each NetworkElement we need a separate Provider added in here.
     */
    public static class Provider {
        private static List supportedProviders = new ArrayList();
        
        public static final Provider VirtualRouter = new Provider("VirtualRouter", false);
        public static final Provider JuniperSRX = new Provider("JuniperSRX", true);
        public static final Provider F5BigIp = new Provider("F5BigIp", true);
        public static final Provider Netscaler = new Provider("Netscaler", true);
        public static final Provider ExternalDhcpServer = new Provider("ExternalDhcpServer", true);
        public static final Provider ExternalGateWay = new Provider("ExternalGateWay", true);
        public static final Provider ElasticLoadBalancerVm = new Provider("ElasticLoadBalancerVm", false);
        public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false);
        public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
        public static final Provider None = new Provider("None", false);

        private String name;
        private boolean isExternal;

        public Provider(String name, boolean isExternal) {
            this.name = name;
            this.isExternal = isExternal;
            supportedProviders.add(this);
        }
        public String getName() {
            return name;
        }
        
        public boolean isExternal() {
            return isExternal;
        }
        
        public static Provider getProvider(String providerName) {
            for (Provider provider : supportedProviders) {
                if (provider.getName().equalsIgnoreCase(providerName)) {
                    return provider;
                }
            }
            return null;
        }
    }

    public static class Capability {

        private static List supportedCapabilities = new ArrayList();
        
        public static final Capability SupportedProtocols = new Capability("SupportedProtocols");
        public static final Capability SupportedLBAlgorithms = new Capability("SupportedLbAlgorithms");
        public static final Capability SupportedLBIsolation = new Capability("SupportedLBIsolation");
        public static final Capability SupportedStickinessMethods = new Capability("SupportedStickinessMethods");
        public static final Capability MultipleIps = new Capability("MultipleIps");
        public static final Capability SupportedSourceNatTypes = new Capability("SupportedSourceNatTypes");
        public static final Capability SupportedVpnProtocols = new Capability("SupportedVpnTypes");
        public static final Capability VpnTypes = new Capability("VpnTypes");
        public static final Capability TrafficStatistics = new Capability("TrafficStatistics");
        public static final Capability LoadBalancingSupportedIps = new Capability("LoadBalancingSupportedIps");
        public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
        public static final Capability RedundantRouter = new Capability("RedundantRouter");
        public static final Capability ElasticIp = new Capability("ElasticIp");
        public static final Capability ElasticLb = new Capability("ElasticLb");
        public static final Capability AutoScaleCounters = new Capability("AutoScaleCounters");


        private String name;

        public Capability(String name) {
            this.name = name;
            supportedCapabilities.add(this);
        }

        public String getName() {
            return name;
        }

        public static Capability getCapability(String capabilityName) {
            for (Capability capability : supportedCapabilities) {
                if (capability.getName().equalsIgnoreCase(capabilityName)) {
                    return capability;
                }
            }
            return null;
        }
    }

    enum Event {
        ImplementNetwork,
        DestroyNetwork,
        OperationSucceeded,
        OperationFailed;
    }

    enum State implements FiniteState {
        Allocated("Indicates the network configuration is in allocated but not setup"),
        Setup("Indicates the network configuration is setup"),
        Implementing("Indicates the network configuration is being implemented"),
        Implemented("Indicates the network configuration is in use"),
        Shutdown("Indicates the network configuration is being destroyed"),
        Destroy("Indicates that the network is destroyed");


        @Override
        public StateMachine getStateMachine() {
            return s_fsm;
        }

        @Override
        public State getNextState(Event event) {
            return s_fsm.getNextState(this, event);
        }

        @Override
        public List getFromStates(Event event) {
            return s_fsm.getFromStates(this, event);
        }

        @Override
        public Set getPossibleEvents() {
            return s_fsm.getPossibleEvents(this);
        }

        String _description;

        @Override
        public String getDescription() {
            return _description;
        }

        private State(String description) {
            _description = description;
        }

        private static StateMachine s_fsm = new StateMachine();
        static {
            s_fsm.addTransition(State.Allocated, Event.ImplementNetwork, State.Implementing);
            s_fsm.addTransition(State.Implementing, Event.OperationSucceeded, State.Implemented);
            s_fsm.addTransition(State.Implementing, Event.OperationFailed, State.Shutdown);
            s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown);
            s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated);
            s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented);
        }
    }

    /**
     * @return id of the network profile.  Null means the network profile is not from the database.
     */
    long getId();

    String getName();
    BroadcastDomainType getBroadcastDomainType();

    TrafficType getTrafficType();

    String getGateway();

    String getCidr();

    long getDataCenterId();

    long getNetworkOfferingId();

    State getState();

    long getRelated();

    URI getBroadcastUri();

    String getDisplayText();

    String getReservationId();

    String getNetworkDomain();

    GuestType getGuestType();

    Long getPhysicalNetworkId();

    void setPhysicalNetworkId(Long physicalNetworkId);

	ACLType getAclType();
	
	boolean isRestartRequired();

	boolean getSpecifyIpRanges();

    /**
     * @return
     */
    Long getVpcId();
}
File
Network.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Interface declaration
Package declaration
Chunk
Conflicting content
import com.cloud.api.commands.AddConditionCmd;
import com.cloud.api.commands.AddCounterCmd;
import com.cloud.api.commands.CreateAutoScalePolicyCmd;
<<<<<<< HEAD
import com.cloud.api.commands.CreateAutoScaleVmProfileCmd;
import com.cloud.api.commands.CreateAutoScaleVmGroupCmd;
=======
import com.cloud.api.commands.CreateAutoScaleVmGroupCmd;
import com.cloud.api.commands.CreateAutoScaleVmProfileCmd;
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.api.commands.CreateLBStickinessPolicyCmd;
import com.cloud.api.commands.CreateLoadBalancerRuleCmd;
import com.cloud.api.commands.ListAutoScalePoliciesCmd;
Solution content
import com.cloud.api.commands.AddConditionCmd;
import com.cloud.api.commands.AddCounterCmd;
import com.cloud.api.commands.CreateAutoScalePolicyCmd;
import com.cloud.api.commands.CreateAutoScaleVmProfileCmd;
import com.cloud.api.commands.CreateAutoScaleVmGroupCmd;
import com.cloud.api.commands.CreateLBStickinessPolicyCmd;
import com.cloud.api.commands.CreateLoadBalancerRuleCmd;
import com.cloud.api.commands.ListAutoScalePoliciesCmd;
File
LoadBalancingRulesService.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.cloud.network.NetworkRuleConfigVO;
import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
<<<<<<< HEAD
import com.cloud.network.Site2SiteCustomerGatewayVO;
import com.cloud.network.Site2SiteVpnGatewayVO;
import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScalePolicyConditionMapVO;
import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
import com.cloud.network.as.CounterVO;
import com.cloud.network.as.ConditionVO;
import com.cloud.network.as.dao.AutoScalePolicyConditionMapDao;
import com.cloud.network.as.dao.AutoScalePolicyDao;
import com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDao;
import com.cloud.network.as.dao.CounterDao;
import com.cloud.network.as.dao.ConditionDao;
=======
import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScalePolicyConditionMapVO;
import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
import com.cloud.network.as.ConditionVO;
import com.cloud.network.as.CounterVO;
import com.cloud.network.as.dao.AutoScalePolicyConditionMapDao;
import com.cloud.network.as.dao.AutoScalePolicyDao;
import com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDao;
import com.cloud.network.as.dao.ConditionDao;
import com.cloud.network.as.dao.CounterDao;
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.network.dao.FirewallRulesCidrsDao;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.LoadBalancerDao;
Solution content
import com.cloud.network.NetworkRuleConfigVO;
import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.Site2SiteCustomerGatewayVO;
import com.cloud.network.Site2SiteVpnGatewayVO;
import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScalePolicyConditionMapVO;
import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
import com.cloud.network.as.CounterVO;
import com.cloud.network.as.ConditionVO;
import com.cloud.network.as.dao.AutoScalePolicyConditionMapDao;
import com.cloud.network.as.dao.AutoScalePolicyDao;
import com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDao;
import com.cloud.network.as.dao.CounterDao;
import com.cloud.network.as.dao.ConditionDao;
import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScalePolicyConditionMapVO;
import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
import com.cloud.network.as.ConditionVO;
import com.cloud.network.as.CounterVO;
import com.cloud.network.as.dao.AutoScalePolicyConditionMapDao;
import com.cloud.network.as.dao.AutoScalePolicyDao;
import com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDao;
import com.cloud.network.as.dao.ConditionDao;
import com.cloud.network.as.dao.CounterDao;
import com.cloud.network.dao.FirewallRulesCidrsDao;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.LoadBalancerDao;
File
ApiDBUtils.java
Developer's decision
Concatenation
Kind of conflict
Import
Chunk
Conflicting content
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
import com.cloud.network.dao.NetworkRuleConfigDao;
<<<<<<< HEAD
import com.cloud.network.dao.Site2SiteCustomerGatewayDao;
import com.cloud.network.dao.Site2SiteVpnGatewayDao;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.network.security.SecurityGroup;
import com.cloud.network.security.SecurityGroupManager;
import com.cloud.network.security.SecurityGroupVO;
Solution content
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
import com.cloud.network.dao.NetworkRuleConfigDao;
import com.cloud.network.dao.Site2SiteCustomerGatewayDao;
import com.cloud.network.dao.Site2SiteVpnGatewayDao;
import com.cloud.network.security.SecurityGroup;
import com.cloud.network.security.SecurityGroupManager;
import com.cloud.network.security.SecurityGroupVO;
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.cloud.network.security.SecurityGroupVO;
import com.cloud.network.security.dao.SecurityGroupDao;
import com.cloud.network.vpc.VpcManager;
<<<<<<< HEAD
import com.cloud.offering.NetworkOffering;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.offering.ServiceOffering;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.offerings.dao.NetworkOfferingDao;
Solution content
import com.cloud.network.security.SecurityGroupVO;
import com.cloud.network.security.dao.SecurityGroupDao;
import com.cloud.network.vpc.VpcManager;
import com.cloud.offering.NetworkOffering;
import com.cloud.offering.ServiceOffering;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.offerings.dao.NetworkOfferingDao;
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.cloud.resource.ResourceManager;
import com.cloud.server.Criteria;
import com.cloud.server.ManagementServer;
<<<<<<< HEAD
import com.cloud.server.ResourceTag;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.server.ResourceTag.TaggedResourceType;
import com.cloud.server.StatsCollector;
import com.cloud.server.TaggedResourceService;
Solution content
import com.cloud.resource.ResourceManager;
import com.cloud.server.Criteria;
import com.cloud.server.ManagementServer;
import com.cloud.server.ResourceTag;
import com.cloud.server.ResourceTag.TaggedResourceType;
import com.cloud.server.StatsCollector;
import com.cloud.server.TaggedResourceService;
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    private static UserVmDao _userVmDao;
    private static VlanDao _vlanDao;
    private static VolumeDao _volumeDao;
<<<<<<< HEAD
    private static Site2SiteVpnGatewayDao _site2SiteVpnGatewayDao;
    private static Site2SiteCustomerGatewayDao _site2SiteCustomerGatewayDao;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    private static VolumeHostDao _volumeHostDao;
    private static DataCenterDao _zoneDao;
    private static NetworkOfferingDao _networkOfferingDao;
Solution content
    private static UserVmDao _userVmDao;
    private static VlanDao _vlanDao;
    private static VolumeDao _volumeDao;
    private static Site2SiteVpnGatewayDao _site2SiteVpnGatewayDao;
    private static Site2SiteCustomerGatewayDao _site2SiteCustomerGatewayDao;
    private static VolumeHostDao _volumeHostDao;
    private static DataCenterDao _zoneDao;
    private static NetworkOfferingDao _networkOfferingDao;
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        _userVmDao = locator.getDao(UserVmDao.class);
        _vlanDao = locator.getDao(VlanDao.class);
        _volumeDao = locator.getDao(VolumeDao.class);
<<<<<<< HEAD
        _site2SiteVpnGatewayDao = locator.getDao(Site2SiteVpnGatewayDao.class);
        _site2SiteCustomerGatewayDao = locator.getDao(Site2SiteCustomerGatewayDao.class);
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        _volumeHostDao = locator.getDao(VolumeHostDao.class);
        _zoneDao = locator.getDao(DataCenterDao.class);
        _securityGroupDao = locator.getDao(SecurityGroupDao.class);
Solution content
        _userVmDao = locator.getDao(UserVmDao.class);
        _vlanDao = locator.getDao(VlanDao.class);
        _volumeDao = locator.getDao(VolumeDao.class);
        _site2SiteVpnGatewayDao = locator.getDao(Site2SiteVpnGatewayDao.class);
        _site2SiteCustomerGatewayDao = locator.getDao(Site2SiteCustomerGatewayDao.class);
        _volumeHostDao = locator.getDao(VolumeHostDao.class);
        _zoneDao = locator.getDao(DataCenterDao.class);
        _securityGroupDao = locator.getDao(SecurityGroupDao.class);
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        _asConditionDao = locator.getDao(ConditionDao.class);
	    _asPolicyDao = locator.getDao(AutoScalePolicyDao.class);
        _asPolicyConditionMapDao = locator.getDao(AutoScalePolicyConditionMapDao.class);
<<<<<<< HEAD
        _counterDao = locator.getDao(CounterDao.class);
        _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
=======
        _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
        _counterDao = locator.getDao(CounterDao.class);
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9

        // Note: stats collector should already have been initialized by this time, otherwise a null instance is
// returned
Solution content
        _asConditionDao = locator.getDao(ConditionDao.class);
	    _asPolicyDao = locator.getDao(AutoScalePolicyDao.class);
        _asPolicyConditionMapDao = locator.getDao(AutoScalePolicyConditionMapDao.class);
        _counterDao = locator.getDao(CounterDao.class);
        _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
        _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
        _counterDao = locator.getDao(CounterDao.class);

        // Note: stats collector should already have been initialized by this time, otherwise a null instance is
// returned
File
ApiDBUtils.java
Developer's decision
Concatenation
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    }

    public static List searchForUserVMs(Criteria c, List permittedAccounts) {
<<<<<<< HEAD
        return _userVmMgr.searchForUserVMs(c, _accountDao.findById(Account.ACCOUNT_ID_SYSTEM), null, false, permittedAccounts, false, null, null);
=======
        return _userVmMgr.searchForUserVMs(c, _accountDao.findById(Account.ACCOUNT_ID_SYSTEM), null, false, permittedAccounts, false, null);
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    }

    public static List searchForStoragePools(Criteria c) {
Solution content
    }

    public static List searchForUserVMs(Criteria c, List permittedAccounts) {
        return _userVmMgr.searchForUserVMs(c, _accountDao.findById(Account.ACCOUNT_ID_SYSTEM), null, false, permittedAccounts, false, null, null);
    }

    public static List searchForStoragePools(Criteria c) {
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
        return _volumeDao.findByIdIncludingRemoved(volumeId);
    }

<<<<<<< HEAD
    public static Site2SiteVpnGatewayVO findVpnGatewayById(Long vpnGatewayId) {
        return _site2SiteVpnGatewayDao.findById(vpnGatewayId);
    }
    
    public static Site2SiteCustomerGatewayVO findCustomerGatewayById(Long customerGatewayId) {    	
    	return _site2SiteCustomerGatewayDao.findById(customerGatewayId);
    }
    
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static List listUsersByAccount(long accountId) {
        return _userDao.listByAccount(accountId);
    }
Solution content
        return _volumeDao.findByIdIncludingRemoved(volumeId);
    }

    public static Site2SiteVpnGatewayVO findVpnGatewayById(Long vpnGatewayId) {
        return _site2SiteVpnGatewayDao.findById(vpnGatewayId);
    }
    
    public static Site2SiteCustomerGatewayVO findCustomerGatewayById(Long customerGatewayId) {    	
    	return _site2SiteCustomerGatewayDao.findById(customerGatewayId);
    }
    
    public static List listUsersByAccount(long accountId) {
        return _userDao.listByAccount(accountId);
    }
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
    }
       return conditions;
    }

<<<<<<< HEAD
    public static List listByResourceTypeAndId(TaggedResourceType type, long resourceId) {
        return _taggedResourceService.listByResourceTypeAndId(type, resourceId);
    
    public static boolean isOfferingForVpc(NetworkOffering offering) {
        boolean vpcProvider = _configMgr.isOfferingForVpc(offering);
        return vpcProvider;
    }

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public static void getAutoScaleVmGroupPolicies(long vmGroupId, List scaleUpPolicies, List scaleDownPolicies)
    {
        List vos = _asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId);
Solution content
       return conditions;
    }

    public static List listByResourceTypeAndId(TaggedResourceType type, long resourceId) {
        return _taggedResourceService.listByResourceTypeAndId(type, resourceId);
    }
    
    public static boolean isOfferingForVpc(NetworkOffering offering) {
        boolean vpcProvider = _configMgr.isOfferingForVpc(offering);
        return vpcProvider;
    }

    public static void getAutoScaleVmGroupPolicies(long vmGroupId, List scaleUpPolicies, List scaleDownPolicies)
    {
        List vos = _asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId);
File
ApiDBUtils.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
                } else {
                    hostResponse.setHaHost(false);
                }
<<<<<<< HEAD
                
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                hostResponse.setHypervisorVersion(host.getHypervisorVersion());

                String cpuAlloc = decimalFormat.format(((float) cpu / (float) (host.getCpus() * host.getSpeed())) * 100f) + "%";
Solution content
                } else {
                    hostResponse.setHaHost(false);
                }
                
                hostResponse.setHypervisorVersion(host.getHypervisorVersion());

                String cpuAlloc = decimalFormat.format(((float) cpu / (float) (host.getCpus() * host.getSpeed())) * 100f) + "%";
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
import com.cloud.network.PhysicalNetworkTrafficType;
import com.cloud.network.RemoteAccessVpn;
import com.cloud.network.Site2SiteCustomerGateway;
<<<<<<< HEAD
import com.cloud.network.Site2SiteCustomerGatewayVO;
import com.cloud.network.Site2SiteVpnConnection;
import com.cloud.network.Site2SiteVpnGateway;
import com.cloud.network.Site2SiteVpnGatewayVO;
=======
import com.cloud.network.Site2SiteVpnConnection;
import com.cloud.network.Site2SiteVpnGateway;
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.network.VirtualRouterProvider;
import com.cloud.network.VpnUser;
import com.cloud.network.as.AutoScalePolicy;
Solution content
import com.cloud.network.PhysicalNetworkTrafficType;
import com.cloud.network.RemoteAccessVpn;
import com.cloud.network.Site2SiteCustomerGateway;
import com.cloud.network.Site2SiteCustomerGatewayVO;
import com.cloud.network.Site2SiteVpnConnection;
import com.cloud.network.Site2SiteVpnGateway;
import com.cloud.network.Site2SiteVpnGatewayVO;
import com.cloud.network.VirtualRouterProvider;
import com.cloud.network.VpnUser;
import com.cloud.network.as.AutoScalePolicy;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.cloud.projects.ProjectInvitation;
import com.cloud.server.Criteria;
import com.cloud.server.ResourceTag;
<<<<<<< HEAD
import com.cloud.server.ResourceTag.TaggedResourceType;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.storage.DiskOfferingVO;
import com.cloud.storage.GuestOS;
import com.cloud.storage.GuestOSCategoryVO;
Solution content
import com.cloud.projects.ProjectInvitation;
import com.cloud.server.Criteria;
import com.cloud.server.ResourceTag;
import com.cloud.server.ResourceTag.TaggedResourceType;
import com.cloud.storage.DiskOfferingVO;
import com.cloud.storage.GuestOS;
import com.cloud.storage.GuestOSCategoryVO;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
        accountResponse.setVmStopped(vmStopped);
        accountResponse.setVmRunning(vmRunning);
        accountResponse.setObjectName("account");
<<<<<<< HEAD
        
        //get resource limits for projects
=======

        // get resource limits for projects
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        Long projectLimit = ApiDBUtils.findCorrectResourceLimit(ResourceType.project, account.getId());
        String projectLimitDisplay = (accountIsAdmin || projectLimit == -1) ? "Unlimited" : String.valueOf(projectLimit);
        Long projectTotal = ApiDBUtils.getResourceCount(ResourceType.project, account.getId());
Solution content
        accountResponse.setVmStopped(vmStopped);
        accountResponse.setVmRunning(vmRunning);
        accountResponse.setObjectName("account");
        
        //get resource limits for projects
        Long projectLimit = ApiDBUtils.findCorrectResourceLimit(ResourceType.project, account.getId());
        String projectLimitDisplay = (accountIsAdmin || projectLimit == -1) ? "Unlimited" : String.valueOf(projectLimit);
        Long projectTotal = ApiDBUtils.getResourceCount(ResourceType.project, account.getId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
        accountResponse.setProjectLimit(projectLimitDisplay);
        accountResponse.setProjectTotal(projectTotal);
        accountResponse.setProjectAvailable(projectAvail);
<<<<<<< HEAD
        
        //get resource limits for networks
=======

        // get resource limits for networks
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        Long networkLimit = ApiDBUtils.findCorrectResourceLimit(ResourceType.network, account.getId());
        String networkLimitDisplay = (accountIsAdmin || networkLimit == -1) ? "Unlimited" : String.valueOf(networkLimit);
        Long networkTotal = ApiDBUtils.getResourceCount(ResourceType.network, account.getId());
Solution content
        accountResponse.setProjectLimit(projectLimitDisplay);
        accountResponse.setProjectTotal(projectTotal);
        accountResponse.setProjectAvailable(projectAvail);
        
        //get resource limits for networks
        Long networkLimit = ApiDBUtils.findCorrectResourceLimit(ResourceType.network, account.getId());
        String networkLimitDisplay = (accountIsAdmin || networkLimit == -1) ? "Unlimited" : String.valueOf(networkLimit);
        Long networkTotal = ApiDBUtils.getResourceCount(ResourceType.network, account.getId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
        accountResponse.setNetworkLimit(networkLimitDisplay);
        accountResponse.setNetworkTotal(networkTotal);
        accountResponse.setNetworkAvailable(networkAvail);
<<<<<<< HEAD
      
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        // adding all the users for an account as part of the response obj
        List usersForAccount = ApiDBUtils.listUsersByAccount(account.getAccountId());
        List userResponseList = new ArrayList();
Solution content
        accountResponse.setNetworkLimit(networkLimitDisplay);
        accountResponse.setNetworkTotal(networkTotal);
        accountResponse.setNetworkAvailable(networkAvail);
      
        // adding all the users for an account as part of the response obj
        List usersForAccount = ApiDBUtils.listUsersByAccount(account.getAccountId());
        List userResponseList = new ArrayList();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        domainResponse.setLevel(domain.getLevel());
        domainResponse.setNetworkDomain(domain.getNetworkDomain());
        domainResponse.setParentDomainId(domain.getParent());
<<<<<<< HEAD
        StringBuilder domainPath = new StringBuilder("ROOT");  
=======
        StringBuilder domainPath = new StringBuilder("ROOT");
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        (domainPath.append(domain.getPath())).deleteCharAt(domainPath.length() - 1);
        domainResponse.setPath(domainPath.toString());
        if (domain.getParent() != null) {
Solution content
        domainResponse.setLevel(domain.getLevel());
        domainResponse.setNetworkDomain(domain.getNetworkDomain());
        domainResponse.setParentDomainId(domain.getParent());
        StringBuilder domainPath = new StringBuilder("ROOT");  
        (domainPath.append(domain.getPath())).deleteCharAt(domainPath.length() - 1);
        domainResponse.setPath(domainPath.toString());
        if (domain.getParent() != null) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
<<<<<<< HEAD
        snapshotResponse.setName(snapshot.getName());
        snapshotResponse.setIntervalType(ApiDBUtils.getSnapshotIntervalTypes(snapshot.getId()));
        snapshotResponse.setState(snapshot.getStatus());
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Snapshot, snapshot.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        snapshotResponse.setTags(tagResponses);
        
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        snapshotResponse.setObjectName("snapshot");
        return snapshotResponse;
    }
Solution content
        snapshotResponse.setName(snapshot.getName());
        snapshotResponse.setIntervalType(ApiDBUtils.getSnapshotIntervalTypes(snapshot.getId()));
        snapshotResponse.setState(snapshot.getStatus());
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Snapshot, snapshot.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        snapshotResponse.setTags(tagResponses);
        
        snapshotResponse.setObjectName("snapshot");
        return snapshotResponse;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
                hostResponse.setMemoryTotal(host.getTotalMemory());
                String hostTags = ApiDBUtils.getHostTags(host.getId());
                hostResponse.setHostTags(hostTags);
<<<<<<< HEAD
                
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                String haTag = ApiDBUtils.getHaTag();
                if (haTag != null && !haTag.isEmpty() && hostTags != null && !hostTags.isEmpty()) {
                    if (haTag.equalsIgnoreCase(hostTags)) {
Solution content
                hostResponse.setMemoryTotal(host.getTotalMemory());
                String hostTags = ApiDBUtils.getHostTags(host.getId());
                hostResponse.setHostTags(hostTags);
                
                String haTag = ApiDBUtils.getHaTag();
                if (haTag != null && !haTag.isEmpty() && hostTags != null && !hostTags.isEmpty()) {
                    if (haTag.equalsIgnoreCase(hostTags)) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
            ipResponse.setVlanId(ipAddr.getVlanId());
            ipResponse.setVlanName(ApiDBUtils.findVlanById(ipAddr.getVlanId()).getVlanTag());
        }
<<<<<<< HEAD
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        if (ipAddr.getSystem()) {
            if (ipAddr.isOneToOneNat()) {
                ipResponse.setPurpose(IpAddress.Purpose.StaticNat.toString());
Solution content
            ipResponse.setVlanId(ipAddr.getVlanId());
            ipResponse.setVlanName(ApiDBUtils.findVlanById(ipAddr.getVlanId()).getVlanTag());
        }
        
        if (ipAddr.getSystem()) {
            if (ipAddr.isOneToOneNat()) {
                ipResponse.setPurpose(IpAddress.Purpose.StaticNat.toString());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
                ipResponse.setPurpose(IpAddress.Purpose.Lb.toString());
            }
        }
<<<<<<< HEAD
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.PublicIpAddress, ipAddr.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        ipResponse.setTags(tagResponses);
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        ipResponse.setObjectName("ipaddress");
        return ipResponse;
    }
Solution content
                ipResponse.setPurpose(IpAddress.Purpose.Lb.toString());
            }
        }
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.PublicIpAddress, ipAddr.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        ipResponse.setTags(tagResponses);
        
        ipResponse.setObjectName("ipaddress");
        return ipResponse;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
        populateOwner(lbResponse, loadBalancer);
        lbResponse.setZoneId(publicIp.getDataCenterId());

<<<<<<< HEAD
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, loadBalancer.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        lbResponse.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        lbResponse.setObjectName("loadbalancer");
        return lbResponse;
    }
Solution content
        populateOwner(lbResponse, loadBalancer);
        lbResponse.setZoneId(publicIp.getDataCenterId());

        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, loadBalancer.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        lbResponse.setTags(tagResponses);

        lbResponse.setObjectName("loadbalancer");
        return lbResponse;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
        volResponse.setCreated(volume.getCreated());
        volResponse.setState(volume.getState().toString());
<<<<<<< HEAD
        if(volume.getState() == Volume.State.UploadOp){
=======
        if (volume.getState() == Volume.State.UploadOp) {
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            com.cloud.storage.VolumeHostVO volumeHostRef = ApiDBUtils.findVolumeHostRef(volume.getId(), volume.getDataCenterId());
            volResponse.setSize(volumeHostRef.getSize());
            volResponse.setCreated(volumeHostRef.getCreated());
Solution content
        volResponse.setCreated(volume.getCreated());
        volResponse.setState(volume.getState().toString());
        if(volume.getState() == Volume.State.UploadOp){
            com.cloud.storage.VolumeHostVO volumeHostRef = ApiDBUtils.findVolumeHostRef(volume.getId(), volume.getDataCenterId());
            volResponse.setSize(volumeHostRef.getSize());
            volResponse.setCreated(volumeHostRef.getCreated());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            volResponse.setCreated(volumeHostRef.getCreated());
            Account caller = UserContext.current().getCaller();
            if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN)
<<<<<<< HEAD
            	volResponse.setHypervisor(ApiDBUtils.getHypervisorTypeFromFormat(volumeHostRef.getFormat()).toString());
=======
                volResponse.setHypervisor(ApiDBUtils.getHypervisorTypeFromFormat(volumeHostRef.getFormat()).toString());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            if (volumeHostRef.getDownloadState() != Status.DOWNLOADED) {
                String volumeStatus = "Processing";
                if (volumeHostRef.getDownloadState() == VMTemplateHostVO.Status.DOWNLOAD_IN_PROGRESS) {
Solution content
            volResponse.setCreated(volumeHostRef.getCreated());
            Account caller = UserContext.current().getCaller();
            if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN)
            volResponse.setHypervisor(ApiDBUtils.getHypervisorTypeFromFormat(volumeHostRef.getFormat()).toString());
            if (volumeHostRef.getDownloadState() != Status.DOWNLOADED) {
                String volumeStatus = "Processing";
                if (volumeHostRef.getDownloadState() == VMTemplateHostVO.Status.DOWNLOAD_IN_PROGRESS) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
                    volResponse.setState("Uploading");
                } else {
                    volumeStatus = volumeHostRef.getErrorString();
<<<<<<< HEAD
                    if(volumeHostRef.getDownloadState() == VMTemplateHostVO.Status.NOT_DOWNLOADED){
                        volResponse.setState("UploadNotStarted");
                    }else {
=======
                    if (volumeHostRef.getDownloadState() == VMTemplateHostVO.Status.NOT_DOWNLOADED) {
                        volResponse.setState("UploadNotStarted");
                    } else {
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                        volResponse.setState("UploadError");
                    }
                }
Solution content
                    volResponse.setState("Uploading");
                } else {
                    volumeStatus = volumeHostRef.getErrorString();
                    if(volumeHostRef.getDownloadState() == VMTemplateHostVO.Status.NOT_DOWNLOADED){
                        volResponse.setState("UploadNotStarted");
                    }else {
                        volResponse.setState("UploadError");
                    }
                }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
                volResponse.setState("Uploaded");
            } else {
                volResponse.setStatus("Successfully Installed");
<<<<<<< HEAD
            }            
        }
        
=======
            }
        }

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        populateOwner(volResponse, volume);

        String storageType;
Solution content
                volResponse.setState("Uploaded");
            } else {
                volResponse.setStatus("Successfully Installed");
            }            
        }
        
        populateOwner(volResponse, volume);

        String storageType;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
        // return hypervisor for ROOT and Resource domain only
        Account caller = UserContext.current().getCaller();
<<<<<<< HEAD
        if ((caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) && volume.getState() != Volume.State.UploadOp) {            
            volResponse.setHypervisor(ApiDBUtils.getVolumeHyperType(volume.getId()).toString());            
        }

        volResponse.setAttached(volume.getAttached());
        volResponse.setDestroyed(volume.getState() == Volume.State.Destroy);        
=======
        if ((caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) && volume.getState() != Volume.State.UploadOp) {
            volResponse.setHypervisor(ApiDBUtils.getVolumeHyperType(volume.getId()).toString());
        }

        volResponse.setAttached(volume.getAttached());
        volResponse.setDestroyed(volume.getState() == Volume.State.Destroy);
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        boolean isExtractable = true;
        if (volume.getVolumeType() != Volume.Type.DATADISK) { // Datadisk dont have any template dependence.
            VMTemplateVO template = ApiDBUtils.findTemplateById(volume.getTemplateId());
Solution content
        // return hypervisor for ROOT and Resource domain only
        Account caller = UserContext.current().getCaller();
        if ((caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) && volume.getState() != Volume.State.UploadOp) {            
            volResponse.setHypervisor(ApiDBUtils.getVolumeHyperType(volume.getId()).toString());            
        }

        volResponse.setAttached(volume.getAttached());
        volResponse.setDestroyed(volume.getState() == Volume.State.Destroy);        
        boolean isExtractable = true;
        if (volume.getVolumeType() != Volume.Type.DATADISK) { // Datadisk dont have any template dependence.
            VMTemplateVO template = ApiDBUtils.findTemplateById(volume.getTemplateId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
        }
            VMTemplateVO template = ApiDBUtils.findTemplateById(volume.getTemplateId());
            if (template != null) { // For ISO based volumes template = null and we allow extraction of all ISO based
// volumes
<<<<<<< HEAD
                isExtractable = template.isExtractable() && template.getTemplateType() != Storage.TemplateType.SYSTEM;                
            }
        }
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Volume, volume.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        volResponse.setTags(tagResponses);
        
=======
                isExtractable = template.isExtractable() && template.getTemplateType() != Storage.TemplateType.SYSTEM;
            }
        }

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        volResponse.setExtractable(isExtractable);
        volResponse.setObjectName("volume");
        return volResponse;
Solution content
        volResponse.setExtractable(isExtractable);
            VMTemplateVO template = ApiDBUtils.findTemplateById(volume.getTemplateId());
            if (template != null) { // For ISO based volumes template = null and we allow extraction of all ISO based
// volumes
                isExtractable = template.isExtractable() && template.getTemplateType() != Storage.TemplateType.SYSTEM;                
            }
        }
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Volume, volume.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        volResponse.setTags(tagResponses);
        
        volResponse.setObjectName("volume");
        return volResponse;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
            if (vm != null) {
                response.setVirtualMachineId(vm.getId());
                response.setVirtualMachineName(vm.getHostName());
<<<<<<< HEAD
                
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                if (vm.getDisplayName() != null) {
                    response.setVirtualMachineDisplayName(vm.getDisplayName());
                } else {
Solution content
            if (vm != null) {
                response.setVirtualMachineId(vm.getId());
                response.setVirtualMachineName(vm.getHostName());
                
                if (vm.getDisplayName() != null) {
                    response.setVirtualMachineDisplayName(vm.getDisplayName());
                } else {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        if (state.equals(FirewallRule.State.Revoke)) {
            stateToSet = "Deleting";
        }
<<<<<<< HEAD
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.PortForwardingRule, fwRule.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);
        
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setState(stateToSet);
        response.setObjectName("portforwardingrule");
        return response;
Solution content
        if (state.equals(FirewallRule.State.Revoke)) {
            stateToSet = "Deleting";
        }
        
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.PortForwardingRule, fwRule.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);
        
        response.setState(stateToSet);
        response.setObjectName("portforwardingrule");
        return response;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
            } else {
                userVmResponse.setDisplayName(userVm.getHostName());
            }
<<<<<<< HEAD
            
            if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN) {
                userVmResponse.setInstanceName(userVm.getInstanceName());
            }
            
=======

            if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN) {
                userVmResponse.setInstanceName(userVm.getInstanceName());
            }

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            if (userVm.getPassword() != null) {
                userVmResponse.setPassword(userVm.getPassword());
            }
Solution content
            } else {
                userVmResponse.setDisplayName(userVm.getHostName());
            }
            
            if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN) {
                userVmResponse.setInstanceName(userVm.getInstanceName());
            }
            
            if (userVm.getPassword() != null) {
                userVmResponse.setPassword(userVm.getPassword());
            }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
=======

            if (userVm.getHypervisorType() != null) {
                userVmResponse.setHypervisor(userVm.getHypervisorType().toString());
            }
<<<<<<< HEAD
            
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            if (details.contains(VMDetails.all) || details.contains(VMDetails.tmpl)) {
                // Template Info
                VMTemplateVO template = templates.get(userVm.getTemplateId());
Solution content
            if (userVm.getHypervisorType() != null) {
                userVmResponse.setHypervisor(userVm.getHypervisorType().toString());
            }
            
            if (details.contains(VMDetails.all) || details.contains(VMDetails.tmpl)) {
                // Template Info
                VMTemplateVO template = templates.get(userVm.getTemplateId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
                }
                userVmResponse.setNics(nicResponses);
            }
<<<<<<< HEAD
            
            //set tag information
            List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, userVm.getId());
            List tagResponses = new ArrayList();
            for (ResourceTag tag : tags) {
                ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
                tagResponses.add(tagResponse);
            }
            userVmResponse.setTags(tagResponses);
            
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            IpAddress ip = ApiDBUtils.findIpByAssociatedVmId(userVm.getId());
            if (ip != null) {
                userVmResponse.setPublicIpId(ip.getId());
Solution content
                }
                userVmResponse.setNics(nicResponses);
            }
            
            //set tag information
            List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, userVm.getId());
            List tagResponses = new ArrayList();
            for (ResourceTag tag : tags) {
                ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
                tagResponses.add(tagResponse);
            }
            userVmResponse.setTags(tagResponses);
            
            IpAddress ip = ApiDBUtils.findIpByAssociatedVmId(userVm.getId());
            if (ip != null) {
                userVmResponse.setPublicIpId(ip.getId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
                        vmResponse.setLinkLocalMacAddress(singleNicProfile.getMacAddress());
                        vmResponse.setLinkLocalNetmask(singleNicProfile.getNetmask());
                    } else if (network.getTrafficType() == TrafficType.Public || network.getTrafficType() == TrafficType.Guest) {
<<<<<<< HEAD
                        /*In basic zone, public ip has TrafficType.Guest*/
=======
                        /* In basic zone, public ip has TrafficType.Guest */
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                        vmResponse.setPublicIp(singleNicProfile.getIp4Address());
                        vmResponse.setPublicMacAddress(singleNicProfile.getMacAddress());
                        vmResponse.setPublicNetmask(singleNicProfile.getNetmask());
Solution content
                        vmResponse.setLinkLocalMacAddress(singleNicProfile.getMacAddress());
                        vmResponse.setLinkLocalNetmask(singleNicProfile.getNetmask());
                    } else if (network.getTrafficType() == TrafficType.Public || network.getTrafficType() == TrafficType.Guest) {
                        /*In basic zone, public ip has TrafficType.Guest*/
                        vmResponse.setPublicIp(singleNicProfile.getIp4Address());
                        vmResponse.setPublicMacAddress(singleNicProfile.getMacAddress());
                        vmResponse.setPublicNetmask(singleNicProfile.getNetmask());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
        populateAccount(response, owner.getId());
        populateDomain(response, owner.getDomainId());

<<<<<<< HEAD
        //set tag information
        List tags = null;
        if (result.getFormat() == ImageFormat.ISO) {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.ISO, result.getId());
        } else {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Template, result.getId());
        }
        
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setObjectName("iso");
        return response;
    }
Solution content
        populateAccount(response, owner.getId());
        populateDomain(response, owner.getDomainId());

        //set tag information
        List tags = null;
        if (result.getFormat() == ImageFormat.ISO) {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.ISO, result.getId());
        } else {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Template, result.getId());
        }
        
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

        response.setObjectName("iso");
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
        templateResponse.setTemplateTag(template.getTemplateTag());

<<<<<<< HEAD
        //set tag information
        List tags = null;
        if (template.getFormat() == ImageFormat.ISO) {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.ISO, template.getId());
        } else {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Template, template.getId());
        }
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        templateResponse.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        templateResponse.setObjectName("template");
        responses.add(templateResponse);
        return responses;
Solution content
        templateResponse.setTemplateTag(template.getTemplateTag());

        //set tag information
        List tags = null;
        if (template.getFormat() == ImageFormat.ISO) {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.ISO, template.getId());
        } else {
            tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Template, template.getId());
        }
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        templateResponse.setTags(tagResponses);

        templateResponse.setObjectName("template");
        responses.add(templateResponse);
        return responses;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
                        egressRulesResponse.add(ruleData);
                    }
                }
<<<<<<< HEAD
                //set tag information
                List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, networkGroup.getId());
                List tagResponses = new ArrayList();
                for (ResourceTag tag : tags) {
                    ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
                    tagResponses.add(tagResponse);
                }
                netGrpResponse.setTags(tagResponses);
                
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                netGrpResponse
                        .setSecurityGroupIngressRules(ingressRulesResponse);
                netGrpResponse.setSecurityGroupEgressRules(egressRulesResponse);
Solution content
                        egressRulesResponse.add(ruleData);
                    }
                }
                //set tag information
                List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, networkGroup.getId());
                List tagResponses = new ArrayList();
                for (ResourceTag tag : tags) {
                    ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
                    tagResponses.add(tagResponse);
                }
                netGrpResponse.setTags(tagResponses);
                
                netGrpResponse
                        .setSecurityGroupIngressRules(ingressRulesResponse);
                netGrpResponse.setSecurityGroupEgressRules(egressRulesResponse);
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
        boolean savedValue = SerializationContext.current().getUuidTranslation();
        SerializationContext.current().setUuidTranslation(false);
<<<<<<< HEAD
        
        Object resultObject = ApiSerializerHelper.fromSerializedString(job.getResult());
        jobResponse.setJobResult((ResponseObject) resultObject);
        SerializationContext.current().setUuidTranslation(savedValue);
        
=======

        Object resultObject = ApiSerializerHelper.fromSerializedString(job.getResult());
        jobResponse.setJobResult((ResponseObject) resultObject);
        SerializationContext.current().setUuidTranslation(savedValue);

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        if (resultObject != null) {
            Class clz = resultObject.getClass();
            if (clz.isPrimitive() || clz.getSuperclass() == Number.class || clz == String.class || clz == Date.class) {
Solution content
        boolean savedValue = SerializationContext.current().getUuidTranslation();
        SerializationContext.current().setUuidTranslation(false);
        
        Object resultObject = ApiSerializerHelper.fromSerializedString(job.getResult());
        jobResponse.setJobResult((ResponseObject) resultObject);
        SerializationContext.current().setUuidTranslation(savedValue);
        
        if (resultObject != null) {
            Class clz = resultObject.getClass();
            if (clz.isPrimitive() || clz.getSuperclass() == Number.class || clz == String.class || clz == Date.class) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    @Override
    public List createCapacityResponse(List result, DecimalFormat format) {
        List capacityResponses = new ArrayList();
<<<<<<< HEAD
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        for (Capacity summedCapacity : result) {
            CapacityResponse capacityResponse = new CapacityResponse();
            capacityResponse.setCapacityTotal(summedCapacity.getTotalCapacity());
Solution content
    @Override
    public List createCapacityResponse(List result, DecimalFormat format) {
        List capacityResponses = new ArrayList();
        
        for (Capacity summedCapacity : result) {
            CapacityResponse capacityResponse = new CapacityResponse();
            capacityResponse.setCapacityTotal(summedCapacity.getTotalCapacity());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
            }
            capacityResponse.setZoneId(summedCapacity.getDataCenterId());
            capacityResponse.setZoneName(ApiDBUtils.findZoneById(summedCapacity.getDataCenterId()).getName());
<<<<<<< HEAD
            if (summedCapacity.getUsedPercentage() != null){
=======
            if (summedCapacity.getUsedPercentage() != null) {
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                capacityResponse.setPercentUsed(format.format(summedCapacity.getUsedPercentage() * 100f));
            } else if (summedCapacity.getTotalCapacity() != 0) {
                capacityResponse.setPercentUsed(format.format((float) summedCapacity.getUsedCapacity() / (float) summedCapacity.getTotalCapacity() * 100f));
Solution content
            }
            capacityResponse.setZoneId(summedCapacity.getDataCenterId());
            capacityResponse.setZoneName(ApiDBUtils.findZoneById(summedCapacity.getDataCenterId()).getName());
            if (summedCapacity.getUsedPercentage() != null){
                capacityResponse.setPercentUsed(format.format(summedCapacity.getUsedPercentage() * 100f));
            } else if (summedCapacity.getTotalCapacity() != 0) {
                capacityResponse.setPercentUsed(format.format((float) summedCapacity.getUsedCapacity() / (float) summedCapacity.getTotalCapacity() * 100f));
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            serviceResponses.add(svcRsp);
        }
<<<<<<< HEAD
        response.setForVpc(ApiDBUtils.isOfferingForVpc(offering));
        
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setServices(serviceResponses);
        response.setObjectName("networkoffering");
        return response;
Solution content
            serviceResponses.add(svcRsp);
        }
        response.setForVpc(ApiDBUtils.isOfferingForVpc(offering));
        
        response.setServices(serviceResponses);
        response.setObjectName("networkoffering");
        return response;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
        if (network.getBroadcastUri() != null) {
            String broadcastUri = network.getBroadcastUri().toString();
            response.setBroadcastUri(broadcastUri);
<<<<<<< HEAD
            String vlan="N/A";
=======
            String vlan = "N/A";
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            if (broadcastUri.startsWith("vlan")) {
                vlan = broadcastUri.substring("vlan://".length(), broadcastUri.length());
            }
Solution content
        if (network.getBroadcastUri() != null) {
            String broadcastUri = network.getBroadcastUri().toString();
            response.setBroadcastUri(broadcastUri);
            String vlan="N/A";
            if (broadcastUri.startsWith("vlan")) {
                vlan = broadcastUri.substring("vlan://".length(), broadcastUri.length());
            }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
        response.setCanUseForDeploy(ApiDBUtils.canUseForDeploy(network));
        response.setVpcId(network.getVpcId());

<<<<<<< HEAD
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Network, network.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setObjectName("network");
        return response;
    }
Solution content
        response.setCanUseForDeploy(ApiDBUtils.canUseForDeploy(network));
        response.setVpcId(network.getVpcId());

        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.Network, network.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

        response.setObjectName("network");
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
        response.setIcmpCode(fwRule.getIcmpCode());
        response.setIcmpType(fwRule.getIcmpType());

<<<<<<< HEAD
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.FirewallRule, fwRule.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setState(stateToSet);
        response.setObjectName("firewallrule");
        return response;
Solution content
        response.setIcmpCode(fwRule.getIcmpCode());
        response.setIcmpType(fwRule.getIcmpType());

        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.FirewallRule, fwRule.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        response.setTags(tagResponses);

        response.setState(stateToSet);
        response.setObjectName("firewallrule");
        return response;
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
<<<<<<< HEAD
    
        response.setObjectName("firewallrule");
        return response;
    }
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public NetworkACLResponse createNetworkACLResponse(NetworkACL networkACL) {
        NetworkACLResponse response = new NetworkACLResponse();
Solution content
        response.setObjectName("firewallrule");
        return response;
    }
    
    @Override
    public NetworkACLResponse createNetworkACLResponse(NetworkACL networkACL) {
        NetworkACLResponse response = new NetworkACLResponse();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        response.setObjectName("networkacl");
        return response;
    }
<<<<<<< HEAD
    
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    public UserVmData newUserVmData(UserVm userVm) {
        UserVmData userVmData = new UserVmData();
        userVmData.setId(userVm.getId());
Solution content
        response.setObjectName("networkacl");
        return response;
    }

    public UserVmData newUserVmData(UserVm userVm) {
        UserVmData userVmData = new UserVmData();
        userVmData.setId(userVm.getId());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
            userVmData.setDisplayName(userVm.getHostName());
        }
        userVmData.setInstanceName(userVm.getInstanceName());
<<<<<<< HEAD
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        userVmData.setDomainId(userVm.getDomainId());

        if (userVm.getHypervisorType() != null) {
Solution content
            userVmData.setDisplayName(userVm.getHostName());
        }
        userVmData.setInstanceName(userVm.getInstanceName());
        
        userVmData.setDomainId(userVm.getDomainId());

        if (userVm.getHypervisorType() != null) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        userVmResponse.setPublicIpId(userVmData.getPublicIpId());
        userVmResponse.setPublicIp(userVmData.getPublicIp());

<<<<<<< HEAD
        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, userVmData.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        userVmResponse.setTags(tagResponses);

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return userVmResponse;
    }
Solution content
        userVmResponse.setPublicIpId(userVmData.getPublicIpId());
        userVmResponse.setPublicIp(userVmData.getPublicIp());

        //set tag information
        List tags = ApiDBUtils.listByResourceTypeAndId(TaggedResourceType.UserVm, userVmData.getId());
        List tagResponses = new ArrayList();
        for (ResourceTag tag : tags) {
            ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);
            tagResponses.add(tagResponse);
        }
        userVmResponse.setTags(tagResponses);

        return userVmResponse;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
        if (lb == null) {
            return spResponse;
<<<<<<< HEAD
		}
=======
        }
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        spResponse.setlbRuleId(lb.getId());
        Account account = ApiDBUtils.findAccountById(lb.getAccountId());
        if (account != null) {
Solution content
        spResponse.setlbRuleId(lb.getId());

        if (lb == null) {
            return spResponse;
		}
        Account account = ApiDBUtils.findAccountById(lb.getAccountId());
        if (account != null) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
        response.setObjectName("storagenetworkiprange");
        return response;
    }
<<<<<<< HEAD
    
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public Long getIdentiyId(String tableName, String token) {
        return ApiDispatcher.getIdentiyId(tableName, token);
Solution content
        response.setObjectName("storagenetworkiprange");
        return response;
    }
    
    @Override
    public Long getIdentiyId(String tableName, String token) {
        return ApiDispatcher.getIdentiyId(tableName, token);
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
    public Long getIdentiyId(String tableName, String token) {
        return ApiDispatcher.getIdentiyId(tableName, token);
    }
<<<<<<< HEAD
    
    @Override
    public ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag, boolean keyValueOnly) {
        ResourceTagResponse response = new ResourceTagResponse();
        response.setKey(resourceTag.getKey());
        response.setValue(resourceTag.getValue());
        
        if (!keyValueOnly) {
        response.setResourceType(resourceTag.getResourceType().toString());        
        response.setId(ApiDBUtils.getUuid(String.valueOf(resourceTag.getResourceId()),resourceTag.getResourceType()));
=======

    @Override
    public ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag) {
        ResourceTagResponse response = new ResourceTagResponse();
        response.setKey(resourceTag.getKey());
        response.setValue(resourceTag.getValue());
        response.setResourceType(resourceTag.getResourceType().toString());
        response.setId(ApiDBUtils.getUuid(String.valueOf(resourceTag.getResourceId()), resourceTag.getResourceType()));
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        Long accountId = resourceTag.getAccountId();
        Long domainId = resourceTag.getDomainId();
        if (accountId != null) {
Solution content
    public Long getIdentiyId(String tableName, String token) {
        return ApiDispatcher.getIdentiyId(tableName, token);
    }
    
    @Override
    public ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag, boolean keyValueOnly) {
        ResourceTagResponse response = new ResourceTagResponse();
        response.setKey(resourceTag.getKey());
        response.setValue(resourceTag.getValue());
        
        if (!keyValueOnly) {
        response.setResourceType(resourceTag.getResourceType().toString());        
        response.setId(ApiDBUtils.getUuid(String.valueOf(resourceTag.getResourceId()),resourceTag.getResourceType()));
        Long accountId = resourceTag.getAccountId();
        Long domainId = resourceTag.getDomainId();
        if (accountId != null) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Annotation
If statement
Method invocation
Method signature
Variable
Chunk
Conflicting content
                response.setAccountName(account.getAccountName());
            }
        }
<<<<<<< HEAD
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        if (domainId != null) {
            response.setDomainId(domainId);
            response.setDomainName(ApiDBUtils.findDomainById(domainId).getName());
Solution content
        }
        
        if (domainId != null) {
                response.setAccountName(account.getAccountName());
            }
            response.setDomainId(domainId);
            response.setDomainName(ApiDBUtils.findDomainById(domainId).getName());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
            response.setDomainId(domainId);
            response.setDomainName(ApiDBUtils.findDomainById(domainId).getName());
        }
<<<<<<< HEAD
        
        response.setCustomer(resourceTag.getCustomer());
        }
        
        response.setObjectName("tag");
  
        return response;
    }
    
=======

        response.setCustomer(resourceTag.getCustomer());

        response.setObjectName("tag");

        return response;
    }

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public VpcOfferingResponse createVpcOfferingResponse(VpcOffering offering) {
        VpcOfferingResponse response = new VpcOfferingResponse();
Solution content
            response.setDomainId(domainId);
            response.setDomainName(ApiDBUtils.findDomainById(domainId).getName());
        }
        
        response.setCustomer(resourceTag.getCustomer());
        }
        
        response.setObjectName("tag");
  
        return response;
    }
    
    @Override
    public VpcOfferingResponse createVpcOfferingResponse(VpcOffering offering) {
        VpcOfferingResponse response = new VpcOfferingResponse();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
        response.setObjectName("vpcoffering");
        return response;
    }
<<<<<<< HEAD
    
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public VpcResponse createVpcResponse(Vpc vpc) {
        VpcResponse response = new VpcResponse();
Solution content
        response.setObjectName("vpcoffering");
        return response;
    }
    
    @Override
    public VpcResponse createVpcResponse(Vpc vpc) {
        VpcResponse response = new VpcResponse();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        response.setState(vpc.getState().name());
        response.setVpcOfferingId(vpc.getVpcOfferingId());
        response.setCidr(vpc.getCidr());
<<<<<<< HEAD
=======
        response.setZoneId(vpc.getZoneId());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        response.setRestartRequired(vpc.isRestartRequired());
        response.setNetworkDomain(vpc.getNetworkDomain());
Solution content
        response.setState(vpc.getState().name());
        response.setVpcOfferingId(vpc.getVpcOfferingId());
        response.setCidr(vpc.getCidr());
        response.setRestartRequired(vpc.isRestartRequired());
        response.setNetworkDomain(vpc.getNetworkDomain());
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
            serviceResponses.add(svcRsp);
        }
<<<<<<< HEAD
        
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        List networkResponses = new ArrayList();
        List networks = ApiDBUtils.listVpcNetworks(vpc.getId());
        for (Network network : networks) {
Solution content
            serviceResponses.add(svcRsp);
        }
        
        List networkResponses = new ArrayList();
        List networks = ApiDBUtils.listVpcNetworks(vpc.getId());
        for (Network network : networks) {
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
<<<<<<< HEAD
            NetworkResponse ntwkRsp = createNetworkResponse(network);
            networkResponses.add(ntwkRsp);
        }
        
        DataCenter zone = ApiDBUtils.findZoneById(vpc.getZoneId());
        response.setZoneId(vpc.getZoneId());
        response.setZoneName(zone.getName());
        
        response.setNetworks(networkResponses);
        response.setServices(serviceResponses);
        response.setObjectName("vpc");
=======

        response.setNetworks(networkResponses);
        response.setServices(serviceResponses);
        response.setObjectName("vpcoffering");
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return response;
    }
Solution content
            NetworkResponse ntwkRsp = createNetworkResponse(network);
            networkResponses.add(ntwkRsp);
        }
        
        DataCenter zone = ApiDBUtils.findZoneById(vpc.getZoneId());
        response.setZoneId(vpc.getZoneId());
        response.setZoneName(zone.getName());
        
        response.setNetworks(networkResponses);
        response.setServices(serviceResponses);
        response.setObjectName("vpc");
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        response.setZoneName(zone.getName());
        response.setAddress(result.getIp4Address());
        response.setPhysicalNetworkId(result.getPhysicalNetworkId());
<<<<<<< HEAD
        
        populateAccount(response, result.getAccountId());
        populateDomain(response, result.getDomainId());
        
        response.setObjectName("privategateway");
        return response;
    }
    
=======
        response.setObjectName("privategateway");
        return response;
    }

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public AutoScaleVmProfileResponse createAutoScaleVmProfileResponse(AutoScaleVmProfile profile) {
        AutoScaleVmProfileResponse response = new AutoScaleVmProfileResponse();
Solution content
        response.setZoneName(zone.getName());
        response.setAddress(result.getIp4Address());
        response.setPhysicalNetworkId(result.getPhysicalNetworkId());
        
        populateAccount(response, result.getAccountId());
        populateDomain(response, result.getDomainId());
        
        response.setObjectName("privategateway");
        return response;
    }
    
    @Override
    public AutoScaleVmProfileResponse createAutoScaleVmProfileResponse(AutoScaleVmProfile profile) {
        AutoScaleVmProfileResponse response = new AutoScaleVmProfileResponse();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
        populateOwner(response, profile);
        return response;
    }
<<<<<<< HEAD
    
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    @Override
    public AutoScalePolicyResponse createAutoScalePolicyResponse(AutoScalePolicy policy) {
        AutoScalePolicyResponse response = new AutoScalePolicyResponse();
Solution content
        populateOwner(response, profile);
        return response;
    }
        
    @Override
    public AutoScalePolicyResponse createAutoScalePolicyResponse(AutoScalePolicy policy) {
        AutoScalePolicyResponse response = new AutoScalePolicyResponse();
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        
        // Populates the account information in the response
        populateOwner(response, policy);
<<<<<<< HEAD
    
=======

>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return response;
    }
Solution content
        
        // Populates the account information in the response
        populateOwner(response, policy);
    
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        response.setScaleUpPolicies(scaleUpPoliciesResponse);
        response.setScaleDownPolicies(scaleDownPoliciesResponse);

<<<<<<< HEAD
        //Fetch policies for vmgroup
=======
        // Fetch policies for vmgroup
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        List scaleUpPolicies = new ArrayList();
        List scaleDownPolicies = new ArrayList();
        ApiDBUtils.getAutoScaleVmGroupPolicies(vmGroup.getId(), scaleUpPolicies, scaleDownPolicies);
Solution content
        response.setScaleUpPolicies(scaleUpPoliciesResponse);
        response.setScaleDownPolicies(scaleDownPoliciesResponse);

        //Fetch policies for vmgroup
        List scaleUpPolicies = new ArrayList();
        List scaleDownPolicies = new ArrayList();
        ApiDBUtils.getAutoScaleVmGroupPolicies(vmGroup.getId(), scaleUpPolicies, scaleDownPolicies);
File
ApiResponseHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
        return response;
    }

<<<<<<< HEAD
        @Override
        public StaticRouteResponse createStaticRouteResponse(StaticRoute result) {
            StaticRouteResponse response = new StaticRouteResponse();
            response.setId(result.getId());
            response.setVpcId(result.getVpcId());
            response.setCidr(result.getCidr());

            StaticRoute.State state = result.getState();
            String stateToSet = state.toString();
            if (state.equals(FirewallRule.State.Revoke)) {
                stateToSet = "Deleting";
            }
            response.setState(stateToSet);
            populateAccount(response, result.getAccountId());
            populateDomain(response, result.getDomainId());
            response.setObjectName("staticroute");
            return response;
        }

        @Override
        public Site2SiteVpnGatewayResponse createSite2SiteVpnGatewayResponse(Site2SiteVpnGateway result) {
            Site2SiteVpnGatewayResponse response = new Site2SiteVpnGatewayResponse();
            response.setId(result.getId());
            response.setIp(ApiDBUtils.findIpAddressById(result.getAddrId()).getAddress().toString());
            response.setRemoved(result.getRemoved());
        response.setObjectName("vpngateway");
            return response;
        }

        @Override
        public Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result) {
            Site2SiteCustomerGatewayResponse response = new Site2SiteCustomerGatewayResponse();
            response.setId(result.getId());
            response.setGatewayIp(result.getGatewayIp());
            response.setGuestCidrList(result.getGuestCidrList());
            response.setIpsecPsk(result.getIpsecPsk());
            response.setRemoved(result.getRemoved());
        response.setObjectName("vpncustomergateway");
            return response;
        }
        
    @Override
    public CounterResponse createCounterResponse(Counter counter) {
        CounterResponse response = new CounterResponse();
        response.setId(counter.getId());
        response.setSource(counter.getSource().toString());
        response.setName(counter.getName());
        response.setValue(counter.getValue());
        response.setZoneId(counter.getZoneId());
        response.setObjectName("counter");
=======
    @Override
    public StaticRouteResponse createStaticRouteResponse(StaticRoute result) {
        StaticRouteResponse response = new StaticRouteResponse();
        response.setId(result.getId());
        response.setVpcId(result.getVpcId());
        response.setCidr(result.getCidr());

        StaticRoute.State state = result.getState();
        String stateToSet = state.toString();
        if (state.equals(FirewallRule.State.Revoke)) {
            stateToSet = "Deleting";
        }
        response.setState(stateToSet);
        populateAccount(response, result.getAccountId());
        populateDomain(response, result.getDomainId());
        response.setObjectName("staticroute");
        return response;
    }

    @Override
    public PrivateGatewayResponse createPrivateGatewayResponseResponse(PrivateGateway result) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Site2SiteVpnGatewayResponse createSite2SiteVpnGatewayResponse(Site2SiteVpnGateway result) {
        Site2SiteVpnGatewayResponse response = new Site2SiteVpnGatewayResponse();
        response.setId(result.getId());
        response.setIp(ApiDBUtils.findIpAddressById(result.getAddrId()).getAddress().toString());
        response.setRemoved(result.getRemoved());
        return response;
    }

    @Override
    public Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result) {
        Site2SiteCustomerGatewayResponse response = new Site2SiteCustomerGatewayResponse();
        response.setId(result.getId());
        response.setGatewayIp(result.getGatewayIp());
        response.setGuestCidrList(result.getGuestCidrList());
        response.setIpsecPsk(result.getIpsecPsk());
        response.setRemoved(result.getRemoved());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return response;
    }
Solution content
        return response;
    }

        @Override
    public StaticRouteResponse createStaticRouteResponse(StaticRoute result) {
        StaticRouteResponse response = new StaticRouteResponse();
        response.setId(result.getId());
        response.setVpcId(result.getVpcId());
        response.setCidr(result.getCidr());
        
        StaticRoute.State state = result.getState();
        String stateToSet = state.toString();
        if (state.equals(FirewallRule.State.Revoke)) {
            stateToSet = "Deleting";
        }
        response.setState(stateToSet);
        populateAccount(response, result.getAccountId());
        populateDomain(response, result.getDomainId());
        response.setObjectName("staticroute");
        return response;
    }
    
    @Override
    public Site2SiteVpnGatewayResponse createSite2SiteVpnGatewayResponse(Site2SiteVpnGateway result) {
        Site2SiteVpnGatewayResponse response = new Site2SiteVpnGatewayResponse();
        response.setId(result.getId());
        response.setIp(ApiDBUtils.findIpAddressById(result.getAddrId()).getAddress().toString());
        response.setRemoved(result.getRemoved());
        response.setObjectName("vpngateway");
        return response;
    }

    @Override
    public Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result) {
        Site2SiteCustomerGatewayResponse response = new Site2SiteCustomerGatewayResponse();
        response.setId(result.getId());
        response.setGatewayIp(result.getGatewayIp());
        response.setGuestCidrList(result.getGuestCidrList());
        response.setIpsecPsk(result.getIpsecPsk());
        response.setRemoved(result.getRemoved());
        response.setObjectName("vpncustomergateway");
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Combination
Kind of conflict
Annotation
Method declaration
Method invocation
Method signature
Variable
Chunk
Conflicting content
        
    public Site2SiteVpnConnectionResponse createSite2SiteVpnConnectionResponse(Site2SiteVpnConnection result) {
        Site2SiteVpnConnectionResponse response = new Site2SiteVpnConnectionResponse();
        response.setId(result.getId());
<<<<<<< HEAD
        
        response.setVpnGatewayId(result.getVpnGatewayId());
        Long vpnGatewayId = result.getVpnGatewayId();
        if(vpnGatewayId != null) {
        	Site2SiteVpnGatewayVO vpnGateway = ApiDBUtils.findVpnGatewayById(vpnGatewayId);
        	
        	long ipId = vpnGateway.getAddrId();
        	IPAddressVO ipObj = ApiDBUtils.findIpAddressById(ipId);
        	response.setIp(ipObj.getAddress().addr());  
        }
        response.setCustomerGatewayId(result.getCustomerGatewayId());
        Long customerGatewayId = result.getCustomerGatewayId();
        if(customerGatewayId != null) {
        	Site2SiteCustomerGatewayVO customerGateway = ApiDBUtils.findCustomerGatewayById(customerGatewayId);
        	response.setGatewayIp(customerGateway.getGatewayIp());
        	response.setGuestCidrList(customerGateway.getGuestCidrList());
        	response.setIpsecPsk(customerGateway.getIpsecPsk());
        	response.setIkePolicy(customerGateway.getIkePolicy());
        	response.setEspPolicy(customerGateway.getEspPolicy());
        	response.setLifetime(customerGateway.getLifetime());
        }      
                
        response.setCreated(result.getCreated());
        response.setRemoved(result.getRemoved());
        response.setObjectName("vpnconnection");
=======
        response.setVpnGatewayId(result.getVpnGatewayId());
        response.setCustomerGatewayId(result.getCustomerGatewayId());
        response.setCreated(result.getCreated());
        response.setRemoved(result.getRemoved());
        return response;
    }

    @Override
    public CounterResponse createCounterResponse(Counter counter) {
        CounterResponse response = new CounterResponse();
        response.setId(counter.getId());
        response.setSource(counter.getSource().toString());
        response.setName(counter.getName());
        response.setValue(counter.getValue());
        response.setZoneId(counter.getZoneId());
        response.setObjectName("counter");
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return response;
    }
Solution content
    public Site2SiteVpnConnectionResponse createSite2SiteVpnConnectionResponse(Site2SiteVpnConnection result) {
        Site2SiteVpnConnectionResponse response = new Site2SiteVpnConnectionResponse();
        response.setId(result.getId());
        response.setVpnGatewayId(result.getVpnGatewayId());
        response.setCustomerGatewayId(result.getCustomerGatewayId());
        response.setCreated(result.getCreated());
        response.setRemoved(result.getRemoved());
            return response;
        }
    
    /*
        
    @Override
    public CounterResponse createCounterResponse(Counter counter) {
        CounterResponse response = new CounterResponse();
        response.setId(counter.getId());
        response.setSource(counter.getSource().toString());
        response.setName(counter.getName());
        response.setValue(counter.getValue());
        response.setZoneId(counter.getZoneId());
        response.setObjectName("counter");
        
        response.setVpnGatewayId(result.getVpnGatewayId());
        Long vpnGatewayId = result.getVpnGatewayId();
        if(vpnGatewayId != null) {
        	Site2SiteVpnGatewayVO vpnGateway = ApiDBUtils.findVpnGatewayById(vpnGatewayId);
        	
        	long ipId = vpnGateway.getAddrId();
        	IPAddressVO ipObj = ApiDBUtils.findIpAddressById(ipId);
        	response.setIp(ipObj.getAddress().addr());  
        }
        
        response.setCustomerGatewayId(result.getCustomerGatewayId());
        Long customerGatewayId = result.getCustomerGatewayId();
        if(customerGatewayId != null) {
        	Site2SiteCustomerGatewayVO customerGateway = ApiDBUtils.findCustomerGatewayById(customerGatewayId);
        	response.setGatewayIp(customerGateway.getGatewayIp());
        	response.setGuestCidrList(customerGateway.getGuestCidrList());
        	response.setIpsecPsk(customerGateway.getIpsecPsk());
        	response.setIkePolicy(customerGateway.getIkePolicy());
        	response.setEspPolicy(customerGateway.getEspPolicy());
        	response.setLifetime(customerGateway.getLifetime());
        }      
                
        response.setCreated(result.getCreated());
        response.setRemoved(result.getRemoved());
        response.setObjectName("vpnconnection");
        return response;
    }
    */

//    @Override
//    public ConditionResponse createConditionResponse(Condition condition) {
//        ConditionResponse response = new ConditionResponse();
//        response.setId(condition.getId());
//        CounterResponse counter;
//        counter = createCounterResponse(ApiDBUtils.getCounter(condition.getCounterid()));
//        response.setCounter(counter);
//        response.setRelationalOperator(condition.getRelationalOperator().toString());
//        response.setThreshold(condition.getThreshold());
//        Account account = ApiDBUtils.findAccountById(condition.getAccountId());
//        response.setZoneId(condition.getZoneId());
//        response.setObjectName("condition");
//
//        populateOwner(response, condition);
//        return response;
//    }

    @Override
    public CounterResponse createCounterResponse(Counter counter) {
        CounterResponse response = new CounterResponse();
        response.setId(counter.getId());
        response.setSource(counter.getSource().toString());
        response.setName(counter.getName());
        response.setValue(counter.getValue());
        response.setZoneId(counter.getZoneId());
        response.setObjectName("counter");
        return response;
    }
File
ApiResponseHelper.java
Developer's decision
Manual
Kind of conflict
Annotation
If statement
Method invocation
Method signature
Return statement
Variable
Chunk
Conflicting content
import com.cloud.network.rules.StickinessPolicy;
import com.cloud.offering.NetworkOffering;
import com.cloud.projects.Project.ListProjectResourcesCriteria;
<<<<<<< HEAD
import com.cloud.server.ResourceTag.TaggedResourceType;
import com.cloud.tags.ResourceTagVO;
import com.cloud.tags.dao.ResourceTagDao;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
import com.cloud.template.TemplateManager;
import com.cloud.user.Account;
import com.cloud.user.AccountManager;
Solution content
import com.cloud.network.rules.StickinessPolicy;
import com.cloud.network.vpc.VpcVO;
import com.cloud.offering.NetworkOffering;
import com.cloud.projects.Project.ListProjectResourcesCriteria;
import com.cloud.server.ResourceTag.TaggedResourceType;
import com.cloud.tags.ResourceTagVO;
import com.cloud.tags.dao.ResourceTagDao;
import com.cloud.template.TemplateManager;
import com.cloud.user.Account;
import com.cloud.user.AccountManager;
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Concatenation
Kind of conflict
Import
Chunk
Conflicting content
    @Inject 
    NetworkServiceMapDao _ntwkSrvcDao;
    @Inject
<<<<<<< HEAD
    ResourceTagDao _resourceTagDao;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    CounterDao _counterDao;
    @Inject
    ConditionDao _conditionDao;
Solution content
    @Inject 
    NetworkServiceMapDao _ntwkSrvcDao;
    @Inject
    ResourceTagDao _resourceTagDao;
    CounterDao _counterDao;
    @Inject
    ConditionDao _conditionDao;
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
            s_logger.warn("Unable to remove firewall rule id=" + lb.getId() + " as it has related firewall rule id=" + relatedRule.getId() + "; leaving it in Revoke state");
            success = false;
        } else {
<<<<<<< HEAD
            _firewallMgr.removeRule(lb);
=======
            _firewallDao.remove(lb.getId());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        }

        _elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
Solution content
            s_logger.warn("Unable to remove firewall rule id=" + lb.getId() + " as it has related firewall rule id=" + relatedRule.getId() + "; leaving it in Revoke state");
            success = false;
        } else {
            _firewallMgr.removeRule(lb);
        }

        _elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
        }

        LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb, lbOwner, lb.getNetworkId());
<<<<<<< HEAD
        boolean performedIpAssoc = false;
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        if (result == null) {
            IpAddress ip = null;
            Network guestNetwork = _networkMgr.getNetwork(lb.getNetworkId());
Solution content
        }

        LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb, lbOwner, lb.getNetworkId());
        boolean performedIpAssoc = false;
        if (result == null) {
            IpAddress ip = null;
            Network guestNetwork = _networkMgr.getNetwork(lb.getNetworkId());
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
            try {
                if (ipAddressVO != null) {
                    if (ipAddressVO.getAssociatedWithNetworkId() == null) {
<<<<<<< HEAD
                        //set networkId just for verification purposes
                        ipAddressVO.setAssociatedWithNetworkId(lb.getNetworkId());
                        _networkMgr.checkIpForService(ipAddressVO, Service.Lb);
                        
                        s_logger.debug("The ip is not associated with the network id=" + lb.getNetworkId() + " so assigning");
                        ipAddressVO = _networkMgr.associateIPToGuestNetwork(ipAddrId, lb.getNetworkId());
                        performedIpAssoc = true;
                    } else {                    
                        _networkMgr.checkIpForService(ipAddressVO, Service.Lb);
                    }
=======
                        s_logger.debug("The ip is not associated with the network id=" + lb.getNetworkId() + " so assigning");
                        ipAddressVO = _networkMgr.associateIPToGuestNetwork(ipAddrId, lb.getNetworkId());
                    }
                    _networkMgr.checkIpForService(ipAddressVO, Service.Lb);
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                }

                if (lb.getSourceIpAddressId() == null) {
Solution content
            try {
                if (ipAddressVO != null) {
                    if (ipAddressVO.getAssociatedWithNetworkId() == null) {
                        //set networkId just for verification purposes
                        ipAddressVO.setAssociatedWithNetworkId(lb.getNetworkId());
                        _networkMgr.checkIpForService(ipAddressVO, Service.Lb);
                        
                        s_logger.debug("The ip is not associated with the network id="+ lb.getNetworkId() + " so assigning");
                        ipAddressVO = _networkMgr.associateIPToGuestNetwork(ipAddrId, lb.getNetworkId());
                        performedIpAssoc = true;
                    } else {                    
                        _networkMgr.checkIpForService(ipAddressVO, Service.Lb);
                    }
                }   
               
                if (lb.getSourceIpAddressId() == null) {
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
                    s_logger.debug("Releasing system IP address " + ip + " as corresponding lb rule failed to create");
                    _networkMgr.handleSystemIpRelease(ip);
                }
<<<<<<< HEAD
                // release ip address if ipassoc was perfored
                if (performedIpAssoc) {
                    //if the rule is the last one for the ip address assigned to VPC, unassign it from the network
                    ip = _ipAddressDao.findById(ip.getId());
                    if (ip != null && ip.getVpcId() != null && _firewallDao.listByIp(ip.getId()).isEmpty()) {
                        s_logger.debug("Releasing VPC ip address " + ip + " as LB rule failed to create");
                        _networkMgr.unassignIPFromVpcNetwork(ip.getId());
            }
        }
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            }
        }
Solution content
                    s_logger.debug("Releasing system IP address " + ip + " as corresponding lb rule failed to create");
                    _networkMgr.handleSystemIpRelease(ip);
                }
                // release ip address if ipassoc was perfored
                if (performedIpAssoc) {
                    //if the rule is the last one for the ip address assigned to VPC, unassign it from the network
                    ip = _ipAddressDao.findById(ip.getId());
                    if (ip != null && ip.getVpcId() != null && _firewallDao.listByIp(ip.getId()).isEmpty()) {
                        s_logger.debug("Releasing VPC ip address " + ip + " as LB rule failed to create");
                        _networkMgr.unassignIPFromVpcNetwork(ip.getId());
            }
        }
            }
        }
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Chunk
Conflicting content
        long sourceIpId = lb.getSourceIpAddressId();

        IPAddressVO ipAddr = _ipAddressDao.findById(sourceIpId);
<<<<<<< HEAD
=======
        Long networkId = ipAddr.getSourceNetworkId();
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        // make sure ip address exists
        if (ipAddr == null || !ipAddr.readyToUse()) {
            InvalidParameterValueException ex = new InvalidParameterValueException("Unable to create load balancer rule, invalid IP address id specified");
Solution content
        long sourceIpId = lb.getSourceIpAddressId();

        IPAddressVO ipAddr = _ipAddressDao.findById(sourceIpId);
        // make sure ip address exists
        if (ipAddr == null || !ipAddr.readyToUse()) {
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        _firewallMgr.validateFirewallRule(caller.getCaller(), ipAddr, srcPortStart, srcPortEnd, lb.getProtocol(), 
                Purpose.LoadBalancing, FirewallRuleType.User);

<<<<<<< HEAD
        Long networkId = ipAddr.getAssociatedWithNetworkId();
=======
        networkId = ipAddr.getAssociatedWithNetworkId();
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        if (networkId == null) {
            InvalidParameterValueException ex = new InvalidParameterValueException("Unable to create load balancer rule ; specified sourceip id is not associated with any network");
            ex.addProxyObject(ipAddr, sourceIpId, "sourceIpId");
Solution content
        _firewallMgr.validateFirewallRule(caller.getCaller(), ipAddr, srcPortStart, srcPortEnd, lb.getProtocol(), 
                Purpose.LoadBalancing, FirewallRuleType.User);

        Long networkId = ipAddr.getAssociatedWithNetworkId();
        if (networkId == null) {
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
                txn.start();
                _firewallMgr.revokeRelatedFirewallRule(newRule.getId(), false);
<<<<<<< HEAD
                removeLBRule(newRule);
=======
                _lbDao.remove(newRule.getId());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9

                txn.commit();
            }
Solution content
                txn.start();
                _firewallMgr.revokeRelatedFirewallRule(newRule.getId(), false);
                removeLBRule(newRule);

                txn.commit();
            }
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
                boolean checkForReleaseElasticIp = false;
                txn.start();
                if (lb.getState() == FirewallRule.State.Revoke) {
<<<<<<< HEAD
                    removeLBRule(lb);
=======
                    _lbDao.remove(lb.getId());
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
                    s_logger.debug("LB " + lb.getId() + " is successfully removed");
                    checkForReleaseElasticIp = true;
                } else if (lb.getState() == FirewallRule.State.Add) {
Solution content
                boolean checkForReleaseElasticIp = false;
                txn.start();
                if (lb.getState() == FirewallRule.State.Revoke) {
                    removeLBRule(lb);
                    s_logger.debug("LB " + lb.getId() + " is successfully removed");
                    checkForReleaseElasticIp = true;
                } else if (lb.getState() == FirewallRule.State.Add) {
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
        String name = cmd.getLoadBalancerRuleName();
        String keyword = cmd.getKeyword();
        Long instanceId = cmd.getVirtualMachineId();
<<<<<<< HEAD
        Map tags = cmd.getTags();
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9

        Account caller = UserContext.current().getCaller();
        List permittedAccounts = new ArrayList();
Solution content
        String name = cmd.getLoadBalancerRuleName();
        String keyword = cmd.getKeyword();
        Long instanceId = cmd.getVirtualMachineId();
        Map tags = cmd.getTags();

        Account caller = UserContext.current().getCaller();
        List permittedAccounts = new ArrayList();
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            sb.join("ipSearch", ipSearch, sb.entity().getSourceIpAddressId(), ipSearch.entity().getId(), JoinBuilder.JoinType.INNER);
        }

<<<<<<< HEAD
        if (tags != null && !tags.isEmpty()) {
            SearchBuilder tagSearch = _resourceTagDao.createSearchBuilder();
            for (int count=0; count < tags.size(); count++) {
                tagSearch.or().op("key" + String.valueOf(count), tagSearch.entity().getKey(), SearchCriteria.Op.EQ);
                tagSearch.and("value" + String.valueOf(count), tagSearch.entity().getValue(), SearchCriteria.Op.EQ);
                tagSearch.cp();
            }
            tagSearch.and("resourceType", tagSearch.entity().getResourceType(), SearchCriteria.Op.EQ);
            sb.groupBy(sb.entity().getId());
            sb.join("tagSearch", tagSearch, sb.entity().getId(), tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER);
        }

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        SearchCriteria sc = sb.create();
        _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
Solution content
            sb.join("ipSearch", ipSearch, sb.entity().getSourceIpAddressId(), ipSearch.entity().getId(), JoinBuilder.JoinType.INNER);
        }

        if (tags != null && !tags.isEmpty()) {
            SearchBuilder tagSearch = _resourceTagDao.createSearchBuilder();
            for (int count=0; count < tags.size(); count++) {
                tagSearch.or().op("key" + String.valueOf(count), tagSearch.entity().getKey(), SearchCriteria.Op.EQ);
                tagSearch.and("value" + String.valueOf(count), tagSearch.entity().getValue(), SearchCriteria.Op.EQ);
                tagSearch.cp();
            }
            tagSearch.and("resourceType", tagSearch.entity().getResourceType(), SearchCriteria.Op.EQ);
            sb.groupBy(sb.entity().getId());
            sb.join("tagSearch", tagSearch, sb.entity().getId(), tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER);
        }

        SearchCriteria sc = sb.create();
        _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            for (String key : tags.keySet()) {
            sc.setJoinParameters("ipSearch", "zoneId", zoneId);
        }

<<<<<<< HEAD

        if (tags != null && !tags.isEmpty()) {
            int count = 0;
            sc.setJoinParameters("tagSearch", "resourceType", TaggedResourceType.LoadBalancer.toString());
                sc.setJoinParameters("tagSearch", "key" + String.valueOf(count), key);
                sc.setJoinParameters("tagSearch", "value" + String.valueOf(count), tags.get(key));
                count++;
            }
        }

=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
        return _lbDao.search(sc, searchFilter);
    }
Solution content
            sc.setJoinParameters("ipSearch", "zoneId", zoneId);
        }


        if (tags != null && !tags.isEmpty()) {
            int count = 0;
            sc.setJoinParameters("tagSearch", "resourceType", TaggedResourceType.LoadBalancer.toString());
            for (String key : tags.keySet()) {
                sc.setJoinParameters("tagSearch", "key" + String.valueOf(count), key);
                sc.setJoinParameters("tagSearch", "value" + String.valueOf(count), tags.get(key));
                count++;
            }
        }

        return _lbDao.search(sc, searchFilter);
    }
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        return _lbDao.findById(lbId);
    }
    
<<<<<<< HEAD
    @DB
    protected void removeLBRule(LoadBalancerVO rule) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        _lbDao.remove(rule.getId());
        //if the rule is the last one for the ip address assigned to VPC, unassign it from the network
        IpAddress ip = _ipAddressDao.findById(rule.getSourceIpAddressId());
        if (ip != null && ip.getVpcId() != null && _firewallDao.listByIp(ip.getId()).isEmpty()) {
            _networkMgr.unassignIPFromVpcNetwork(ip.getId());
        }
        
        txn.commit();
    }
=======
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
    private  VO getEntityInDatabase(String paramName, Long id, GenericDao dao)
    {
        VO vo = dao.findById(id);
Solution content
        return _lbDao.findById(lbId);
    }

    @DB
    protected void removeLBRule(LoadBalancerVO rule) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        _lbDao.remove(rule.getId());
        //if the rule is the last one for the ip address assigned to VPC, unassign it from the network
        IpAddress ip = _ipAddressDao.findById(rule.getSourceIpAddressId());
        if (ip != null && ip.getVpcId() != null && _firewallDao.listByIp(ip.getId()).isEmpty()) {
            _networkMgr.unassignIPFromVpcNetwork(ip.getId());
        }
        
        txn.commit();
    }
    private  VO getEntityInDatabase(String paramName, Long id, GenericDao dao)
    {
    	
        VO vo = dao.findById(id);
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Concatenation
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
            Condition condition = getEntityInDatabase("conditionid" , conditionId, _conditionDao);
            if(counterIds.contains(condition.getCounterid())) {
                throw new InvalidParameterValueException("atleast two conditions in the conditionids have the same counter. It is not right to apply two different conditions for the same counter");
<<<<<<< HEAD
            }
=======
        }
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            counterIds.add(condition.getCounterid());
        }
Solution content
            if(counterIds.contains(condition.getCounterid())) {
                throw new InvalidParameterValueException("atleast two conditions in the conditionids have the same counter. It is not right to apply two different conditions for the same counter");
            }
            counterIds.add(condition.getCounterid());
        }
        
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Manual
Kind of conflict
Other
Chunk
Conflicting content
        _accountMgr.checkAccess(UserContext.current().getCaller(), null, true, condition);

        // TODO - Verify if it is used in any auto-scale profile
<<<<<<< HEAD
        AutoScalePolicyConditionMapVO policyCondition;
        policyCondition = _autoScalePolicyConditionMapDao.findById(conditionId);
        if (policyCondition != null) {
            s_logger.info("Cannot delete condition " + conditionId + " as it is being used in a condition.");
=======
        List autoScalePolicyConditionMapVOs = _autoScalePolicyConditionMapDao.listByAll(null, conditionId);
        if (autoScalePolicyConditionMapVOs.size() > 0) {
            s_logger.info("Cannot delete condition " + conditionId + " as it is being used in a policy.");
>>>>>>> 26aaa1543521937ca637da214f6ec8f990094da9
            throw new ResourceInUseException("Condition with Id " + conditionId + " is in use.");
        }
        s_logger.debug("Deleting Condition " + condition.getId());
Solution content
        // Verify if condition is used in any autoscale policy
        if (_autoScalePolicyConditionMapDao.isConditionInUse(conditionId)) {
            s_logger.info("Cannot delete condition " + conditionId + " as it is being used in a condition.");
            throw new ResourceInUseException("Cannot delete Condition when it is in use by one or more AutoScale Policies.");
        }
        s_logger.debug("Deleting Condition " + condition.getId());
File
LoadBalancingRulesManagerImpl.java
Developer's decision
Manual
Kind of conflict
If statement
Method invocation
Variable