Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit a4327f9

Browse files
authored
molecule: recognize platform networks (#229)
1 parent 547abe4 commit a4327f9

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

f/molecule.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@
178178
],
179179
"title": "Network Mode"
180180
},
181+
"networks": {
182+
"items": {
183+
"$ref": "#/definitions/platform-network"
184+
},
185+
"markdownDescription": "Used by docker and podman drivers.",
186+
"title": "Networks",
187+
"type": "array"
188+
},
181189
"pkg_extras": {
182190
"title": "Pkg Extras",
183191
"type": "string"
@@ -423,6 +431,24 @@
423431
},
424432
"title": "VerifierModel",
425433
"type": "object"
434+
},
435+
"platform-network": {
436+
"properties": {
437+
"aliases": {
438+
"items": {
439+
"type": "string"
440+
},
441+
"type": "array"
442+
},
443+
"ipv4_address": {
444+
"type": "string"
445+
},
446+
"name": {
447+
"type": "string"
448+
}
449+
},
450+
"required": ["name"],
451+
"type": "object"
426452
}
427453
},
428454
"examples": ["molecule/*/molecule.yml"],
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
driver:
2+
name: docker
3+
platforms:
4+
- name: docker
5+
networks: # invalid, must be list of dictionaries
6+
- foo
7+
- bar

test/molecule/default/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ platforms:
5555
memory: 1024
5656
cpus: 2
5757
provider_raw_config_args: []
58+
networks: # used by docker/podman
59+
- name: foo
5860

5961
- name: ubi7
6062
hostname: ubi7

0 commit comments

Comments
 (0)