@CreatePermission
def create_sync_policy_group(self, group_id: str, status: str, bucket_name=''):
multisite_instance = RgwMultisite()
- return multisite_instance.create_sync_policy_group(group_id, status, bucket_name)
+ return multisite_instance.create_sync_policy_group(group_id, status, bucket_name, True)
@Endpoint(method='PUT', path='/sync-policy-group')
@EndpointDoc("Update the sync policy group")
@UpdatePermission
def update_sync_policy_group(self, group_id: str, status: str, bucket_name=''):
multisite_instance = RgwMultisite()
- return multisite_instance.update_sync_policy_group(group_id, status, bucket_name)
+ return multisite_instance.update_sync_policy_group(group_id, status, bucket_name, True)
@Endpoint(method='DELETE', path='/sync-policy-group')
@EndpointDoc("Remove the sync policy group")
@DeletePermission
def remove_sync_policy_group(self, group_id: str, bucket_name=''):
multisite_instance = RgwMultisite()
- return multisite_instance.remove_sync_policy_group(group_id, bucket_name)
+ return multisite_instance.remove_sync_policy_group(group_id, bucket_name, True)
@Endpoint(method='PUT', path='/sync-flow')
@EndpointDoc("Create or update the sync flow")
bucket_name=''):
multisite_instance = RgwMultisite()
return multisite_instance.create_sync_flow(group_id, flow_id, flow_type, zones,
- bucket_name, source_zone, destination_zone)
+ bucket_name, source_zone, destination_zone, True)
@Endpoint(method='DELETE', path='/sync-flow')
@EndpointDoc("Remove the sync flow")
bucket_name=''):
multisite_instance = RgwMultisite()
return multisite_instance.remove_sync_flow(group_id, flow_id, flow_type, source_zone,
- destination_zone, zones, bucket_name)
+ destination_zone, zones, bucket_name, True)
@Endpoint(method='PUT', path='/sync-pipe')
@EndpointDoc("Create or update the sync pipe")
multisite_instance = RgwMultisite()
return multisite_instance.create_sync_pipe(group_id, pipe_id, source_zones,
destination_zones, source_bucket,
- destination_bucket, bucket_name)
+ destination_bucket, bucket_name, True)
@Endpoint(method='DELETE', path='/sync-pipe')
@EndpointDoc("Remove the sync pipe")
multisite_instance = RgwMultisite()
return multisite_instance.remove_sync_pipe(group_id, pipe_id, source_zones,
destination_zones, destination_bucket,
- bucket_name)
+ bucket_name, True)
@APIRouter('/rgw/daemon', Scope.RGW)
+import { BucketsPageHelper } from './buckets.po';
import { MultisitePageHelper } from './multisite.po';
describe('Multisite page', () => {
const multisite = new MultisitePageHelper();
+ const buckets = new BucketsPageHelper();
+ const bucket_name = 'e2ebucket';
+
+ before(() => {
+ cy.login();
+ buckets.navigateTo('create');
+ buckets.create(bucket_name, BucketsPageHelper.USERS[0]);
+ buckets.getFirstTableCell(bucket_name).should('exist');
+ });
beforeEach(() => {
cy.login();
describe('create, edit & delete sync group policy', () => {
it('should create policy', () => {
multisite.navigateTo('create');
- multisite.create('test', 'Enabled');
+ multisite.create('test', 'Enabled', bucket_name);
multisite.getFirstTableCell('test').should('exist');
});
it('should edit policy status', () => {
multisite.navigateTo();
- multisite.edit('test', 'Forbidden');
+ multisite.edit('test', 'Forbidden', bucket_name);
});
it('should delete policy', () => {
describe.skip('create, edit & delete symmetrical sync Flow', () => {
it('Preparing...(creating sync group policy)', () => {
multisite.navigateTo('create');
- multisite.create('test', 'Enabled');
+ multisite.create('test', 'Enabled', bucket_name);
multisite.getFirstTableCell('test').should('exist');
});
describe('symmetrical Flow creation started', () => {
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
- def create_sync_policy_group(self, group_id: str, status: str, bucket_name: str = ''):
+ def create_sync_policy_group(self, group_id: str, status: str, bucket_name: str = '',
+ update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'create', '--group-id', group_id,
'--status', SyncStatus[status].value]
if bucket_name:
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
- def update_sync_policy_group(self, group_id: str, status: str, bucket_name: str = ''):
+ def update_sync_policy_group(self, group_id: str, status: str, bucket_name: str = '',
+ update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'modify', '--group-id', group_id,
'--status', SyncStatus[status].value]
if bucket_name:
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
- def remove_sync_policy_group(self, group_id: str, bucket_name=''):
+ def remove_sync_policy_group(self, group_id: str, bucket_name='', update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'remove', '--group-id', group_id]
if bucket_name:
rgw_sync_policy_cmd += ['--bucket', bucket_name]
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
def create_sync_flow(self, group_id: str, flow_id: str, flow_type: str,
zones: Optional[Dict[str, List]] = None, bucket_name: str = '',
source_zone: Optional[str] = None,
- destination_zone: Optional[str] = None):
+ destination_zone: Optional[str] = None,
+ update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'flow', 'create', '--group-id', group_id,
'--flow-id', flow_id, '--flow-type', SyncFlowTypes[flow_type].value]
if len(zones['removed']) > 0:
self.remove_sync_flow(group_id, flow_id, flow_type, source_zone,
destination_zone, zones['removed'], bucket_name)
+ if not bucket_name and update_period:
+ self.update_period()
def remove_sync_flow(self, group_id: str, flow_id: str, flow_type: str,
source_zone='', destination_zone='',
- zones: Optional[List[str]] = None, bucket_name: str = ''):
+ zones: Optional[List[str]] = None, bucket_name: str = '',
+ update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'flow', 'remove', '--group-id', group_id,
'--flow-id', flow_id, '--flow-type', SyncFlowTypes[flow_type].value]
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
def create_sync_pipe(self, group_id: str, pipe_id: str,
source_zones: Dict[str, Any],
destination_zones: Dict[str, Any],
source_bucket: str = '',
destination_bucket: str = '',
- bucket_name: str = ''):
+ bucket_name: str = '',
+ update_period=False):
if source_zones['added'] or destination_zones['added']:
rgw_sync_policy_cmd = ['sync', 'group', 'pipe', 'create',
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
if source_zones['removed'] or destination_zones['removed']:
self.remove_sync_pipe(group_id, pipe_id, source_zones['removed'],
def remove_sync_pipe(self, group_id: str, pipe_id: str,
source_zones: Optional[List[str]] = None,
destination_zones: Optional[List[str]] = None,
- destination_bucket: str = '', bucket_name: str = ''):
+ destination_bucket: str = '', bucket_name: str = '',
+ update_period=False):
rgw_sync_policy_cmd = ['sync', 'group', 'pipe', 'remove',
'--group-id', group_id, '--pipe-id', pipe_id]
http_status_code=500, component='rgw')
except SubprocessError as error:
raise DashboardException(error, http_status_code=500, component='rgw')
+ if not bucket_name and update_period:
+ self.update_period()
def create_dashboard_admin_sync_group(self, zonegroup_name: str = ''):