Firewall functions

This commit is contained in:
Kloadut 2012-10-14 21:12:21 +02:00
parent b22a7b97d2
commit 5a4f9c3932

View file

@ -434,14 +434,57 @@ action_map = {
},
}
},
#############################
# Monitor #
#############################
'monitor' : {
'category_help' : _("Monitoring functions"),
'actions' : {}
},
#############################
# Firewall #
#############################
'firewall' : {
'category_help' : _("Manage firewall rules"),
'actions' : {
'list' : {
'action_help' : _("List all firewall rules"),
'connections' : ['firewall'],
},
'allow' : {
'action_help' : _("Allow connection port/protocol"),
'connections' : ['firewall'],
'arguments' : {
'port' : {
'help' : _("Port to open"),
},
'protocol' : {
'help' : _("Protocol associated with port"),
'choices' : ['UDP', 'TCP', 'Both'],
},
'name' : {
'help' : _("Reference name of the rule"),
},
}
},
'disallow' : {
'action_help' : _("Disallow connection"),
'connections' : ['firewall'],
'arguments' : {
'name' : {
'help' : _("Reference name of the rule to delete"),
},
}
},
}
},
#############################
# Tools #
#############################
'tools' : {
'category_help' : _("Specific tools"),
'actions' : {}
}
},
}
def parse_dict(action_map):