Project

General

Profile

« Previous | Next » 

Revision 611f5bff

Added by Amos Benari over 11 years ago

  • ID 611f5bff49c1f06ae9ad0dd42b7566df9a02af2f

Add organization and location to foreman.

This feature allows foreman to provide multi location, multi tenant and
multi organizations capablities.

the idea is that resources within foreman (e.g. hosts, subnets, users,
environments etc) can belong to one or more locations and organization,
effectivily hidding resources from users.

Organization may contain multiple locations, and Locations can belong
to multiple Organization, this is an extermily flexiable design,
however, it is up to the user to allocate the resources across the
organizations and locations.

When creating new hosts, the resources that can be consumed are only
resources in which exists in both the currently used organization and location.

fixes #1578
fixes #1593

View differences:

test/unit/domain_test.rb
assert_match /is used by/, @domain.errors.full_messages.join("\n")
end
test "domain can be assigned to locations" do
location1 = Location.create :name => "Zurich"
assert location1.save!
location2 = Location.create :name => "Switzerland"
assert location2.save!
domain = Domain.create :name => "test.net"
domain.locations = []
domain.locations.push location1
domain.locations.push location2
assert domain.save!
end
#I must find out how to create a fact_name inside of fact_value
# test "should counts how many times a fact value exists in this domain" do

Also available in: Unified diff