From 813ec656d98bf8b6d18a3b9247497e4e39345e59 Mon Sep 17 00:00:00 2001 From: Wen Bo Li <50884368+wenovus@users.noreply.github.com> Date: Fri, 26 Jun 2020 15:32:24 -0700 Subject: [PATCH] Remove useless gnmi import flag (#407) * Remove useless gnmi import flag --- ypathgen/generator/generator.go | 2 -- ypathgen/pathgen.go | 4 ---- 2 files changed, 6 deletions(-) diff --git a/ypathgen/generator/generator.go b/ypathgen/generator/generator.go index d145edc43..576ad51e3 100644 --- a/ypathgen/generator/generator.go +++ b/ypathgen/generator/generator.go @@ -39,7 +39,6 @@ var ( preferOperationalState = flag.Bool("prefer_operational_state", false, "If set to true, state (config false) fields in the YANG schema are preferred over intended config leaves when building paths. This flag is only valid when exclude_state=false.") fakeRootName = flag.String("fakeroot_name", "device", "The name of the fake root entity. This name will be capitalized for exporting.") schemaStructPath = flag.String("schema_struct_path", "", "The import path to use for ygen-generated schema structs. This should only be specified if the generated path structs are to reside in a different package.") - gnmiProtoPath = flag.String("gnmi_proto_path", genutil.GoDefaultGNMIImportPath, "The import path to use for gNMI's proto package.") ygotImportPath = flag.String("ygot_path", genutil.GoDefaultYgotImportPath, "The import path to use for ygot.") listBuilderKeyThreshold = flag.Uint("list_builder_key_threshold", 0, "The threshold equal or over which the builder API is used for key population. 0 means infinity.") skipEnumDedup = flag.Bool("skip_enum_deduplication", false, "If set to true, all leaves of type enumeration will have a unique enum output for them, rather than sharing a common type (default behaviour).") @@ -100,7 +99,6 @@ func main() { PackageName: *packageName, GoImports: ypathgen.GoImports{ SchemaStructPkgPath: *schemaStructPath, - GNMIProtoPath: *gnmiProtoPath, YgotImportPath: *ygotImportPath, }, PreferOperationalState: *preferOperationalState, diff --git a/ypathgen/pathgen.go b/ypathgen/pathgen.go index 04034b1ab..3d8e1096a 100644 --- a/ypathgen/pathgen.go +++ b/ypathgen/pathgen.go @@ -72,7 +72,6 @@ func NewDefaultConfig(schemaStructPkgPath string) *GenConfig { PackageName: defaultPathPackageName, GoImports: GoImports{ SchemaStructPkgPath: schemaStructPkgPath, - GNMIProtoPath: genutil.GoDefaultGNMIImportPath, YgotImportPath: genutil.GoDefaultYgotImportPath, }, FakeRootName: defaultFakeRootName, @@ -140,9 +139,6 @@ type GoImports struct { // is used to get the enum and union type names used as the list key // for calling a list path accessor. SchemaStructPkgPath string - // GNMIProtoPath specifies the path to the generated gNMI protobuf, which - // is used to store the catalogue entries for generated modules. - GNMIProtoPath string // YgotImportPath specifies the path to the ygot library that should be used // in the generated code. YgotImportPath string