From aa717c5ec0dcde83f86ff9d2cebf6fd11d4202d2 Mon Sep 17 00:00:00 2001 From: srinandan Date: Sat, 3 Jul 2021 13:52:52 -0700 Subject: [PATCH] disable dist trace --- cmd/env/disabletracecfg.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cmd/env/disabletracecfg.go diff --git a/cmd/env/disabletracecfg.go b/cmd/env/disabletracecfg.go new file mode 100644 index 00000000..28878cff --- /dev/null +++ b/cmd/env/disabletracecfg.go @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package env + +import ( + "github.com/spf13/cobra" + "github.com/srinandan/apigeecli/apiclient" + environments "github.com/srinandan/apigeecli/client/env" +) + +//DisableTraceConfigCmd to manage tracing of apis +var DisableTraceConfigCmd = &cobra.Command{ + Use: "disable", + Short: "Disable Distributed Trace config for the environment", + Long: "Disable Distributed Trace config for the environment", + Args: func(cmd *cobra.Command, args []string) (err error) { + apiclient.SetApigeeEnv(environment) + return apiclient.SetApigeeOrg(org) + }, + RunE: func(cmd *cobra.Command, args []string) (err error) { + _, err = environments.DisableTraceConfig() + return + }, +}