-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Choose a server group when booting a VM with NG launch instance
Allow users to choose a server group when booting a VM. Adds an optional workflow step to the launch instance workflow that shows the available server groups and details about each group. The ability to choose a server groups already exists for the legacy launch instance workflow as a dropdown list, but having it as a separate step in the angular workflow provides the added capability of seeing group details. To test this patch, create a server group via the nova CLI. Example: nova server-group-create group1 affinity And use the angular launch instance workflow to select a server group. To validate the new instance was added to the server group, use the nova CLI: nova server-group-get [ID of server group] Change-Id: I651817850ef8a5afec047a9a481843a5eddbf5a9 Implements: blueprint nova-server-groups
- Loading branch information
Brad Pokorny
authored and
Brad Pokorny
committed
Jul 19, 2016
1 parent
e1c3d6e
commit cf91124
Showing
13 changed files
with
376 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...static/dashboard/project/workflow/launch-instance/server-groups/server-group-details.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<table st-table="row.policies" | ||
class="table table-condensed table-rsp server-group-details"> | ||
<thead> | ||
<tr> | ||
<th st-sort="policy" st-sort-default translate>Policy</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="policy in row.policies"> | ||
<td>{$ policy | noValue $}</td> | ||
</tr> | ||
</tbody> | ||
</table> |
68 changes: 68 additions & 0 deletions
68
...atic/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2016 Symantec Corp. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
(function () { | ||
'use strict'; | ||
|
||
angular | ||
.module('horizon.dashboard.project.workflow.launch-instance') | ||
.controller('LaunchInstanceServerGroupsController', LaunchInstanceServerGroupsController); | ||
|
||
LaunchInstanceServerGroupsController.$inject = [ | ||
'launchInstanceModel', | ||
'horizon.dashboard.project.workflow.launch-instance.basePath' | ||
]; | ||
|
||
/** | ||
* @ngdoc controller | ||
* @name LaunchInstanceServerGroupsController | ||
* @param {Object} launchInstanceModel | ||
* @param {string} basePath | ||
* @description | ||
* Allows selection of server groups. | ||
* @returns {undefined} No return value | ||
*/ | ||
function LaunchInstanceServerGroupsController(launchInstanceModel, basePath) { | ||
var ctrl = this; | ||
|
||
ctrl.tableData = { | ||
available: launchInstanceModel.serverGroups, | ||
allocated: launchInstanceModel.newInstanceSpec.server_groups, | ||
displayedAvailable: [], | ||
displayedAllocated: [] | ||
}; | ||
|
||
ctrl.tableDetails = basePath + 'server-groups/server-group-details.html'; | ||
|
||
ctrl.tableHelp = { | ||
/*eslint-disable max-len */ | ||
noneAllocText: gettext('Select a server group from the available groups below.'), | ||
/*eslint-enable max-len */ | ||
availHelpText: gettext('Select one') | ||
}; | ||
|
||
ctrl.tableLimits = { | ||
maxAllocation: 1 | ||
}; | ||
|
||
ctrl.filterFacets = [ | ||
{ | ||
label: gettext('Name'), | ||
name: 'name', | ||
singleton: true | ||
} | ||
]; | ||
} | ||
})(); |
11 changes: 11 additions & 0 deletions
11
...t/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.help.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div> | ||
<p translate> | ||
Server groups define collections of VM's so that the entire | ||
collection can be given specific properties. For example, the policy of a | ||
server group may specify that VM's in this group should not be placed on | ||
the same physical hardware due to availability requirements. | ||
</p> | ||
<p translate> | ||
Server groups are project-specific and cannot be shared across projects. | ||
</p> | ||
</div> |
Oops, something went wrong.