GitHub user ProjectMoon reopened a pull request:
https://github.com/apache/cloudstack/pull/1492
[CLOUDSTACK-9003] Resource Naming Policies
Pull request #988, completed and reinvented.
This is an initial submission, a request for commentary.
This started with attempting to make the VirtualMachineName class
non-static, and turned into a complete overhaul of how resources in CloudStack
are named. Each supported resource has a naming policy that can be overridden
to change the way UUIDs and names are generated for them. The primary use case
for this is so CloudStack can emulate the naming schemes of other clouds. The
default naming policies are in cloud-plugin-naming-policies, cloud-server has
the server-naming module which contains the registry lifecycle, and the
registered policies are injected into the core managers context.
The supported resources are:
* User virtual machines
* All kinds of system VMs
* Security groups
* Volumes
* Snapshots
There is one issue we have before we consider this ready for submission.
The server-naming module has an ordering dependency. It must be loaded first in
cloud-server in order for everything to work. Currently in this PR is a class
called `ModuleLoadingComparator` which adds a comparator that forces the
server-naming module to the top of the list when loading modules. We obviously
want to get rid of this and are looking for suggestions on how to do this.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/greenqloud/cloudstack pr-naming-policies
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1492.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1492
----
commit 6be87da0d98400ecb7254c200cf9fe7821181e4c
Author: nnesic <[email protected]>
Date: 2015-12-28T10:52:54Z
Implement the naming policy feature.
The naming policies feature is a large refactoring of how CloudStack
generates names and UUIDs for the following resources: virtual
machines (user instances and system VMs), security groups, templates,
volumes, and snapshots. Previously, most of these resources were
generated in a non-uniform way, making use of static classes or simple
UUID generation.
With the naming policies feature, each type of supported resource has
a specific naming policy to go along with it that generates UUIDs and
resource names. This allows CloudStack to emulate different kinds of
naming schemes (such as those found in other clouds).
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---