@@ -34,6 +34,9 @@ def create
3434 xml . send ( resource [ :safe_dirs ] . join ( ' ' ) )
3535 end if resource [ :safe_dirs ]
3636 xml . DS_MAD resource [ :dm ]
37+ xml . BRIDGE_LIST resource [ :bridgelist ]
38+ xml . CEPH_HOST resource [ :cephhost ]
39+ xml . STAGING_DIR resource [ :stagingdir ]
3740 xml . BASE_PATH do
3841 resource [ :basepath ]
3942 end if resource [ :basepath ]
@@ -60,14 +63,17 @@ def self.instances
6063 datastores = Nokogiri ::XML ( onedatastore ( 'list' , '-x' ) ) . root . xpath ( '/DATASTORE_POOL/DATASTORE' ) . map
6164 datastores . collect do |datastore |
6265 new (
63- :name => datastore . xpath ( './NAME' ) . text ,
64- :ensure => :present ,
65- :type => datastore . xpath ( './TEMPLATE/TYPE' ) . text ,
66- :dm => ( datastore . xpath ( './TEMPLATE/DS_MAD' ) . text unless datastore . xpath ( './TEMPLATE/DS_MAD' ) . nil? ) ,
67- :safe_dirs => ( datastore . xpath ( './TEMPLATE/SAFE_DIRS' ) . text unless datastore . xpath ( './TEMPLATE/SAFE_DIRS' ) . nil? ) ,
68- :tm => ( datastore . xpath ( './TEMPLATE/TM_MAD' ) . text unless datastore . xpath ( './TEMPLATE/TM_MAD' ) . nil? ) ,
69- :basepath => ( datastore . xpath ( './TEMPLATE/BASE_PATH' ) . text unless datastore . xpath ( './TEMPLATE/BASE_PATH' ) . nil? ) ,
70- :disktype => { 0 => 'file' , 1 => 'block' , 2 => 'rdb' } [ datastore . xpath ( './DISK_TYPE' ) . text ]
66+ :name => datastore . xpath ( './NAME' ) . text ,
67+ :ensure => :present ,
68+ :type => datastore . xpath ( './TEMPLATE/TYPE' ) . text ,
69+ :dm => ( datastore . xpath ( './TEMPLATE/DS_MAD' ) . text unless datastore . xpath ( './TEMPLATE/DS_MAD' ) . nil? ) ,
70+ :safe_dirs => ( datastore . xpath ( './TEMPLATE/SAFE_DIRS' ) . text unless datastore . xpath ( './TEMPLATE/SAFE_DIRS' ) . nil? ) ,
71+ :tm => ( datastore . xpath ( './TEMPLATE/TM_MAD' ) . text unless datastore . xpath ( './TEMPLATE/TM_MAD' ) . nil? ) ,
72+ :basepath => ( datastore . xpath ( './TEMPLATE/BASE_PATH' ) . text unless datastore . xpath ( './TEMPLATE/BASE_PATH' ) . nil? ) ,
73+ :bridgelist => ( datastore . xpath ( './TEMPLATE/BRIDGE_LIST' ) . text unless datastore . xpath ( './TEMPLATE/BRIDGE_LIST' ) . nil? ) ,
74+ :cephhost => ( datastore . xpath ( './TEMPLATE/CEPH_HOST' ) . text unless datastore . xpath ( './TEMPLATE/CEPH_HOST' ) . nil? ) ,
75+ :stagingdir => ( datastore . xpath ( './TEMPLATE/STAGING_DIR' ) . text unless datastore . xpath ( './TEMPLATE/STAGING_DIR' ) . nil? ) ,
76+ :disktype => { '0' => 'file' , '1' => 'block' , '3' => 'rbd' } [ datastore . xpath ( './DISK_TYPE' ) . text ]
7177 )
7278 end
7379 end
0 commit comments