jstests/sharding/libs/zone_changes_util.js
/**
 * Adds toShard to zone and removes fromShard from zone.
 */
Adds toShard to zone and removes fromShard from zone.
Adds toShard to zone and removes fromShard from zone .
function moveZoneToShard(st, zoneName, fromShard, toShard) {
    assert.commandWorked(st.s.adminCommand({addShardToZone: toShard.shardName, zone: zoneName}));
    assert.commandWorked(
        st.s.adminCommand({removeShardFromZone: fromShard.shardName, zone: zoneName}));
}
function moveZoneToShard ( st , zoneName , fromShard , toShard ) { assert . commandWorked ( st . s . adminCommand ( { addShardToZone : toShard . shardName , zone : zoneName } ) ) ; assert . commandWorked ( st . s . adminCommand ( { removeShardFromZone : fromShard . shardName , zone : zoneName } ) ) ; }
Adds toShard to zone and removes fromShard from zone.
Adds toShard to zone and removes fromShard from zone .