libraries/resource_providers/api300/c7000/scope_provider.rb
def build_resource_list(op = :add)
          retrieved_resources = []
          context = op == :add ? @new_resource.add : @new_resource.remove
          context.each do |resource_name, values|
            values.each do |value|
              retrieved_resource = load_resource(resource_name, value)
              is_scope_present = retrieved_resource['scopeUris'].include?(@item['uri'])
              next if (op == :add && is_scope_present) || (op == :remove && !is_scope_present)
              retrieved_resources.push(retrieved_resource)
            end
          end
          retrieved_resources
        end
# Retrieves the resources listed on the add or remove fields and creates an array with their instances
# @return [Array] containing the instances of all resources to be added or removed
Retrieves the resources listed on the add or remove fields and creates an array with their instances
Retrieves the resources listed on the add or remove fields and creates an array with their instances
def build_resource_list(op = :add)
          retrieved_resources = []
          context = op == :add ? @new_resource.add : @new_resource.remove
          context.each do |resource_name, values|
            values.each do |value|
              retrieved_resource = load_resource(resource_name, value)
              is_scope_present = retrieved_resource['scopeUris'].include?(@item['uri'])
              next if (op == :add && is_scope_present) || (op == :remove && !is_scope_present)
              retrieved_resources.push(retrieved_resource)
            end
          end
          retrieved_resources
        end
def build_resource_list ( op = :add ) retrieved_resources = [ ] context = op == :add ? @new_resource . add : @new_resource . remove context . each do | resource_name , values | values . each do | value | retrieved_resource = load_resource ( resource_name , value ) is_scope_present = retrieved_resource [ 'scopeUris' ] . include? ( @item [ 'uri' ] ) next if ( op == :add && is_scope_present ) || ( op == :remove && ! is_scope_present ) retrieved_resources . push ( retrieved_resource ) end end retrieved_resources end
Retrieves the resources listed on the add or remove fields and creates an array with their instances
Retrieves the resources listed on the add or remove fields and creates an array with their instances
containing the instances of all resources to be added or removed
containing the instances of all resources to be added or removed
Array
op