1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-17 09:21:32 +00:00

Move modules and module_utils unit tests to correct place (#81)

* Move modules and module_utils unit tests to correct place.

* Update ignore.txt

* Fix imports.

* Fix typos.

* Fix more typos.
This commit is contained in:
Felix Fontein 2020-03-31 10:42:38 +02:00 committed by GitHub
parent ab3c2120fb
commit be191cce6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1170 changed files with 732 additions and 751 deletions

View file

@ -0,0 +1,212 @@
{
"meta": {
"prefix": "ansible",
"namespace": "http://example.com/ansible",
"types": {
},
"keypath": "/ansible:action/complex"
},
"data": {
"kind": "action",
"mandatory": true,
"name": "complex",
"qname": "ansible:complex",
"access": {
"read": false,
"create": false,
"execute": true,
"update": false,
"delete": false
},
"children": [
{
"kind": "leaf",
"is_action_input": true,
"name": "number",
"qname": "ansible:number",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"type": {
"primitive": true,
"name": "uint8"
}
},
{
"kind": "container",
"is_action_input": true,
"mandatory": true,
"name": "ansible",
"qname": "ansible:ansible",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"children": [
{
"kind": "choice",
"cases": [
{
"kind": "case",
"name": "version",
"children": [
{
"kind": "leaf",
"is_action_input": true,
"name": "version",
"qname": "ansible:version",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
}
}
]
},
{
"kind": "case",
"name": "release",
"children": [
{
"kind": "container",
"is_action_input": true,
"mandatory": true,
"name": "release",
"qname": "ansible:release",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"children": [
{
"kind": "leaf",
"is_action_input": true,
"name": "major",
"qname": "ansible:major",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"type": {
"primitive": true,
"name": "uint8"
}
},
{
"kind": "leaf",
"is_action_input": true,
"name": "minor",
"qname": "ansible:minor",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"type": {
"primitive": true,
"name": "uint8"
}
}
]
}
]
}
],
"name": "version-releae-choice"
}
]
},
{
"kind": "choice",
"cases": [
{
"kind": "case",
"name": "version",
"children": [
{
"kind": "list",
"min_elements": 0,
"name": "version",
"max_elements": "unbounded",
"qname": "ansible:version",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"mandatory": true,
"children": [
{
"kind": "leaf",
"name": "name",
"qname": "ansible:name",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
},
"is_action_output": true
}
],
"is_action_output": true
}
]
},
{
"kind": "case",
"name": "release",
"children": [
{
"kind": "leaf",
"name": "release",
"qname": "ansible:release",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
},
"is_action_output": true
}
]
}
],
"name": "version-release-choice"
}
]
}
}

View file

@ -0,0 +1,20 @@
{
"l3vpn:vpn": {
"l3vpn": [
{
"name": "company",
"route-distinguisher": 999,
"endpoint": [
{
"id": "branch-office1",
"ce-device": "ce6",
"ce-interface": "GigabitEthernet0/12",
"ip-network": "10.10.1.0/24",
"bandwidth": 12000000,
"as-number": 65101
}
]
}
]
}
}

View file

@ -0,0 +1,46 @@
{
"changes": [
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-device",
"old": "",
"value": "ce6",
"op": "value_set"
},
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ip-network",
"old": "",
"value": "10.10.1.0/24",
"op": "value_set"
},
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/as-number",
"old": "",
"value": "65101",
"op": "value_set"
},
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-interface",
"old": "",
"value": "GigabitEthernet0/12",
"op": "value_set"
},
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/bandwidth",
"old": "",
"value": "12000000",
"op": "value_set"
},
{
"path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}",
"old": "",
"value": "",
"op": "created"
},
{
"path": "/l3vpn:vpn/l3vpn{company}",
"old": "",
"value": "",
"op": "modified"
}
]
}

View file

@ -0,0 +1,28 @@
{
"meta": {
"prefix": "ncs",
"namespace": "http://tail-f.com/ns/ncs",
"types": {
},
"keypath": "/ncs:devices/device{ce0}/description"
},
"data": {
"info": {
"string": "Free form textual description"
},
"kind": "leaf",
"name": "description",
"qname": "ncs:description",
"access": {
"read": true,
"create": true,
"execute": false,
"update": true,
"delete": true
},
"type": {
"primitive": true,
"name": "string"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"meta": {"prefix": "l3vpn", "namespace": "http://com/example/l3vpn", "types": {}, "keypath": "/l3vpn:vpn/l3vpn/endpoint"}, "data": {"kind": "list", "leafref_groups": [["ce-device"]], "min_elements": 0, "name": "endpoint", "max_elements": "unbounded", "qname": "l3vpn:endpoint", "children": [{"info": {"string": "Endpoint identifier"}, "kind": "key", "mandatory": true, "name": "id", "qname": "l3vpn:id", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ce-device", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:ce-device", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_target": "/ncs:devices/device/name", "is_leafref": true}, {"kind": "leaf", "mandatory": true, "name": "ce-interface", "qname": "l3vpn:ce-interface", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ip-network", "qname": "l3vpn:ip-network", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "ip-prefix"}}, {"info": {"string": "Bandwidth in bps"}, "kind": "leaf", "mandatory": true, "name": "bandwidth", "qname": "l3vpn:bandwidth", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"info": {"string": "CE Router as-number"}, "kind": "leaf", "name": "as-number", "qname": "l3vpn:as-number", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "uint32"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["id"], "mandatory": true, "leafrefGroups": [["ce-device"]]}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,178 @@
{
"meta": {
"prefix": "ncs",
"namespace": "http://tail-f.com/ns/ncs",
"types": {
"http://tail-f.com/ns/ncs:outformat2": [
{
"name": "http://tail-f.com/ns/ncs:outformat2",
"enumeration": [
{
"info": "NCS CLI curly bracket format.",
"label": "cli"
},
{
"info": "NETCONF XML edit-config format, i.e., the edit-config that\nwould be applied locally (at NCS) to get a config\nthat is equal to that of the managed device.",
"label": "xml"
}
]
},
{
"name": "string"
}
]
},
"keypath": "/ncs:devices/device{ce0}/sync-from"
},
"data": {
"info": {
"string": "Synchronize the config by pulling from the device"
},
"kind": "action",
"mandatory": true,
"name": "sync-from",
"qname": "ncs:sync-from",
"access": {
"read": false,
"create": false,
"execute": true,
"update": false,
"delete": false
},
"children": [
{
"kind": "container",
"is_action_input": true,
"name": "dry-run",
"presence": true,
"qname": "ncs:dry-run",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"children": [
{
"info": {
"string": "Report what would be done towards CDB, without\nactually doing anything."
},
"kind": "leaf",
"is_action_input": true,
"name": "outformat",
"qname": "ncs:outformat",
"access": {
"read": false,
"create": false,
"execute": false,
"update": true,
"delete": false
},
"type": {
"namespace": "http://tail-f.com/ns/ncs",
"name": "outformat2"
}
}
]
},
{
"kind": "choice",
"cases": [
{
"kind": "case",
"name": "result",
"children": [
{
"kind": "leaf",
"name": "result",
"qname": "ncs:result",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "boolean"
},
"is_action_output": true
}
]
},
{
"kind": "case",
"name": "result-xml",
"children": [
{
"kind": "leaf",
"name": "result-xml",
"is_cli_preformatted": true,
"qname": "ncs:result-xml",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
},
"is_action_output": true
}
]
},
{
"kind": "case",
"name": "cli",
"children": [
{
"kind": "leaf",
"name": "cli",
"is_cli_preformatted": true,
"qname": "ncs:cli",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
},
"is_action_output": true
}
]
}
],
"name": "outformat"
},
{
"info": {
"string": "If present, contains additional information about the result."
},
"kind": "leaf",
"name": "info",
"qname": "ncs:info",
"access": {
"read": false,
"create": false,
"execute": false,
"update": false,
"delete": false
},
"type": {
"primitive": true,
"name": "string"
},
"is_action_output": true
}
]
}
}

View file

@ -0,0 +1,10 @@
{
"tailf-ncs:devices": {
"device": [
{
"name": "ce0",
"description": "Example Device"
}
]
}
}