Class: Vagrant::Smartos::Zones::Util::ZoneProject
- Inherits:
-
Object
- Object
- Vagrant::Smartos::Zones::Util::ZoneProject
- Includes:
- GlobalZone::Helper
- Defined in:
- lib/vagrant/smartos/zones/util/zone_project.rb
Instance Attribute Summary collapse
-
#machine ⇒ Object
readonly
Returns the value of attribute machine.
-
#zone ⇒ Object
readonly
Returns the value of attribute zone.
Instance Method Summary collapse
- #create(project, users, comment) ⇒ Object
-
#initialize(machine, zone) ⇒ ZoneProject
constructor
A new instance of ZoneProject.
Methods included from GlobalZone::Helper
Constructor Details
#initialize(machine, zone) ⇒ ZoneProject
Returns a new instance of ZoneProject.
13 14 15 16 |
# File 'lib/vagrant/smartos/zones/util/zone_project.rb', line 13 def initialize(machine, zone) @machine = machine @zone = zone end |
Instance Attribute Details
#machine ⇒ Object (readonly)
Returns the value of attribute machine.
11 12 13 |
# File 'lib/vagrant/smartos/zones/util/zone_project.rb', line 11 def machine @machine end |
#zone ⇒ Object (readonly)
Returns the value of attribute zone.
11 12 13 |
# File 'lib/vagrant/smartos/zones/util/zone_project.rb', line 11 def zone @zone end |
Instance Method Details
#create(project, users, comment) ⇒ Object
18 19 20 21 |
# File 'lib/vagrant/smartos/zones/util/zone_project.rb', line 18 def create(project, users, comment) return if zone.lx_brand? zone.zlogin("projadd -c \"#{comment}\" -U #{users.join(',')} #{project}") end |