Skip to content

Commit

Permalink
Merge 6e21655 into 93a2a57
Browse files Browse the repository at this point in the history
  • Loading branch information
okraits committed Jul 5, 2018
2 parents 93a2a57 + 6e21655 commit ddfd5df
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/source/backends/openwrt.rst
Expand Up @@ -300,11 +300,15 @@ Interface object extensions
In addition to the default *NetJSON Interface object options*, the ``OpenWrt`` backend
also supports the following custom options for every type of interface:

+--------------+---------+-----------------------------------------------+
| key name | type | allowed values |
+==============+=========+===============================================+
| ``network`` | string | logical interface name (UCI specific) |
+--------------+---------+-----------------------------------------------+
+--------------+---------+-----------------------------------------------------+
| key name | type | allowed values |
+==============+=========+=====================================================+
| ``network`` | string | logical interface name (UCI specific) |
+--------------+---------+-----------------------------------------------------+
| ``username`` | string | username for authentication in protocols like pppoe |
+--------------+---------+-----------------------------------------------------+
| ``password`` | string | password for authentication in protocols like pppoe |
+--------------+---------+-----------------------------------------------------+

In the following sections some examples of the most common use cases are shown.

Expand Down
52 changes: 52 additions & 0 deletions netjsonconfig/backends/openwrt/schema.py
Expand Up @@ -114,6 +114,45 @@
}
]
},
"dialup_interface": {
"title": "Dialup interface",
"required": [
"dialup_members"
],
"allOf": [
{
"properties": {
"type": {
"type": "string",
"enum": ["dialup"],
"propertyOrder": 1
},
"username": {
"type": "string",
"description": "username for authentication in protocols like PPPoE",
"propertyOrder": 4,
},
"password": {
"type": "string",
"description": "password for authentication in protocols like PPPoE",
"propertyOrder": 5,
},
"dialup_members": {
"type": "array",
"title": "Dialup Members",
"uniqueItems": True,
"propertyOrder": 8,
"items": {
"title": "dialup interface",
"type": "string",
"$ref": "#/definitions/interface_settings/properties/name"
}
}
}
},
{"$ref": "#/definitions/interface_settings"},
]
},
"base_radio_settings": {
"properties": {
"driver": {
Expand Down Expand Up @@ -176,6 +215,19 @@
}
}
},
"interfaces": {
"type": "array",
"title": "Interfaces",
"uniqueItems": True,
"additionalItems": True,
"propertyOrder": 2,
"items": {
"title": "Interface",
"oneOf": [
{"$ref": "#/definitions/dialup_interface"}
]
}
},
"routes": {
"items": {
"properties": {
Expand Down

0 comments on commit ddfd5df

Please sign in to comment.