diff --git a/RAMP/module_metadata.py b/RAMP/module_metadata.py index 6623366..81a6748 100644 --- a/RAMP/module_metadata.py +++ b/RAMP/module_metadata.py @@ -29,6 +29,7 @@ MIN_REDIS_VERSION = "4.0" MIN_REDIS_PACK_VERSION = "5.2" COMPATIBLE_REDIS_VERSION = "7.4" +ROFV2_SUPPORT = False RAMP_FORMAT_VERSION = 1 CONFIG_COMMAND = "" OVERIDE_COMMAND = [] # type: List[Dict[str, str]] @@ -57,6 +58,7 @@ "min_redis_pack_version", "min_redis_version", "compatible_redis_version", + "rofv2_support", "module_file", "module_name", "os", @@ -123,6 +125,7 @@ def create_default_metadata(module_path): "min_redis_version": MIN_REDIS_VERSION, "min_redis_pack_version": MIN_REDIS_PACK_VERSION, "compatible_redis_version": COMPATIBLE_REDIS_VERSION, + "rofv2_support": ROFV2_SUPPORT, "sha256": sha256_checksum(module_path), "commands": MODULE_COMMANDS, "ramp_format_version": RAMP_FORMAT_VERSION, diff --git a/RAMP/ramp.py b/RAMP/ramp.py index 0de8514..a6e04c5 100755 --- a/RAMP/ramp.py +++ b/RAMP/ramp.py @@ -99,6 +99,7 @@ def unpack(bundle): @click.option('--redis-min-version', '-r', 'min_redis_version', default=None, help='redis minimum version') @click.option('--redis-pack-min-version', '-R', 'min_redis_pack_version', default=None, help='redis pack minimum version') @click.option('--redis-compatible-version', '-cr', 'compatible_redis_version', default=None, help='redis compatible version') +@click.option('--rofv2-support', 'rofv2_support', default=False, help='This module supports RofV2') @click.option('--config-command', '-cc', default=None, help='command used to configure module args at runtime') @click.option('--os', '-O', default=None, help='build target OS (Darwin/Linux)') @click.option('--capabilities', '-C', callback=comma_seperated_to_list, help='comma separated list of module capabilities') diff --git a/test.py b/test.py index f8190f5..c9d7bb8 100644 --- a/test.py +++ b/test.py @@ -115,6 +115,7 @@ def test_bundle_from_cmd(): min_redis_version = "4.6" min_redis_pack_version = "5.0" compatible_redis_version = "7.2" + rofv2_support = True display_name = "test_module" capability_name = "Test & Module" module_name = "module_test" @@ -123,6 +124,7 @@ def test_bundle_from_cmd(): '-d', display_name, '-b', capability_name, '-n', module_name, '-h', homepage, '-l', _license, '-c', command_line_args, '-r', min_redis_version, '-R', min_redis_pack_version, '-cr', compatible_redis_version, + '--rofv2-support', rofv2_support, '-C', ','.join([cap['name'] for cap in MODULE_CAPABILITIES]), '-o', BUNDLE_ZIP_FILE, '-cc', CONFIG_COMMAND, '-E', 'graph.bulk', '-E', 'graph.BULK', @@ -152,6 +154,7 @@ def test_bundle_from_cmd(): assert metadata["min_redis_version"] == min_redis_version assert metadata["min_redis_pack_version"] == min_redis_pack_version assert metadata["compatible_redis_version"] == compatible_redis_version + assert metadata["rofv2_support"] == rofv2_support assert metadata["config_command"] == CONFIG_COMMAND assert metadata["sha256"] == sha256_checksum(MODULE_FILE_PATH) assert len(metadata["capabilities"]) == len(MODULE_CAPABILITIES)