Merge "Add support for editing node's resource_class"
This commit is contained in:
commit
118a3ea81f
@ -87,7 +87,8 @@
|
||||
name: null,
|
||||
driver: null,
|
||||
driver_info: {},
|
||||
network_interface: null
|
||||
network_interface: null,
|
||||
resource_class: null
|
||||
};
|
||||
|
||||
angular.forEach(ctrl.propertyCollections, function(collection) {
|
||||
|
@ -80,7 +80,8 @@
|
||||
driver_info: {},
|
||||
properties: {},
|
||||
extra: {},
|
||||
network_interface: null});
|
||||
network_interface: null,
|
||||
resource_class: null});
|
||||
expect(Object.getOwnPropertyNames(ctrl).sort()).toEqual(
|
||||
BASE_NODE_CONTROLLER_PROPERTIES.sort());
|
||||
});
|
||||
|
@ -31,7 +31,6 @@
|
||||
<!--base node form-->
|
||||
<form id="baseNodeForm"
|
||||
name="baseNodeForm">
|
||||
|
||||
<!--tabbed content-->
|
||||
<div class="tab-content">
|
||||
<!-- node info tab-->
|
||||
@ -53,6 +52,22 @@
|
||||
placeholder="{$ ::'A unique node name. Optional.' | translate $}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--resource class-->
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error': baseNodeForm.resource_class.$invalid &&
|
||||
baseNodeForm.resource_class.$dirty}">
|
||||
<label for="resource_class"
|
||||
class="control-label"
|
||||
translate>Resource Class</label>
|
||||
<div>
|
||||
<input type="text maxlength=80"
|
||||
class="form-control"
|
||||
ng-model="ctrl.node.resource_class"
|
||||
id="resource_class"
|
||||
name="resource_class"
|
||||
placeholder="{$ ::'A resource class name for future nova scheduling, in stand-alone usage only. Optional.' | translate $}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--network interface-->
|
||||
<div class="form-group">
|
||||
<label for="network_interface"
|
||||
|
@ -83,6 +83,7 @@
|
||||
ctrl.baseNode = node;
|
||||
|
||||
ctrl.node.name = node.name;
|
||||
ctrl.node.resource_class = node.resource_class;
|
||||
ctrl.node.network_interface = node.network_interface;
|
||||
for (var i = 0; i < ctrl.drivers.length; i++) {
|
||||
if (ctrl.drivers[i].name === node.driver) {
|
||||
@ -121,6 +122,7 @@
|
||||
this.path = path;
|
||||
};
|
||||
angular.forEach([new PatchItem("name", "/name"),
|
||||
new PatchItem("resource_class", "/resource_class"),
|
||||
new PatchItem("network_interface", "/network_interface"),
|
||||
new PatchItem("driver", "/driver"),
|
||||
new PatchItem("properties", "/properties"),
|
||||
|
@ -77,6 +77,7 @@
|
||||
PROPERTY_COLLECTION_PROPERTIES.sort());
|
||||
});
|
||||
expect(ctrl.node.name).toEqual(editNode.name);
|
||||
expect(ctrl.node.resource_class).toEqual(editNode.resource_class);
|
||||
expect(ctrl.node.network_interface).toEqual(editNode.network_interface);
|
||||
expect(ctrl.node.properties).toEqual(editNode.properties);
|
||||
expect(ctrl.node.extra).toEqual(editNode.extra);
|
||||
|
@ -9,6 +9,8 @@
|
||||
<dd>{$ ctrl.node.uuid | noValue $}</dd>
|
||||
<dt translate>Chassis ID</dt>
|
||||
<dd>{$ ctrl.node.chassis_uuid | noValue $}</dd>
|
||||
<dt translate>Resource Class</dt>
|
||||
<dd>{$ ctrl.node.resource_class | noValue $}</dd>
|
||||
<dt translate>Created At</dt>
|
||||
<dd>{$ ctrl.node.created_at | date:'medium' | noValue $}</dd>
|
||||
</dl>
|
||||
|
7
releasenotes/notes/bug-1672709-b485a7a59ea1c129.yaml
Normal file
7
releasenotes/notes/bug-1672709-b485a7a59ea1c129.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The node-details/configuration page shows the node's ``resource_class``.
|
||||
- |
|
||||
The user is now able to edit/update the ``resource_class`` field
|
||||
when enrolling/updating a node.
|
Loading…
Reference in New Issue
Block a user