Skip to content

Commit

Permalink
isRpc isAction isNotification
Browse files Browse the repository at this point in the history
  • Loading branch information
Siva Sivakumar committed Jun 26, 2024
1 parent 97f1424 commit d02ed90
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/app/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ type generatedPath struct {
IsState bool `json:"is-state,omitempty"`
Namespace string `json:"namespace,omitempty"`
FeatureList []string `json:"if-features,omitempty"`
Rpc bool `json:"rpc,omitempty"`
Action bool `json:"action,omitempty"`
Notification bool `json:"notification,omitempty"`
IsNotification bool `json:"is-notification,omitempty"`
IsRpc bool `json:"is-rpc,omitempty"`
IsAction bool `json:"is-action,omitempty"`
}

func (a *App) PathCmdRun(d, f, e []string, pgo pathGenOpts) error {
Expand Down Expand Up @@ -390,15 +390,15 @@ func (a *App) generatePath(entry *yang.Entry, pType string) *generatedPath {

// Support for Notification
if len(entry.Extra["notification"]) == 1 {
gp.Notification = true
gp.IsNotification = true
}
// Support for RPC
if len(entry.Extra["rpc"]) == 1 {
gp.Rpc = true
gp.IsRpc = true
}
// Support for Action
if len(entry.Extra["action"]) == 1 {
gp.Action = true
gp.IsAction = true
}

gp.Description = entry.Description
Expand Down

0 comments on commit d02ed90

Please sign in to comment.