File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,11 @@ def prepare_storage_args(self):
218
218
args = {}
219
219
220
220
args ['type' ] = self .type
221
- args ['content' ] = ',' .join (self .content )
221
+ if self .content is not None and len (self .content ) > 0 :
222
+ args ['content' ] = ',' .join (self .content )
223
+ else :
224
+ # PVE uses "none" to represent when no content types are selected
225
+ args ['content' ] = 'none'
222
226
if self .nodes is not None :
223
227
args ['nodes' ] = ',' .join (self .nodes )
224
228
if self .disable is not None :
@@ -273,7 +277,8 @@ def modify_storage(self):
273
277
274
278
for key in new_storage :
275
279
if key == 'content' :
276
- if set (self .content ) != set (lookup .get ('content' , '' ).split (',' )):
280
+ if set (new_storage ['content' ].split (',' )) \
281
+ != set (lookup .get ('content' , '' ).split (',' )):
277
282
updated_fields .append (key )
278
283
staged_storage [key ] = new_storage [key ]
279
284
elif key == 'monhost' :
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ pve_storages:
63
63
disable: yes
64
64
content: [ "images" ]
65
65
path: /tmp/fakedir
66
+ - name: no-content-dir
67
+ type: dir
68
+ path: /tmp/fakedir2
66
69
pve_zfs_create_volumes:
67
70
- testpool/zfs2
68
71
pve_ceph_osds:
You can’t perform that action at this time.
0 commit comments