+_OPTIONAL_ALSO = False
+_SUBNET = ""
+
+def get_volumes(layer):
+ """Create a list with volumes to mount in the container for given layer
+ """
+ mypath = Path(__file__).absolute()
+ volume_yaml = yaml.safe_load(mypath.parents[0].joinpath("volumes.yaml").open())
+
+ if layer not in volume_yaml['layers']:
+ return ''
+ if volume_yaml['layers'][layer] is None:
+ return ''
+
+ volume_list = ''
+ for vol in volume_yaml['layers'][layer]:
+ if volume_yaml['volumes'][vol]['local'] == '':
+ continue
+ volume_list = (volume_list + ' -v ' +
+ volume_yaml['volumes'][vol]['local'] + ':' +
+ volume_yaml['volumes'][vol]['target'])
+ return volume_list
+
+