Got it

Python Script event-action" interface down

Created: Aug 27, 2021 08:57:48Latest reply: Aug 27, 2021 11:04:35 203 3 1 0 0
  Rewarded HiCoins: 0 (problem resolved)


Hello, everyone,


I would like to create a Python scrip which evaluates port down / up traps. If a port goes down, another designated port should go up.


I have a script for an alcatel lucent switch here. I'm not sure which trap parameters have to be entered here for a huawei switch.




Python Script


Featured Answers

Recommended answer

chenhui
Admin Created Aug 27, 2021 11:04:35

Hello,
If I understand your purpose, and the script code (error log from the Alcatel lucent switch) correctly, your script evaluates the member interfaces of an aggregated interface, if the one member interface turns down, and one standby interface turns up as expected, the script print the preset information.
Since I don't know the rest part of your code, and I don't use the getopt module, what's more, I'm not familiar with the Alcatel lucent switchs' logs, so, I cannot determine which part of the characters should I provide as the reference of your script.
As instead, I can provide you the logs of the eth-trunk, please refer to https://support.huawei.com/hedex/hdx.do?docid=EDOC1100126530&id=EN-US_CONCEPT_0176888230&lang=en
Please find the essential part from the logs.
If you have any further questions, please feel free to let me know.
View more
  • x
  • convention:

little_fish
little_fish Created Sep 18, 2021 06:15:51 (0) (0)
 
All Answers
DDSN
DDSN Admin Created Aug 27, 2021 08:59:44

Hi Stanislav,
Please wait patiently. Our engineers are looking for answers to your questions.
View more
  • x
  • convention:

Hello,
If I understand your purpose, and the script code (error log from the Alcatel lucent switch) correctly, your script evaluates the member interfaces of an aggregated interface, if the one member interface turns down, and one standby interface turns up as expected, the script print the preset information.
Since I don't know the rest part of your code, and I don't use the getopt module, what's more, I'm not familiar with the Alcatel lucent switchs' logs, so, I cannot determine which part of the characters should I provide as the reference of your script.
As instead, I can provide you the logs of the eth-trunk, please refer to https://support.huawei.com/hedex/hdx.do?docid=EDOC1100126530&id=EN-US_CONCEPT_0176888230&lang=en
Please find the essential part from the logs.
If you have any further questions, please feel free to let me know.
View more
  • x
  • convention:

little_fish
little_fish Created Sep 18, 2021 06:15:51 (0) (0)
 

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.