Removes the `remove` functionality from the UI.
Fixes: http://tracker.ceph.com/issues/35811
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
# Destroy
self._post('/api/osd/5/destroy')
self.assertStatus(200)
- # Remove
- self._post('/api/osd/5/remove')
+ # Purge
+ self._post('/api/osd/5/purge')
self.assertStatus(200)
def test_safe_to_destroy(self):
}
@RESTController.Resource('POST')
- def remove(self, svc_id):
+ def purge(self, svc_id):
"""
Note: osd must be marked `down` before removal.
"""
- CephService.send_command('mon', 'osd rm', ids=[svc_id])
+ CephService.send_command('mon', 'osd purge-actual', id=int(svc_id),
+ yes_i_really_mean_it=True)
@RESTController.Resource('POST')
def destroy(self, svc_id):
const modalClass = CriticalConfirmationModalComponent;
mockSafeToDestroy();
expectOpensModal('Mark Lost', modalClass);
- expectOpensModal('Remove', modalClass);
+ expectOpensModal('Purge', modalClass);
expectOpensModal('Destroy', modalClass);
});
});
it('calls the corresponding service methods in critical confirmation modals', () => {
mockSafeToDestroy();
expectOsdServiceMethodCalled('Mark Lost', 'markLost');
- expectOsdServiceMethodCalled('Remove', 'remove');
+ expectOsdServiceMethodCalled('Purge', 'purge');
expectOsdServiceMethodCalled('Destroy', 'destroy');
});
});
icon: 'fa-unlink'
},
{
- name: this.i18n('Remove'),
+ name: this.i18n('Purge'),
permission: 'delete',
click: () =>
this.showCriticalConfirmationModal(
- this.i18n('Remove'),
+ this.i18n('Purge'),
this.i18n('OSD'),
- this.i18n('removed'),
- this.osdService.remove
+ this.i18n('purged'),
+ this.osdService.purge
),
disable: () => this.isNotSelectedOrInState('up'),
- icon: 'fa-remove'
+ icon: 'fa-eraser'
},
{
name: this.i18n('Destroy'),
this.osdService.destroy
),
disable: () => this.isNotSelectedOrInState('up'),
- icon: 'fa-eraser'
+ icon: 'fa-remove'
}
];
}
expect(req.request.method).toBe('POST');
});
- it('should remove an OSD', () => {
- service.remove(1).subscribe();
- const req = httpTesting.expectOne('api/osd/1/remove');
+ it('should purge an OSD', () => {
+ service.purge(1).subscribe();
+ const req = httpTesting.expectOne('api/osd/1/purge');
expect(req.request.method).toBe('POST');
});
return this.http.post(`${this.path}/${id}/mark_lost`, null);
}
- remove(id: number) {
- return this.http.post(`${this.path}/${id}/remove`, null);
+ purge(id: number) {
+ return this.http.post(`${this.path}/${id}/purge`, null);
}
destroy(id: number) {
<context context-type="linenumber">1</context>
</context-group>
</trans-unit>
- <trans-unit id="019d4bd6a5690f0cfa0ecf346a4e6bf7f0d8debb" datatype="html">
- <source>Remove</source>
+ <trans-unit id="40fedc157ad899a18ec40573f770d18b040959d2" datatype="html">
+ <source>Purge</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/ceph/cluster/osd/osd-list/osd-list.component.ts</context>
<context context-type="linenumber">1</context>
<context context-type="linenumber">1</context>
</context-group>
</trans-unit>
- <trans-unit id="c640261f80e6afd42cac3f4b63594012f198e0e8" datatype="html">
- <source>removed</source>
+ <trans-unit id="4f3cff08c7033b63bbccfe66006b1bcaea48ddd8" datatype="html">
+ <source>purged</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/ceph/cluster/osd/osd-list/osd-list.component.ts</context>
<context context-type="linenumber">1</context>