frankgh commented on code in PR #215: URL: https://github.com/apache/cassandra-sidecar/pull/215#discussion_r2155736361
########## client-common/src/main/java/org/apache/cassandra/sidecar/common/ApiEndpointsV1.java: ########## @@ -147,13 +154,50 @@ public final class ApiEndpointsV1 public static final String LIVE_MIGRATION_FILES_API = LIVE_MIGRATION_API_PREFIX + "/files"; - public static final String LIVE_MIGRATION_CDC_RAW_DIR_PATH = LIVE_MIGRATION_FILES_API + "/cdc_raw"; - public static final String LIVE_MIGRATION_COMMITLOG_DIR_PATH = LIVE_MIGRATION_FILES_API + "/commitlog"; - public static final String LIVE_MIGRATION_DATA_FILE_DIR_PATH = LIVE_MIGRATION_FILES_API + "/data"; - public static final String LIVE_MIGRATION_HINTS_DIR_PATH = LIVE_MIGRATION_FILES_API + "/hints"; + public static final String DIR_TYPE_PARAM = "dirType"; + public static final String DIR_INDEX_PARAM = "dirIndex"; + public static final String LIVE_MIGRATION_FILE_TRANSFER_API = LIVE_MIGRATION_FILES_API + "/:" + DIR_TYPE_PARAM + + "/:" + DIR_INDEX_PARAM + "/*"; + + /** + * Enum for holding different type of directories handled by Live Migration. + */ + public enum LiveMigrationDirType Review Comment: this enum feels misplaced and also the paths are not really being used to build the route. Ideally, we should only have the routes that we consume in the `ApiEndpointsV1` class. I would keep the `LiveMigrationDirType` enum in the `livemigration` package, and then leverage the enum in `org.apache.cassandra.sidecar.livemigration.LiveMigrationInstanceMetadataUtil` ########## server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/BasicPermissions.java: ########## @@ -79,4 +79,5 @@ public class BasicPermissions // Live Migration permissions public static final Permission LIST_FILES = new DomainAwarePermission("LIVE_MIGRATION:LIST_FILES", CLUSTER_SCOPE); + public static final Permission STREAM_FILES = new DomainAwarePermission("LIVE_MIGRATION:STREAM", CLUSTER_SCOPE); Review Comment: I would keep a single permission for the feature , similar to what we have for CDC -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org