Skip to content

Commit

Permalink
remove otel param
Browse files Browse the repository at this point in the history
  • Loading branch information
chaudharysaket committed Aug 13, 2024
1 parent 849b85e commit e3b1d06
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions newrelic_lambda_cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,18 @@ def disable_integration(self, linked_account_id, provider_slug, service_slug):
return res


def validate_gql_credentials(input, otel: bool = False):
if otel:
assert isinstance(input, (OtelIngestionInstall, OtelIngestionUpdate))
else:
assert isinstance(input, (IntegrationInstall, IntegrationUpdate, LayerInstall))
def validate_gql_credentials(input):

assert isinstance(
input,
(
IntegrationInstall,
IntegrationUpdate,
LayerInstall,
OtelIngestionInstall,
OtelIngestionUpdate,
),
)

try:
return NewRelicGQL(input.nr_account_id, input.nr_api_key, input.nr_region)
Expand Down
2 changes: 1 addition & 1 deletion newrelic_lambda_cli/cli/otel_ingestions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def install(ctx, **kwargs):
permissions.ensure_integration_install_permissions(input)

click.echo("Validating New Relic credentials")
gql_client = api.validate_gql_credentials(input, otel=True)
gql_client = api.validate_gql_credentials(input)

click.echo("Retrieving integration license key")
nr_license_key = api.retrieve_license_key(gql_client)
Expand Down

0 comments on commit e3b1d06

Please sign in to comment.