Program: 105630
Project: 105630
Buggy source:
@DB protected void createDefaultNetworkOfferings(){
  NetworkOfferingVO publicNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemPublicNetwork,TrafficType.Public,true);
  publicNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(publicNetworkOffering);
  NetworkOfferingVO managementNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemManagementNetwork,TrafficType.Management,false);
  managementNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(managementNetworkOffering);
  NetworkOfferingVO controlNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemControlNetwork,TrafficType.Control,false);
  controlNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(controlNetworkOffering);
  NetworkOfferingVO storageNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemStorageNetwork,TrafficType.Storage,true);
  storageNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(storageNetworkOffering);
  NetworkOfferingVO privateGatewayNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemPrivateGatewayNetworkOffering,GuestType.Isolated);
  privateGatewayNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(privateGatewayNetworkOffering);
  final Map<Network.Service,Network.Provider> defaultSharedNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultSharedNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultSharedNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultSharedNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  final Map<Network.Service,Network.Provider> defaultIsolatedNetworkOfferingProviders=defaultSharedNetworkOfferingProviders;
  final Map<Network.Service,Network.Provider> defaultSharedSGNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultSharedSGNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.SecurityGroup,Provider.SecurityGroupProvider);
  final Map<Network.Service,Network.Provider> defaultIsolatedSourceNatEnabledNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Firewall,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Gateway,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Lb,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.SourceNat,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.StaticNat,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.PortForwarding,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Vpn,Provider.VirtualRouter);
  final Map<Network.Service,Network.Provider> netscalerServiceProviders=new HashMap<Network.Service,Network.Provider>();
  netscalerServiceProviders.put(Service.Dhcp,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.Dns,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.UserData,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.SecurityGroup,Provider.SecurityGroupProvider);
  netscalerServiceProviders.put(Service.StaticNat,Provider.Netscaler);
  netscalerServiceProviders.put(Service.Lb,Provider.Netscaler);
  Transaction.execute(new TransactionCallbackNoReturn(){
    @Override public void doInTransactionWithoutResult(    TransactionStatus status){
      NetworkOfferingVO defaultSharedSGNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOfferingWithSGService,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,true,false,false,false);
      defaultSharedSGNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultSharedSGNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultSharedSGNetworkOffering);
      for (      Service service : defaultSharedSGNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultSharedSGNetworkOffering.getId(),service,defaultSharedSGNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultSharedNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,true,false,false,false);
      defaultSharedNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultSharedNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultSharedNetworkOffering);
      for (      Service service : defaultSharedNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultSharedNetworkOffering.getId(),service,defaultSharedNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultIsolatedSourceNatEnabledNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Required,null,Network.GuestType.Isolated,true,false,false,false,true);
      defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultIsolatedSourceNatEnabledNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedSourceNatEnabledNetworkOffering);
      for (      Service service : defaultIsolatedSourceNatEnabledNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultIsolatedSourceNatEnabledNetworkOffering.getId(),service,defaultIsolatedSourceNatEnabledNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultIsolatedEnabledNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,true,true,false,false,false);
      defaultIsolatedEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultIsolatedEnabledNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedEnabledNetworkOffering);
      for (      Service service : defaultIsolatedNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultIsolatedEnabledNetworkOffering.getId(),service,defaultIsolatedNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetscalerNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedEIPandELBNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,false,false,false,true,true,true,false,false,true,true,false,false,false);
      defaultNetscalerNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultNetscalerNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetscalerNetworkOffering);
      for (      Service service : netscalerServiceProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetscalerNetworkOffering.getId(),service,netscalerServiceProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetworkOfferingForVpcNetworks=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,false,true);
      defaultNetworkOfferingForVpcNetworks.setState(NetworkOffering.State.Enabled);
      defaultNetworkOfferingForVpcNetworks=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworks);
      Map<Network.Service,Network.Provider> defaultVpcNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
      defaultVpcNetworkOfferingProviders.put(Service.Dhcp,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Dns,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.UserData,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Gateway,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Lb,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.SourceNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.StaticNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.PortForwarding,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Vpn,Provider.VPCVirtualRouter);
      for (      Service service : defaultVpcNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworks.getId(),service,defaultVpcNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetworkOfferingForVpcNetworksNoLB=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksNoLB,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,false,false);
      defaultNetworkOfferingForVpcNetworksNoLB.setState(NetworkOffering.State.Enabled);
      defaultNetworkOfferingForVpcNetworksNoLB=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworksNoLB);
      Map<Network.Service,Network.Provider> defaultVpcNetworkOfferingProvidersNoLB=new HashMap<Network.Service,Network.Provider>();
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Dhcp,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Dns,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.UserData,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Gateway,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.SourceNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.StaticNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.PortForwarding,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Vpn,Provider.VPCVirtualRouter);
      for (      Map.Entry<Service,Provider> entry : defaultVpcNetworkOfferingProvidersNoLB.entrySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworksNoLB.getId(),entry.getKey(),entry.getValue());
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO internalLbOff=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,true,false);
      internalLbOff.setState(NetworkOffering.State.Enabled);
      internalLbOff=_networkOfferingDao.persistDefaultNetworkOffering(internalLbOff);
      Map<Network.Service,Network.Provider> internalLbOffProviders=new HashMap<Network.Service,Network.Provider>();
      internalLbOffProviders.put(Service.Dhcp,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Dns,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.UserData,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Gateway,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Lb,Provider.InternalLbVm);
      internalLbOffProviders.put(Service.SourceNat,Provider.VPCVirtualRouter);
      for (      Service service : internalLbOffProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(internalLbOff.getId(),service,internalLbOffProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
    }
  }
);
}

Fixed version (ground truth):
@DB protected void createDefaultNetworkOfferings(){
  NetworkOfferingVO publicNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemPublicNetwork,TrafficType.Public,true);
  publicNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(publicNetworkOffering);
  NetworkOfferingVO managementNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemManagementNetwork,TrafficType.Management,false);
  managementNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(managementNetworkOffering);
  NetworkOfferingVO controlNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemControlNetwork,TrafficType.Control,false);
  controlNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(controlNetworkOffering);
  NetworkOfferingVO storageNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemStorageNetwork,TrafficType.Storage,true);
  storageNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(storageNetworkOffering);
  NetworkOfferingVO privateGatewayNetworkOffering=new NetworkOfferingVO(NetworkOffering.SystemPrivateGatewayNetworkOffering,GuestType.Isolated);
  privateGatewayNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(privateGatewayNetworkOffering);
  final Map<Network.Service,Network.Provider> defaultSharedNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultSharedNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultSharedNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultSharedNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  final Map<Network.Service,Network.Provider> defaultIsolatedNetworkOfferingProviders=defaultSharedNetworkOfferingProviders;
  final Map<Network.Service,Network.Provider> defaultSharedSGNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultSharedSGNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  defaultSharedSGNetworkOfferingProviders.put(Service.SecurityGroup,Provider.SecurityGroupProvider);
  final Map<Network.Service,Network.Provider> defaultIsolatedSourceNatEnabledNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dhcp,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dns,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.UserData,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Firewall,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Gateway,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Lb,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.SourceNat,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.StaticNat,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.PortForwarding,Provider.VirtualRouter);
  defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Vpn,Provider.VirtualRouter);
  final Map<Network.Service,Network.Provider> netscalerServiceProviders=new HashMap<Network.Service,Network.Provider>();
  netscalerServiceProviders.put(Service.Dhcp,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.Dns,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.UserData,Provider.VirtualRouter);
  netscalerServiceProviders.put(Service.SecurityGroup,Provider.SecurityGroupProvider);
  netscalerServiceProviders.put(Service.StaticNat,Provider.Netscaler);
  netscalerServiceProviders.put(Service.Lb,Provider.Netscaler);
  Transaction.execute(new TransactionCallbackNoReturn(){
    @Override public void doInTransactionWithoutResult(    TransactionStatus status){
      NetworkOfferingVO defaultSharedSGNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOfferingWithSGService,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,true,false,false,false);
      defaultSharedSGNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultSharedSGNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultSharedSGNetworkOffering);
      for (      Service service : defaultSharedSGNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultSharedSGNetworkOffering.getId(),service,defaultSharedSGNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultSharedNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,true,false,false,false);
      defaultSharedNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultSharedNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultSharedNetworkOffering);
      for (      Service service : defaultSharedNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultSharedNetworkOffering.getId(),service,defaultSharedNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultIsolatedSourceNatEnabledNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Required,null,Network.GuestType.Isolated,true,false,false,false,true);
      defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultIsolatedSourceNatEnabledNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedSourceNatEnabledNetworkOffering);
      for (      Service service : defaultIsolatedSourceNatEnabledNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultIsolatedSourceNatEnabledNetworkOffering.getId(),service,defaultIsolatedSourceNatEnabledNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultIsolatedEnabledNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,true,true,false,false,false);
      defaultIsolatedEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultIsolatedEnabledNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedEnabledNetworkOffering);
      for (      Service service : defaultIsolatedNetworkOfferingProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultIsolatedEnabledNetworkOffering.getId(),service,defaultIsolatedNetworkOfferingProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetscalerNetworkOffering=new NetworkOfferingVO(NetworkOffering.DefaultSharedEIPandELBNetworkOffering,"String_Node_Str",TrafficType.Guest,false,true,null,null,true,Availability.Optional,null,Network.GuestType.Shared,true,false,false,false,true,true,true,false,false,true,true,false,false,false);
      defaultNetscalerNetworkOffering.setState(NetworkOffering.State.Enabled);
      defaultNetscalerNetworkOffering=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetscalerNetworkOffering);
      for (      Service service : netscalerServiceProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetscalerNetworkOffering.getId(),service,netscalerServiceProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetworkOfferingForVpcNetworks=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,false,true);
      defaultNetworkOfferingForVpcNetworks.setState(NetworkOffering.State.Enabled);
      defaultNetworkOfferingForVpcNetworks=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworks);
      Map<Network.Service,Network.Provider> defaultVpcNetworkOfferingProviders=new HashMap<Network.Service,Network.Provider>();
      defaultVpcNetworkOfferingProviders.put(Service.Dhcp,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Dns,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.UserData,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Gateway,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Lb,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.SourceNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.StaticNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.PortForwarding,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProviders.put(Service.Vpn,Provider.VPCVirtualRouter);
      for (      Map.Entry<Service,Provider> entry : defaultVpcNetworkOfferingProviders.entrySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworks.getId(),entry.getKey(),entry.getValue());
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO defaultNetworkOfferingForVpcNetworksNoLB=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksNoLB,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,false,false);
      defaultNetworkOfferingForVpcNetworksNoLB.setState(NetworkOffering.State.Enabled);
      defaultNetworkOfferingForVpcNetworksNoLB=_networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworksNoLB);
      Map<Network.Service,Network.Provider> defaultVpcNetworkOfferingProvidersNoLB=new HashMap<Network.Service,Network.Provider>();
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Dhcp,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Dns,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.UserData,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Gateway,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.SourceNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.StaticNat,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.PortForwarding,Provider.VPCVirtualRouter);
      defaultVpcNetworkOfferingProvidersNoLB.put(Service.Vpn,Provider.VPCVirtualRouter);
      for (      Map.Entry<Service,Provider> entry : defaultVpcNetworkOfferingProvidersNoLB.entrySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworksNoLB.getId(),entry.getKey(),entry.getValue());
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
      NetworkOfferingVO internalLbOff=new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB,"String_Node_Str",TrafficType.Guest,false,false,null,null,true,Availability.Optional,null,Network.GuestType.Isolated,false,false,false,true,false);
      internalLbOff.setState(NetworkOffering.State.Enabled);
      internalLbOff=_networkOfferingDao.persistDefaultNetworkOffering(internalLbOff);
      Map<Network.Service,Network.Provider> internalLbOffProviders=new HashMap<Network.Service,Network.Provider>();
      internalLbOffProviders.put(Service.Dhcp,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Dns,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.UserData,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.NetworkACL,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Gateway,Provider.VPCVirtualRouter);
      internalLbOffProviders.put(Service.Lb,Provider.InternalLbVm);
      internalLbOffProviders.put(Service.SourceNat,Provider.VPCVirtualRouter);
      for (      Service service : internalLbOffProviders.keySet()) {
        NetworkOfferingServiceMapVO offService=new NetworkOfferingServiceMapVO(internalLbOff.getId(),service,internalLbOffProviders.get(service));
        _ntwkOfferingServiceMapDao.persist(offService);
        s_logger.trace("String_Node_Str" + offService);
      }
    }
  }
);
}