bundles/vnstat: introduce, add to home.router
This commit is contained in:
parent
9fa3757a96
commit
88dd587fb4
4 changed files with 108 additions and 0 deletions
25
bundles/vnstat/metadata.py
Normal file
25
bundles/vnstat/metadata.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'vnstat': {},
|
||||
'vnstati': {},
|
||||
},
|
||||
},
|
||||
'vnstat': {
|
||||
'bandwidth': '1000',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def get_default_interface(metadata):
|
||||
interfaces = sorted(metadata.get('interfaces', {}).keys())
|
||||
|
||||
if len(interfaces):
|
||||
return {
|
||||
'vnstat': {
|
||||
'interface': interfaces[0],
|
||||
},
|
||||
}
|
||||
|
||||
return {}
|
Loading…
Add table
Add a link
Reference in a new issue