- Hosts data is getting merged with hosts' facts which is not sending address hence not getting displayed in UI
- The value is empty hence in the API
- Caused by https://github.com/ceph/ceph/pull/65102
Fixes https://tracker.ceph.com/issues/74222
Signed-off-by: Afreen Misbah <afreen@ibm.com>
merge_dicts(
{
'ceph_version': mgr.version,
+ 'addr': '',
'services': [],
'sources': {
'ceph': False,
facts = facts_map.get(hostname, {})
host_facts = {
'hostname': facts.get('hostname', hostname),
- 'addr': facts.get('addr', ''),
'cpu_cores': facts.get('cpu_cores', 0),
'cpu_count': facts.get('cpu_count', 0),
'model': facts.get('model', ''),
hosts.navigateTo();
});
+ describe('should have all host details', () => {
+ it('should have hostname'),
+ () => {
+ cy.get('[data-testid="hostname"]').should('not.be.empty');
+ };
+ it('should have IP address'),
+ () => {
+ cy.get('[data-testid="ip-address"]').should('not.be.empty');
+ };
+ });
+
// rgw is needed for testing the force maintenance
it('should create rgw services', () => {
services.navigateTo('create');
<ng-template #hostNameTpl
let-row="data.row">
- <span>
+ <span data-testid="hostname">
{{ row.hostname }}
</span><br>
<span class="text-muted fst-italic"
- *ngIf="row.addr">
+ *ngIf="row.addr"
+ data-testid="ip-address">
({{ row.addr }})
</span>
</ng-template>
def test_host_list_with_facts(self, mock_get_hosts):
hosts_without_facts = [{
'hostname': 'host-0',
+ 'addr': '192.168.1.1',
'sources': {
'ceph': True,
'orchestrator': False
}
}, {
'hostname': 'host-1',
+ 'addr': '192.168.1.2',
'sources': {
'ceph': False,
'orchestrator': True
hosts_with_facts = [{
'hostname': 'host-0',
+ 'addr': '192.168.1.1',
'sources': {
'ceph': True,
'orchestrator': False
},
- 'addr': '',
'cpu_cores': 0,
'model': '',
'nic_count': 0,
'services': []
}, {
'hostname': 'host-1',
+ 'addr': '192.168.1.2',
'sources': {
'ceph': False,
'orchestrator': True
},
- 'addr': '',
'cpu_cores': 0,
'model': '',
'nic_count': 0,