Skip to content

ignore command nesting in deploy rulebook#519

Closed
cmbtgl wants to merge 1 commit intoannetutil:mainfrom
cmbtgl:deploying_ignore_nesting
Closed

ignore command nesting in deploy rulebook#519
cmbtgl wants to merge 1 commit intoannetutil:mainfrom
cmbtgl:deploying_ignore_nesting

Conversation

@cmbtgl
Copy link
Copy Markdown

@cmbtgl cmbtgl commented Apr 15, 2026

Currently most of deploy rulebooks have a logic that commands from patch is not nested.

For example, huawei.deploy have dialogs for local-user commands on global level while in real deploy they is executed under aaa block.

Current logic works fine because there is no dialogs defined for aaa command in rulebook. But, if you add dialogs for aaa command to rulebook then all current global rules stops to match, because they have different depth. And to fix this rulebook should be changed from

aaa
    dialog: Question? ::: Y
local-user * password
    dialog: Question? ::: Y

to something like this

aaa
    dialog: Question? ::: Y

    local-user * password
       dialog: Question? ::: Y

to work properly. And newline between commands from different levels is a must to parse rulebook properly.

This PR makes deploy rulebook to ignore nesting and match commands in any block level.

@cmbtgl cmbtgl closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant