natesales / pathvector

Declarative routing platform that automates BGP route optimization and control plane configuration with secure and repeatable routing policy.
https://pathvector.io
MIT License
206 stars 26 forks source link

[Request] Restart Command #219

Open rapdodge opened 5 months ago

rapdodge commented 5 months ago

Hello there, Is that possible to having command like pathvector restart xxx?

Why I'm requesting this? Because we already have pathvector status which is pretty print from birdc show protocol

With pathvector restart I was hoping to make restarting session that printed on pathvector status will be easier, rather than run birdc show protocol, searching the session name, and then run birdc restart xxx

Thanks!

Dennis-de-Houx commented 3 months ago

Hello rapdodge,

Would something like this help you out:

I would be happy (when I have a bit of time) to make this and send it in for a pull request.

rapdodge commented 3 months ago

Hello rapdodge,

Would something like this help you out:

  • "pathvector protocol --restart [protocol]"
  • "pathvector protocol --reload [protocol]"
  • "pathvector protocol --enable [protocol]"
  • "pathvector protocol --disable [protocol]"

I would be happy (when I have a bit of time) to make this and send it in for a pull request.

Hello Dennis,

That would be great idea ☺️ But, I think without -- is better (?)

So, it would be like

pathvector protocol (type (restart, enable, disable, etc)) [protocol]

Thanks,

Dennis-de-Houx commented 3 months ago

Hello rapdodge,

I have made a beta version, will do some debugging later on the day/night and then do a pull request (PR).

I have the following for command line:

pathvector protocol <(r)estart|re(l)oad|(e)nable|(d)isable> <protocol name> -m <message>

Message is only used for custom message on enable/disable with a default disable message "Protocol manually disabled by pathvector"

Example

pathvector protocol disable TRANSIT1_V6 --message "Cable is damaged"

and the shorthand version

pathvector p d TRANSIT1_V6 -m "Cable is damaged"
rapdodge commented 3 months ago

Hello rapdodge,

I have made a beta version, will do some debugging later on the day/night and then do a pull request (PR).

I have the following for command line:

pathvector protocol <(r)estart|re(l)oad|(e)nable|(d)isable> <protocol name> -m <message>

Message is only used for custom message on enable/disable with a default disable message "Protocol manually disabled by pathvector"

Example

pathvector protocol disable TRANSIT1_V6 --message "Cable is damaged"

and the shorthand version

pathvector p d TRANSIT1_V6 -m "Cable is damaged"

That's nice! Looking forward into it 😁

Dennis-de-Houx commented 3 months ago

Pull Request has been made