libraries/resource_providers/api200/volume_template_provider.rb
def load_resource_with_associated_resources
        validate_required_properties(:storage_system, :storage_pool)
        storage_system_data = { credentials: { ip_hostname: @new_resource.storage_system }, name: @new_resource.storage_system }
        storage_system = load_resource(:StorageSystem, storage_system_data)
        storage_pool = load_resource(:StoragePool, name: @new_resource.storage_pool, storageSystemUri: storage_system['uri'])

        @item.set_storage_system(storage_system)
        @item['provisioning']['storagePoolUri'] = storage_pool['uri']
        @item['provisioning']['capacity'] = @item['provisioning']['capacity'].to_s if @item['provisioning'] && @item['provisioning']['capacity']
        @item.set_snapshot_pool(load_resource(:StoragePool, name: @new_resource.snapshot_pool, storageSystemUri: storage_system['uri'])) if @new_resource.snapshot_pool
      end
# Loads the VolumeTemplate with all the external resources (if needed)
Loads the VolumeTemplate with all the external resources (if needed)
Loads the VolumeTemplate with all the external resources ( if needed )
def load_resource_with_associated_resources
        validate_required_properties(:storage_system, :storage_pool)
        storage_system_data = { credentials: { ip_hostname: @new_resource.storage_system }, name: @new_resource.storage_system }
        storage_system = load_resource(:StorageSystem, storage_system_data)
        storage_pool = load_resource(:StoragePool, name: @new_resource.storage_pool, storageSystemUri: storage_system['uri'])
        @item.set_storage_system(storage_system)
        @item['provisioning']['storagePoolUri'] = storage_pool['uri']
        @item['provisioning']['capacity'] = @item['provisioning']['capacity'].to_s if @item['provisioning'] && @item['provisioning']['capacity']
        @item.set_snapshot_pool(load_resource(:StoragePool, name: @new_resource.snapshot_pool, storageSystemUri: storage_system['uri'])) if @new_resource.snapshot_pool
      end
def load_resource_with_associated_resources validate_required_properties ( :storage_system , :storage_pool ) storage_system_data = { credentials : { ip_hostname : @new_resource . storage_system } , name : @new_resource . storage_system } storage_system = load_resource ( :StorageSystem , storage_system_data ) storage_pool = load_resource ( :StoragePool , name : @new_resource . storage_pool , storageSystemUri : storage_system [ 'uri' ] ) @item . set_storage_system ( storage_system ) @item [ 'provisioning' ] [ 'storagePoolUri' ] = storage_pool [ 'uri' ] @item [ 'provisioning' ] [ 'capacity' ] = @item [ 'provisioning' ] [ 'capacity' ] . to_s if @item [ 'provisioning' ] && @item [ 'provisioning' ] [ 'capacity' ] @item . set_snapshot_pool ( load_resource ( :StoragePool , name : @new_resource . snapshot_pool , storageSystemUri : storage_system [ 'uri' ] ) ) if @new_resource . snapshot_pool end
Loads the VolumeTemplate with all the external resources (if needed)
Loads the VolumeTemplate with all the external resources ( if needed )