This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
Application
John E. Vincent edited this page Mar 19, 2011
·
2 revisions
An application is a similar to a service. An application is primarly a construct for grouping configuration elements but and it does have its own status
attribute. Configuration elements are NOT required for an Application entry.
- Name string, unique
- Configurations - set of Configuration ids
You can see the draft API specifications here: Draft Configuration API
>> a = Noah::Application.create(:name => 'myotherapplication')
=> #<Noah::Application:2 created_at="2011-01-23 11:33:02 UTC" updated_at="2011-01-23 11:33:02 UTC" name="myotherapplication">
>> a.valid?
=> true
>> a.save
=> #<Noah::Application:2 created_at="2011-01-23 11:33:02 UTC" updated_at="2011-01-23 11:33:05 UTC" name="myotherapplication">
You can also add configurations at the same time:
>> a = Noah::Application.create(:name => 'myjavaapp')
=> #<Noah::Application:1 created_at="2011-01-23 11:37:01 UTC" updated_at="2011-01-23 11:37:01 UTC" name="myjavaapp">
>> if a.save
ar/tmp/java', :application => a)ration.create(:name => 'java_io_tmpdir', :format => 'string', :body => '/v
>> end
=> false
>> a
=> #<Noah::Application:1 created_at="2011-01-23 11:37:01 UTC" updated_at="2011-01-23 11:37:37 UTC" name="myjavaapp">
>> a.configurations
=> #<Set (Noah::Configuration): ["1"]>
>> a.configurations[1]
=> #<Noah::Configuration:1 created_at="2011-01-23 11:37:37 UTC" updated_at="2011-01-23 11:37:37 UTC" name="java_io_tmpdir" format="string" body="/var/tmp/java" application_id="1">
>>