def __init__(self):
    super(XdcrReplicate, self).__init__()
    self.parser.prog = 'couchbase-cli xdcr-replicate'
    group = self.parser.add_argument_group('XDCR replicate options')
    group.add_argument('--get', action='store_true', help='Retrieve the settings of a XDCR replication.')
    group.add_argument('--create', dest='create', action='store_true', default=False, help='Create an XDCR replication')
    group.add_argument('--delete', dest='delete', action='store_true', default=False, help='Delete an XDCR replication')
    group.add_argument('--pause', dest='pause', action='store_true', default=False, help='Pause an XDCR replication')
    group.add_argument('--list', dest='list', action='store_true', default=False, help='List all XDCR replications')
    group.add_argument('--resume', dest='resume', action='store_true', default=False, help='Resume an XDCR replication')
    group.add_argument('--settings', dest='settings', action='store_true', default=False, help='Set advanced settings for an XDCR replication')
    group.add_argument('--xdcr-from-bucket', dest='from_bucket', metavar='<bucket>', help='The name bucket to replicate data from')
    group.add_argument('--xdcr-to-bucket', dest='to_bucket', metavar='<bucket>', help='The name bucket to replicate data to')
    group.add_argument('--xdcr-cluster-name', dest='cluster_name', metavar='<name>', help='The name of the cluster reference to replicate to')
    group.add_argument('--xdcr-replication-mode', dest='rep_mode', metavar='<mode>', choices=['xmem', 'capi'], action=CBDeprecatedAction, help=SUPPRESS)
    group.add_argument('--filter-expression', dest='filter', metavar='<regex>', help='Regular expression to filter replication streams')
    group.add_argument('--filter-skip-restream', dest='filter_skip', action='store_true', default=False, help='Restart the replication. It must be specified together with --filter-expression')
    group.add_argument('--xdcr-replicator', dest='replicator_id', metavar='<id>', help='Replication ID')
    group.add_argument('--checkpoint-interval', dest='chk_int', type=int, metavar='<seconds>', help='Intervals between checkpoints in seconds (60 to 14400)')
    group.add_argument('--worker-batch-size', dest='worker_batch_size', type=int, metavar='<num>', help='Doc batch size (500 to 10000)')
    group.add_argument('--doc-batch-size', dest='doc_batch_size', type=int, metavar='<KB>', help='Document batching size in KB (10 to 100000)')
    group.add_argument('--failure-restart-interval', dest='fail_interval', type=int, metavar='<seconds>', help='Interval for restarting failed xdcr in seconds (1 to 300)')
    group.add_argument('--optimistic-replication-threshold', dest='rep_thresh', type=int, metavar='<bytes>', help=('Document body size threshold to trigger optimistic replication' + ' (bytes)'))
    group.add_argument('--source-nozzle-per-node', dest='src_nozzles', type=int, metavar='<num>', help='The number of source nozzles per source node (1 to 10)')
    group.add_argument('--target-nozzle-per-node', dest='dst_nozzles', type=int, metavar='<num>', help='The number of outgoing nozzles per target node (1 to 10)')
    group.add_argument('--bandwidth-usage-limit', dest='usage_limit', type=int, metavar='<num>', help='The bandwidth usage limit in MiB/Sec')
    group.add_argument('--enable-compression', dest='compression', metavar='<1|0>', choices=['1', '0'], help='Enable/disable compression')
    group.add_argument('--log-level', dest='log_level', metavar='<level>', choices=['Error', 'Warn', 'Info', 'Debug', 'Trace'], help='The XDCR log level')
    group.add_argument('--stats-interval', dest='stats_interval', metavar='<ms>', help='The interval for statistics updates (in milliseconds)')
    group.add_argument('--priority', dest='priority', choices=['High', 'Medium', 'Low'], metavar='<High|Medium|Low>', help='XDCR priority, by default set to High')
    group.add_argument('--reset-expiry', choices=['1', '0'], metavar='<1|0>', dest='reset_expiry', default=None, help='When set to true the expiry of mutations will be set to zero')
    group.add_argument('--filter-deletion', choices=['1', '0'], metavar='<1|0>', default=None, dest='filter_del', help='When set to true delete mutations will be filter out and not sent to the target cluster')
    group.add_argument('--filter-expiration', choices=['1', '0'], metavar='<1|0>', default=None, dest='filter_exp', help='When set to true expiry mutations will be filter out and not sent to the target cluster')
    collection_group = self.parser.add_argument_group('Collection options')
    collection_group.add_argument('--collection-explicit-mappings', choices=['1', '0'], metavar='<1|0>', default=None, help='If explicit collection mappings is to be used. (Enterprise Edition Only)')
    collection_group.add_argument('--collection-migration', choices=['1', '0'], metavar='<1|0>', default=None, help='If XDCR is to run in collection migration mode. (Enterprise Edition only)')
    collection_group.add_argument('--collection-mapping-rules', type=str, default=None, metavar='<mappings>', help='The mapping rules specified as a JSON formatted string. (Enterprise Edition Only)')
def __init__(self):
    super(XdcrReplicate, self).__init__()
    self.parser.prog = 'couchbase-cli xdcr-replicate'
    group = self.parser.add_argument_group('XDCR replicate options')
    group.add_argument('--get', action='store_true', help='Retrieve the settings of a XDCR replication.')
    group.add_argument('--create', dest='create', action='store_true', default=False, help='Create an XDCR replication')
    group.add_argument('--delete', dest='delete', action='store_true', default=False, help='Delete an XDCR replication')
    group.add_argument('--pause', dest='pause', action='store_true', default=False, help='Pause an XDCR replication')
    group.add_argument('--list', dest='list', action='store_true', default=False, help='List all XDCR replications')
    group.add_argument('--resume', dest='resume', action='store_true', default=False, help='Resume an XDCR replication')
    group.add_argument('--settings', dest='settings', action='store_true', default=False, help='Set advanced settings for an XDCR replication')
    group.add_argument('--xdcr-from-bucket', dest='from_bucket', metavar='<bucket>', help='The name bucket to replicate data from')
    group.add_argument('--xdcr-to-bucket', dest='to_bucket', metavar='<bucket>', help='The name bucket to replicate data to')
    group.add_argument('--xdcr-cluster-name', dest='cluster_name', metavar='<name>', help='The name of the cluster reference to replicate to')
    group.add_argument('--xdcr-replication-mode', dest='rep_mode', metavar='<mode>', choices=['xmem', 'capi'], action=CBDeprecatedAction, help=SUPPRESS)
    group.add_argument('--filter-expression', dest='filter', metavar='<regex>', help='Regular expression to filter replication streams')
    group.add_argument('--filter-skip-restream', dest='filter_skip', action='store_true', default=False, help='Restart the replication. It must be specified together with --filter-expression')
    group.add_argument('--xdcr-replicator', dest='replicator_id', metavar='<id>', help='Replication ID')
    group.add_argument('--checkpoint-interval', dest='chk_int', type=int, metavar='<seconds>', help='Intervals between checkpoints in seconds (60 to 14400)')
    group.add_argument('--worker-batch-size', dest='worker_batch_size', type=int, metavar='<num>', help='Doc batch size (500 to 10000)')
    group.add_argument('--doc-batch-size', dest='doc_batch_size', type=int, metavar='<KB>', help='Document batching size in KB (10 to 100000)')
    group.add_argument('--failure-restart-interval', dest='fail_interval', type=int, metavar='<seconds>', help='Interval for restarting failed xdcr in seconds (1 to 300)')
    group.add_argument('--optimistic-replication-threshold', dest='rep_thresh', type=int, metavar='<bytes>', help=('Document body size threshold to trigger optimistic replication' + ' (bytes)'))
    group.add_argument('--source-nozzle-per-node', dest='src_nozzles', type=int, metavar='<num>', help='The number of source nozzles per source node (1 to 10)')
    group.add_argument('--target-nozzle-per-node', dest='dst_nozzles', type=int, metavar='<num>', help='The number of outgoing nozzles per target node (1 to 10)')
    group.add_argument('--bandwidth-usage-limit', dest='usage_limit', type=int, metavar='<num>', help='The bandwidth usage limit in MiB/Sec')
    group.add_argument('--enable-compression', dest='compression', metavar='<1|0>', choices=['1', '0'], help='Enable/disable compression')
    group.add_argument('--log-level', dest='log_level', metavar='<level>', choices=['Error', 'Warn', 'Info', 'Debug', 'Trace'], help='The XDCR log level')
    group.add_argument('--stats-interval', dest='stats_interval', metavar='<ms>', help='The interval for statistics updates (in milliseconds)')
    group.add_argument('--priority', dest='priority', choices=['High', 'Medium', 'Low'], metavar='<High|Medium|Low>', help='XDCR priority, by default set to High')
    group.add_argument('--reset-expiry', choices=['1', '0'], metavar='<1|0>', dest='reset_expiry', default=None, help='When set to true the expiry of mutations will be set to zero')
    group.add_argument('--filter-deletion', choices=['1', '0'], metavar='<1|0>', default=None, dest='filter_del', help='When set to true delete mutations will be filter out and not sent to the target cluster')
    group.add_argument('--filter-expiration', choices=['1', '0'], metavar='<1|0>', default=None, dest='filter_exp', help='When set to true expiry mutations will be filter out and not sent to the target cluster')
    collection_group = self.parser.add_argument_group('Collection options')
    collection_group.add_argument('--collection-explicit-mappings', choices=['1', '0'], metavar='<1|0>', default=None, help='If explicit collection mappings is to be used. (Enterprise Edition Only)')
    collection_group.add_argument('--collection-migration', choices=['1', '0'], metavar='<1|0>', default=None, help='If XDCR is to run in collection migration mode. (Enterprise Edition only)')
    collection_group.add_argument('--collection-mapping-rules', type=str, default=None, metavar='<mappings>', help='The mapping rules specified as a JSON formatted string. (Enterprise Edition Only)')