Github user ProjectMoon commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1360#discussion_r58852087 --- Diff: services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java --- @@ -521,6 +522,76 @@ public SecondaryStorageVmVO startNew(long dataCenterId, SecondaryStorageVm.Role return null; } + /** + * Get the default network for the secondary storage VM, based on the zone it is in. Delegates to + * either {@link #getDefaultNetworkForZone(DataCenter)} or {@link #getDefaultNetworkForAdvancedSGZone(DataCenter)}, + * depending on the zone network type and whether or not security groups are enabled in the zone. + * @param dc - The zone (DataCenter) of the secondary storage VM. + * @return The default network for use with the secondary storage VM. + */ + protected NetworkVO getDefaultNetworkForCreation(DataCenter dc) { --- End diff -- Keeping the methods separate is actually very much on purpose. This increases the ability to extend and change core classes as needed. CS has a lot of code that is not very modular (1,000+ long line methods etc), and this change is for an increase in modularity. There is maybe some argument to be made for reducing code duplication though. The methods could be joined together in a secondary class used by both ConsoleProxyManagerImpl and SecondaryStorageManagerImpl. Some kind of SystemVmNetworkManager or something?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---