'Modify an rdf device pair.
:param array: the array serial number
:param device_id: the device id
:param rdf_group: the rdf group
:param extra_specs: the extra specs
:param split: flag to indicate "split" action'

@coordination.synchronized('emc-rg-{rdf_group}')
def modify_rdf_device_pair(self, array, device_id, rdf_group, extra_specs, split=False):

    common_opts = {'force': 'false', 'symForce': 'false', 'star': 'false', 'hop2': 'false', 'bypass': 'false'}
    if split:
        common_opts.update({'immediate': 'false'})
        payload = {'action': 'Split', 'executionOption': 'ASYNCHRONOUS', 'split': common_opts}
    else:
        common_opts.update({'establish': 'true', 'restore': 'false', 'remote': 'false', 'immediate': 'false'})
        payload = {'action': 'Failover', 'executionOption': 'ASYNCHRONOUS', 'failover': common_opts}
    resource_name = ('%(rdf_num)s/volume/%(device_id)s' % {'rdf_num': rdf_group, 'device_id': device_id})
    (sc, job) = self.modify_resource(array, REPLICATION, 'rdf_group', payload, resource_name=resource_name, private='/private')
    self.wait_for_job('Modify    device    pair', sc, job, extra_specs)
