Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3683418E7D for ; Wed, 28 Oct 2015 11:52:28 +0000 (UTC) Received: (qmail 3729 invoked by uid 500); 28 Oct 2015 11:52:27 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 3603 invoked by uid 500); 28 Oct 2015 11:52:27 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 3512 invoked by uid 500); 28 Oct 2015 11:52:27 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 3505 invoked by uid 99); 28 Oct 2015 11:52:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2015 11:52:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AE4A72C1F57 for ; Wed, 28 Oct 2015 11:52:27 +0000 (UTC) Date: Wed, 28 Oct 2015 11:52:27 +0000 (UTC) From: "Jeffrey Hair (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-9003) Make VM naming services injectable and in their own module MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeffrey Hair updated CLOUDSTACK-9003: ------------------------------------- Description: Proposal: Make the various classes/code that give VMs and other resources hostnames, hypervisor guest names, and UUIDs into their classes as injectable dependencies in their own module under the core module. This proposal originally only concerned the VirtualMachineName class and can be broken down into several parts: * Make the VirtualMachineName class an injectable dependency instead of being full of static methods. * Refactor the generateHostName method in UserVmManagerImpl to be backed by an injectable service which generates host names. * Move the UUIDManagerImpl from the core module to a new module (grouped with the other 2 ideally). Rationale: * VirtualMachineName is one of the few remaining classes that has static methods tangled like spaghetti throughout the code. This change will put it in line with the rest of the management server codebase and opens the door to extensibility. Which brings us to... * Extensibility: The ultimate goal of this feature is to provide 3rd party developers the option of changing default instance/resource naming policies. Currently this is possible in a very limited fashion with the instance.name global setting, but this proposal makes it much more extensible. By moving the naming-related services (VirtualMachineName, UUIDManager, and more as added/discovered) to their own module, the module can be excluded by module.properties and different ones substituted in. Alternatively, it could use the adapter model that other classes use, and the user can configure which adapters are active and also provide custom ones. A good use case for this functionality is using a different style naming to emulate other cloud providers such as AWS (i-abc123) or GCE. was: Proposal: Make the various classes/code that give VMs and other resources hostnames, hypervisor guest names, and UUIDs into their classes as injectable dependencies in their own module under the core module. This proposal originally only concerned the VirtualMachineName class and can be broken down into several parts: * Make the VirtualMachineName class an injectable dependency instead of being full of static methods. * Refactor the generateHostName method in UserVmManagerImpl to be backed by an injectable service which generates host names. * Move the UUIDManagerImpl from the core module to a new module (grouped with the other 2 ideally). Rationale: * VirtualMachineName is one of the few remaining classes that has static methods tangled like spaghetti throughout the code. This change will put it in line with the rest of the management server codebase and opens the door to extensibility. Which brings us to... * Extensibility: The ultimate goal of this feature is to provide 3rd party developers the option of changing default instance/resource naming policies. Currently this is possible in a very limited fashion with the instance.name global setting, but this proposal makes it much more extensible. By the naming-related services (VirtualMachineName, UUIDManager, and more as added/discovered) to their own module, the module can be excluded by module.properties and different ones substituted in. Alternatively, it could use the adapter model that other classes use, and the user can configure which adapters are active and also provide custom ones. A good use case for this functionality is using a different style naming to emulate other cloud providers such as AWS (i-abc123) or GCE. > Make VM naming services injectable and in their own module > ---------------------------------------------------------- > > Key: CLOUDSTACK-9003 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9003 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the default.) > Reporter: Jeffrey Hair > Priority: Minor > > Proposal: Make the various classes/code that give VMs and other resources hostnames, hypervisor guest names, and UUIDs into their classes as injectable dependencies in their own module under the core module. > This proposal originally only concerned the VirtualMachineName class and can be broken down into several parts: > * Make the VirtualMachineName class an injectable dependency instead of being full of static methods. > * Refactor the generateHostName method in UserVmManagerImpl to be backed by an injectable service which generates host names. > * Move the UUIDManagerImpl from the core module to a new module (grouped with the other 2 ideally). > Rationale: > * VirtualMachineName is one of the few remaining classes that has static methods tangled like spaghetti throughout the code. This change will put it in line with the rest of the management server codebase and opens the door to extensibility. Which brings us to... > * Extensibility: The ultimate goal of this feature is to provide 3rd party developers the option of changing default instance/resource naming policies. Currently this is possible in a very limited fashion with the instance.name global setting, but this proposal makes it much more extensible. > By moving the naming-related services (VirtualMachineName, UUIDManager, and more as added/discovered) to their own module, the module can be excluded by module.properties and different ones substituted in. Alternatively, it could use the adapter model that other classes use, and the user can configure which adapters are active and also provide custom ones. > A good use case for this functionality is using a different style naming to emulate other cloud providers such as AWS (i-abc123) or GCE. -- This message was sent by Atlassian JIRA (v6.3.4#6332)