@axway/axway-central-cli 3.6.0 → 3.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,6 +78,7 @@ class SaasAgentValues {
78
78
  constructor() {
79
79
  _defineProperty(this, "frequencyDA", void 0);
80
80
  _defineProperty(this, "queueDA", void 0);
81
+ _defineProperty(this, "filterDA", void 0);
81
82
  _defineProperty(this, "frequencyTA", void 0);
82
83
  _defineProperty(this, "sampling", void 0);
83
84
  _defineProperty(this, "redaction", void 0);
@@ -86,6 +87,7 @@ class SaasAgentValues {
86
87
  this.frequencyDA = '';
87
88
  this.queueDA = false;
88
89
  this.frequencyTA = '';
90
+ this.filterDA = '';
89
91
  this.sampling = new Sampling();
90
92
  this.redaction = new Redaction();
91
93
  this.dataplaneConfig = new DataplaneConfig();
@@ -150,6 +152,7 @@ const SaasPrompts = {
150
152
  ACCESS_LOG_ARN: 'Enter the ARN for the Access Log that the Discovery will add and the Traceability will use',
151
153
  FULL_TRANSACTION_LOGGING: 'Do you want to enable Full Transaction Logging? Please note that CloudWatch costs would increase when Full Transaction Logging is enabled',
152
154
  DA_FREQUENCY: 'How often should the discovery run, leave blank for integrating in CI/CD process',
155
+ DA_FILTER: 'Please enter the filter conditions for discovery of API Services based on tags',
153
156
  TA_FREQUENCY: 'How often should the traffic collection run, leave blank for manual trigger only',
154
157
  QUEUE: 'Do you want to discover immediately after installation',
155
158
  SAMP_PERCENTAGE: 'Enter the percentage of transactions to sample',
@@ -358,6 +361,10 @@ const gatewayConnectivity = async installConfig => {
358
361
  default: _types.YesNo.No,
359
362
  choices: _types.YesNoChoices
360
363
  })) === _types.YesNo.Yes;
364
+ hostedAgentValues.filterDA = await (0, _basicPrompts.askInput)({
365
+ msg: SaasPrompts.DA_FILTER,
366
+ allowEmptyInput: true
367
+ });
361
368
  if (installConfig.switches.isTaEnabled) {
362
369
  console.log(_chalk.default.gray('\n00d00h00m format, where 30m = 30 minutes, 1h = 1 hour, 7d = 7 days, and 7d1h30m = 7 days 1 hour and 30 minutes. Minimum of 30m.'));
363
370
  hostedAgentValues.frequencyTA = await (0, _basicPrompts.askInput)({
@@ -426,7 +433,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
426
433
  }
427
434
 
428
435
  // create discovery agent resource
429
- installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Discovery Agent', dataplaneRes.name, awsAgentValues.frequencyDA, awsAgentValues.queueDA);
436
+ installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Discovery Agent', dataplaneRes.name, awsAgentValues.frequencyDA, awsAgentValues.queueDA, {}, awsAgentValues.filterDA);
430
437
  if (installConfig.switches.isTaEnabled) {
431
438
  // create traceability agent resource
432
439
  installConfig.centralConfig.taAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.ta, _types.AgentTypes.ta, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Traceability Agent', dataplaneRes.name, awsAgentValues.frequencyTA, false,
@@ -93,6 +93,7 @@ class SaasAgentValues {
93
93
  constructor() {
94
94
  _defineProperty(this, "frequencyDA", void 0);
95
95
  _defineProperty(this, "queueDA", void 0);
96
+ _defineProperty(this, "filterDA", void 0);
96
97
  _defineProperty(this, "frequencyTA", void 0);
97
98
  _defineProperty(this, "sampling", void 0);
98
99
  _defineProperty(this, "redaction", void 0);
@@ -100,6 +101,7 @@ class SaasAgentValues {
100
101
  _defineProperty(this, "centralConfig", void 0);
101
102
  this.frequencyDA = '';
102
103
  this.queueDA = false;
104
+ this.filterDA = '';
103
105
  this.frequencyTA = '';
104
106
  this.sampling = new Sampling();
105
107
  this.redaction = new Redaction();
@@ -168,6 +170,7 @@ const SaasPrompts = {
168
170
  EVENT_HUB_CONSUMER_GROUP: 'Enter the Azure Event Hub Consumer Group',
169
171
  // general prompts
170
172
  DA_FREQUENCY: 'How often should the discovery run, leave blank for integrating in CI/CD process',
173
+ DA_FILTER: 'Please enter the filter conditions for discovery of API Services based on tags',
171
174
  TA_FREQUENCY: 'How often should the traffic collection run, leave blank for manual trigger only',
172
175
  QUEUE: 'Do you want to discover immediately after installation',
173
176
  SAMP_PERCENTAGE: 'Enter the percentage of transactions to sample',
@@ -370,6 +373,10 @@ const gatewayConnectivity = async installConfig => {
370
373
  default: _types.YesNo.No,
371
374
  choices: _types.YesNoChoices
372
375
  })) === _types.YesNo.Yes;
376
+ hostedAgentValues.filterDA = await (0, _basicPrompts.askInput)({
377
+ msg: SaasPrompts.DA_FILTER,
378
+ allowEmptyInput: true
379
+ });
373
380
  if (installConfig.switches.isTaEnabled) {
374
381
  console.log(_chalk.default.gray('\n00d00h00m format, where 30m = 30 minutes, 1h = 1 hour, 7d = 7 days, and 7d1h30m = 7 days 1 hour and 30 minutes. Minimum of 30m.'));
375
382
  hostedAgentValues.frequencyTA = await (0, _basicPrompts.askInput)({
@@ -493,7 +500,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
493
500
  }
494
501
 
495
502
  // create discovery agent resource
496
- installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Discovery Agent', dataplaneRes.name, azureAgentValues.frequencyDA, azureAgentValues.queueDA);
503
+ installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Discovery Agent', dataplaneRes.name, azureAgentValues.frequencyDA, azureAgentValues.queueDA, {}, azureAgentValues.filterDA);
497
504
  if (installConfig.switches.isTaEnabled) {
498
505
  // create traceability agent resource
499
506
  installConfig.centralConfig.taAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.ta, _types.AgentTypes.ta, installConfig.centralConfig.ampcTeamName, _types.GatewayTypeToDataPlane[installConfig.gatewayType] + ' Traceability Agent', dataplaneRes.name, azureAgentValues.frequencyTA, false,
@@ -122,7 +122,7 @@ const createByResourceType = async (client, defsManager, name, resourceType, res
122
122
  return result.data.name;
123
123
  };
124
124
  exports.createByResourceType = createByResourceType;
125
- const createNewAgentResource = async (client, defsManager, envName, dataPlaneType, agentResource, agentType, owningTeam, agentName, dataPlaneName, frequency, queue, config) => {
125
+ const createNewAgentResource = async (client, defsManager, envName, dataPlaneType, agentResource, agentType, owningTeam, agentName, dataPlaneName, frequency, queue, config, filterDA) => {
126
126
  console.log(`Creating a new ${agentResource}, with data plane type: ${dataPlaneType}.`);
127
127
  // NOTE: only a first found set is used
128
128
  const defs = defsManager.findDefsByWord(agentType);
@@ -140,7 +140,8 @@ const createNewAgentResource = async (client, defsManager, envName, dataPlaneTyp
140
140
  frequency ? dataplane.frequency = frequency : null;
141
141
  queue ? agentResource === _types.AgentResourceKind.da ? dataplane.queueDiscovery = queue : dataplane.queueTrafficCollection = queue : null;
142
142
  config ? null : config = {
143
- owningTeam: owningTeam
143
+ owningTeam: owningTeam,
144
+ filter: dataPlaneType === _types.DataPlaneNames.AWS || _types.DataPlaneNames.AZURE ? filterDA : undefined
144
145
  };
145
146
  const result = await client.createResource({
146
147
  // @ts-ignore payload
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "3.6.0",
3
+ "version": "3.7.0-rc.1",
4
4
  "description": "Manage APIs, services and publish to the Amplify Marketplace",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {