cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10375) Do not create DefaultNuageVspSharedNetworkOfferingWithSGService
Date Wed, 23 May 2018 14:16:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487324#comment-16487324
] 

ASF GitHub Bot commented on CLOUDSTACK-10375:
---------------------------------------------

DaanHoogland closed pull request #2667: CLOUDSTACK-10375: Don't create DefaultNuageVspSharedNetworkOfferingWithSGService
URL: https://github.com/apache/cloudstack/pull/2667
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManager.java
b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManager.java
index 803063060f7..1fe9b40170f 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManager.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManager.java
@@ -46,8 +46,6 @@
 
 public interface NuageVspManager extends PluggableService {
 
-    String nuageVspSharedNetworkOfferingWithSGServiceName = "DefaultNuageVspSharedNetworkOfferingWithSGService";
-
     String nuageVPCOfferingName = "Nuage VSP VPC Offering";
 
     String nuageVPCOfferingDisplayText = "Nuage VSP VPC Offering";
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
index 0a3a966cb78..d5f9acba702 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
@@ -19,14 +19,27 @@
 
 package com.cloud.network.manager;
 
-import com.google.common.base.MoreObjects;
-import com.google.common.base.Strings;
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
+import static com.cloud.agent.api.sync.SyncNuageVspCmsIdCommand.SyncType;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nonnull;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
 import net.nuage.vsp.acs.client.api.NuageVspPluginClientLoader;
 import net.nuage.vsp.acs.client.api.model.VspApiDefaults;
 import net.nuage.vsp.acs.client.api.model.VspDomain;
@@ -37,6 +50,20 @@
 import net.nuage.vsp.acs.client.common.NuageVspConstants;
 import net.nuage.vsp.acs.client.common.model.Pair;
 import net.nuage.vsp.acs.client.exception.NuageVspException;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.log4j.Logger;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Strings;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableMultimap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Multimap;
+
 import org.apache.cloudstack.api.ResponseGenerator;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.framework.config.ConfigKey;
@@ -47,28 +74,6 @@
 import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
 import org.apache.cloudstack.resourcedetail.VpcDetailVO;
 import org.apache.cloudstack.resourcedetail.dao.VpcDetailsDao;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Logger;
-
-import javax.annotation.Nonnull;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.stream.Collectors;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.Listener;
@@ -142,9 +147,6 @@
 import com.cloud.network.vpc.dao.VpcDao;
 import com.cloud.network.vpc.dao.VpcOfferingDao;
 import com.cloud.network.vpc.dao.VpcOfferingServiceMapDao;
-import com.cloud.offering.NetworkOffering;
-import com.cloud.offerings.NetworkOfferingServiceMapVO;
-import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.offerings.dao.NetworkOfferingDao;
 import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.resource.ResourceManager;
@@ -167,8 +169,6 @@
 import com.cloud.vm.dao.NicDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
-import static com.cloud.agent.api.sync.SyncNuageVspCmsIdCommand.SyncType;
-
 public class NuageVspManagerImpl extends ManagerBase implements NuageVspManager, Configurable,
StateListener<Status, Status.Event, Host> {
 
     private static final Logger s_logger = Logger.getLogger(NuageVspManagerImpl.class);
@@ -1219,7 +1219,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<Status,
Status.
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException
{
         initMessageBusListeners();
         initNuageVspResourceListeners();
-        initNuageNetworkOffering();
         initNuageVspVpcOffering();
         Status.getStateMachine().registerListener(this);
         return true;
@@ -1290,39 +1289,6 @@ private void initNuageVspResourceListeners() {
         _agentMgr.registerForHostEvents(new NuageVspResourceListener(), false, true, false);
     }
 
-    @DB
-    private void initNuageNetworkOffering() {
-        Transaction.execute(new TransactionCallbackNoReturn() {
-            @Override
-            public void doInTransactionWithoutResult(TransactionStatus status) {
-                NetworkOffering sharedNetworkOfferingWithSG = _networkOfferingDao.findByUniqueName(nuageVspSharedNetworkOfferingWithSGServiceName);
-                if (sharedNetworkOfferingWithSG == null) {
-                    NetworkOfferingVO defaultNuageVspSharedSGNetworkOffering =
-                            new NetworkOfferingVO(nuageVspSharedNetworkOfferingWithSGServiceName,
"Offering for NuageVsp Shared Security group enabled networks",
-                                    Networks.TrafficType.Guest, false, false, null, null,
true, NetworkOffering.Availability.Optional, null, Network.GuestType.Shared, true, true, false,
false, false,
-                                    false);
-
-                    defaultNuageVspSharedSGNetworkOffering.setState(NetworkOffering.State.Enabled);
-                    defaultNuageVspSharedSGNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultNuageVspSharedSGNetworkOffering);
-
-                    Map<Network.Service, Network.Provider> defaultNuageVspSharedSGNetworkOfferingProviders
= new HashMap<Network.Service, Network.Provider>();
-                    defaultNuageVspSharedSGNetworkOfferingProviders.put(Network.Service.Dhcp,
Network.Provider.NuageVsp);
-                    defaultNuageVspSharedSGNetworkOfferingProviders.put(Network.Service.SecurityGroup,
Network.Provider.NuageVsp);
-                    defaultNuageVspSharedSGNetworkOfferingProviders.put(Network.Service.Connectivity,
Network.Provider.NuageVsp);
-
-                    for (Network.Service service : defaultNuageVspSharedSGNetworkOfferingProviders.keySet())
{
-                        NetworkOfferingServiceMapVO offService =
-                                new NetworkOfferingServiceMapVO(defaultNuageVspSharedSGNetworkOffering.getId(),
service, defaultNuageVspSharedSGNetworkOfferingProviders.get(service));
-                        _networkOfferingServiceMapDao.persist(offService);
-                        if (s_logger.isTraceEnabled()) {
-                            s_logger.trace("Added service for the NuageVsp network offering:
" + offService);
-                        }
-                    }
-                }
-            }
-        });
-    }
-
     private Long getNuageVspHostId(long physicalNetworkId) {
         List<NuageVspDeviceVO> nuageVspDevices = _nuageVspDao.listByPhysicalNetwork(physicalNetworkId);
         if (nuageVspDevices != null && (!nuageVspDevices.isEmpty())) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Do not create DefaultNuageVspSharedNetworkOfferingWithSGService
> ---------------------------------------------------------------
>
>                 Key: CLOUDSTACK-10375
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10375
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.11.0.0
>         Environment: ACS 4.11 + Nuage
>            Reporter: Raf Smeets
>            Assignee: Frank Maximus
>            Priority: Minor
>
> NuageVsp plugin is creating a network offering called DefaultNuageVspSharedNetworkOfferingWithSGService.
> This offering is unsupported, so do not create it anymore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message