Merge "Allow members to be set as "backup""
This commit is contained in:
commit
5c8cbf4b5f
@ -311,6 +311,7 @@ def add_member(request, **kwargs):
|
||||
monitor_address=monitor_address if monitor_address else None,
|
||||
monitor_port=member.get('monitor_port'),
|
||||
admin_state_up=member.get('admin_state_up'),
|
||||
backup=member.get('backup', False),
|
||||
name=member.get('name'),
|
||||
)
|
||||
|
||||
@ -1087,6 +1088,7 @@ class Member(generic.View):
|
||||
monitor_address=monitor_address if monitor_address else None,
|
||||
monitor_port=data.get('monitor_port'),
|
||||
admin_state_up=data.get('admin_state_up'),
|
||||
backup=data.get('backup', False),
|
||||
name=data.get('name'),
|
||||
)
|
||||
return _get_sdk_object_dict(member)
|
||||
|
@ -64,6 +64,7 @@
|
||||
ctrl.monitor_address = member.monitor_address;
|
||||
ctrl.monitor_port = member.monitor_port;
|
||||
ctrl.admin_state_up = member.admin_state_up;
|
||||
ctrl.backup = member.backup;
|
||||
ctrl.name = member.name;
|
||||
ctrl.cancel = cancel;
|
||||
ctrl.save = save;
|
||||
@ -81,6 +82,7 @@
|
||||
monitor_address: ctrl.monitor_address,
|
||||
monitor_port: ctrl.monitor_port,
|
||||
admin_state_up: ctrl.admin_state_up,
|
||||
backup: ctrl.backup,
|
||||
name: ctrl.name
|
||||
}).then(onSuccess, onFailure);
|
||||
}
|
||||
|
@ -43,6 +43,7 @@
|
||||
monitor_address: '1.1.1.1',
|
||||
monitor_port: 80,
|
||||
admin_state_up: true,
|
||||
backup: false,
|
||||
name: 'member name'
|
||||
});
|
||||
$provide.value('horizon.app.core.openstack-service-api.lbaasv2', {
|
||||
@ -86,6 +87,7 @@
|
||||
monitor_address: '1.1.1.1',
|
||||
monitor_port: 80,
|
||||
admin_state_up: true,
|
||||
backup: false,
|
||||
name: 'member name'
|
||||
});
|
||||
expect($uibModalInstance.close).toHaveBeenCalled();
|
||||
|
@ -101,6 +101,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-8 col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label required" translate>Backup</label>
|
||||
<div class="form-field">
|
||||
<div class="btn-group">
|
||||
<label class="btn btn-default"
|
||||
ng-repeat="option in modal.yesNoOptions"
|
||||
ng-model="modal.backup"
|
||||
uib-btn-radio="option.value">{$ ::option.label $}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -20,6 +20,10 @@
|
||||
<strong translate>Port</strong>
|
||||
{$ ::ctrl.member.protocol_port $}
|
||||
</li>
|
||||
<li>
|
||||
<strong translate>Backup</strong>
|
||||
{$ ctrl.member.backup | yesno $}
|
||||
</li>
|
||||
<li>
|
||||
<strong translate>Operating Status</strong>
|
||||
{$ ctrl.member.operating_status | decode:ctrl.operatingStatus $}
|
||||
|
@ -78,6 +78,10 @@
|
||||
id: 'weight',
|
||||
priority: 1
|
||||
})
|
||||
.append({
|
||||
id: 'backup',
|
||||
priority: 1
|
||||
})
|
||||
.append({
|
||||
id: 'operating_status',
|
||||
priority: 1
|
||||
@ -148,6 +152,10 @@
|
||||
label: gettext('Admin State Up'),
|
||||
filters: ['yesno']
|
||||
},
|
||||
backup: {
|
||||
label: gettext('Backup'),
|
||||
filters: ['yesno']
|
||||
},
|
||||
address: gettext('IP Address'),
|
||||
protocol_port: gettext('Port'),
|
||||
weight: gettext('Weight'),
|
||||
|
@ -119,6 +119,7 @@
|
||||
monitor_address: null,
|
||||
monitor_port: null,
|
||||
admin_state_up: true,
|
||||
backup: false,
|
||||
name: null
|
||||
});
|
||||
}
|
||||
|
@ -48,3 +48,10 @@
|
||||
Default is null which monitors the member protocol port.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Backup:</strong>
|
||||
<translate>
|
||||
Is the member a backup? Backup members only receive traffic when all
|
||||
non-backup members are down.
|
||||
</translate>
|
||||
</p>
|
||||
|
@ -112,7 +112,7 @@
|
||||
Can be toggled using the chevron button.
|
||||
Ensure colspan is greater or equal to number of column-headers.
|
||||
-->
|
||||
<td class="detail" colspan="9">
|
||||
<td class="detail" colspan="10">
|
||||
|
||||
<div class="row">
|
||||
<dl class="col-lg-5 col-md-5 col-sm-5">
|
||||
@ -154,6 +154,20 @@
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="col-lg-5 col-md-5 col-sm-5">
|
||||
<dt class="control-label required" translate>Backup</dt>
|
||||
<dd class="form-group">
|
||||
<div class="form-field">
|
||||
<div class="btn-group">
|
||||
<label class="btn btn-default"
|
||||
ng-repeat="option in model.yesNoOptions"
|
||||
ng-model="row.backup"
|
||||
ng-disabled="row.allocatedMember"
|
||||
uib-btn-radio="option.value">{$ ::option.label $}</label>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="col-lg-5 col-md-5 col-sm-5">
|
||||
<dt class="control-label required" translate>Name</dt>
|
||||
<dd class="form-group">
|
||||
@ -171,7 +185,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr table-status table="table" column-count="9"></tr>
|
||||
<tr table-status table="table" column-count="10"></tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
|
@ -605,7 +605,8 @@
|
||||
weight: 1,
|
||||
monitor_address: null,
|
||||
monitor_port: null,
|
||||
admin_state_up: true
|
||||
admin_state_up: true,
|
||||
backup: false
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -809,6 +810,7 @@
|
||||
monitor_address: member.monitor_address,
|
||||
monitor_port: member.monitor_port,
|
||||
admin_state_up: member.admin_state_up,
|
||||
backup: member.backup,
|
||||
name: member.name,
|
||||
allocatedMember: true
|
||||
});
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the ability to set member as backup.
|
Loading…
Reference in New Issue
Block a user