diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-all-static.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-all-static.ts index e97d16099..dad3ddb45 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-all-static.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-all-static.ts @@ -18,7 +18,6 @@ export default function setup() { [], deploymentTypes ); - // TO DO: adding a realm option to export all-static for specific realm program .description('Export all static config.') .action(async (host, realm, user, password, options, command) => { diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-all.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-all.ts index ab591170c..c3cd5d697 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-all.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-all.ts @@ -20,7 +20,6 @@ export default function setup() { [], deploymentTypes ); - // TO DO: Adding a realm option to export all config for a specific realm program .description('Export all config.') .addOption( diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-authentication.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-authentication.ts index ad0987b3e..72ae7c4a2 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-authentication.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-authentication.ts @@ -23,12 +23,6 @@ export default function setup() { program .description('Export authentication objects.') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only the entity object from this realm will be exported.' - ) - ) .action(async (host, realm, user, password, options, command) => { command.handleDefaultArgsAndOpts( host, @@ -38,9 +32,6 @@ export default function setup() { options, command ); - if (options.realm) { - realm = options.realm; - } if (await getTokens(false, true, deploymentTypes)) { verboseMessage('Exporting config entity authentication'); const outcome = await configManagerExportAuthentication(realm); diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-authz-policies.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-authz-policies.ts index 639c70cf8..5738e7039 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-authz-policies.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-authz-policies.ts @@ -29,12 +29,6 @@ export default function setup() { program .description('Export authorization policies from realm.') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only policy sets from this realm will be exported. Ignored with -f' - ) - ) .addOption( new Option( '-n, --policy-name ', @@ -79,11 +73,6 @@ export default function setup() { command ); - // -r/--realm flag has precedence over [realm] arguement - if (options.realm) { - realm = options.realm; - } - if (await getTokens(false, true, deploymentTypes)) { let outcome: boolean; @@ -141,7 +130,7 @@ export default function setup() { outcome = await configManagerExportAuthzPolicySets(options.file); } - // -r/--realm + // realm argument else if (realm !== constants.DEFAULT_REALM_KEY) { printMessage( `Exporting all the policy sets in the ${state.getRealm()} realm.` diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-journeys.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-journeys.ts index bc947bec2..744103f75 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-journeys.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-journeys.ts @@ -29,12 +29,6 @@ export default function setup() { 'Journey name, It only export the journey with the name.' ) ) - .addOption( - new Option( - '-r, --realm ', - 'Specific realm to get journeys from (overrides environment)' - ) - ) .addOption(new Option('-d, --pull-dependencies', 'Pull dependencies.')) // TO DO: implementing for 'clean' // .addOption( @@ -49,9 +43,6 @@ export default function setup() { options, command ); - if (options.realm) { - realm = options.realm; - } if (await getTokens(false, true, deploymentTypes)) { verboseMessage('Exporting config entity journeys'); diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-oauth2-agents.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-oauth2-agents.ts index b31c79663..6a47267ff 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-oauth2-agents.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-oauth2-agents.ts @@ -29,12 +29,6 @@ export default function setup() { program .description('Export OAuth2 Agents') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only the agents from this realm will be exported.' - ) - ) .addOption( new Option( '-n, --agent-name ', @@ -94,11 +88,6 @@ export default function setup() { command ); - // -r/--realm flag has precedence over [realm] arguement - if (options.realm) { - realm = options.realm; - } - if (await getTokens(false, true, deploymentTypes)) { let outcome: boolean; @@ -152,7 +141,7 @@ export default function setup() { outcome = await configManagerExportConfigAgents(options.file); } - // -r/--realm + // realm arugment else if (realm !== constants.DEFAULT_REALM_KEY) { printMessage( `Exporting all the agents from the ${state.getRealm()} realm.` diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-org-privileges.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-org-privileges.ts index 9f9910c3f..ed271fbe7 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-org-privileges.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-org-privileges.ts @@ -28,12 +28,6 @@ export default function setup() { program .description('Export organization privileges config.') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only the entity object from this realm will be exported.' - ) - ) .action(async (host, realm, user, password, options, command) => { command.handleDefaultArgsAndOpts( host, @@ -44,11 +38,6 @@ export default function setup() { command ); - // -r flag has precedence - if (options.realm) { - realm = options.realm; - } - if (await getTokens(false, true, deploymentTypes)) { let outcome: boolean; if (realm !== constants.DEFAULT_REALM_KEY) { diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-password-policy.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-password-policy.ts index 97a3c629e..80cd2870c 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-password-policy.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-password-policy.ts @@ -23,12 +23,6 @@ export default function setup() { program .description('Export password-policy objects.') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only the entity object from this realm will be exported.' - ) - ) .action(async (host, realm, user, password, options, command) => { command.handleDefaultArgsAndOpts( host, @@ -38,9 +32,6 @@ export default function setup() { options, command ); - if (options.realm) { - realm = options.realm; - } if (await getTokens(false, true, deploymentTypes)) { verboseMessage('Exporting config entity password-policy'); const outcome = await configManagerExportPasswordPolicy(realm); diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-saml.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-saml.ts index 6c25c05cb..0cac82ef4 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-saml.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-saml.ts @@ -64,9 +64,6 @@ export default function setup() { options, command ); - if (options.realm) { - realm = options.realm; - } if (await getTokens(false, true, deploymentTypes)) { verboseMessage('Exporting config entity saml'); diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-scripts.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-scripts.ts index 3beb7f298..9cd10c5f7 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-scripts.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull-scripts.ts @@ -28,12 +28,6 @@ export default function setup() { program .description('Export authorization scripts.') - .addOption( - new Option( - '-r, --realm ', - 'Specifies the realm to export from. Only the scripts from this realm will be exported.' - ) - ) .addOption( new Option( '-n, --script-name