lib/bosh/stemcell/operating_system.rb in bosh-stemcell-1.3063.0 vs lib/bosh/stemcell/operating_system.rb in bosh-stemcell-1.3068.0
- old
+ new
@@ -4,10 +4,11 @@
def self.for(operating_system_name, operating_system_version = nil)
case operating_system_name
when 'centos' then Centos.new(operating_system_version)
when 'rhel' then Rhel.new(operating_system_version)
when 'ubuntu' then Ubuntu.new(operating_system_version)
+ when 'photon' then Photon.new(operating_system_version)
else raise ArgumentError.new("invalid operating system: #{operating_system_name}")
end
end
class Base
@@ -32,13 +33,19 @@
class Centos < Base
def initialize(version)
super(name: 'centos', version: version)
end
end
-
- class Ubuntu < Base
+
+ class Ubuntu < Base
+ def initialize(version)
+ super(name: 'ubuntu', version: version)
+ end
+ end
+
+ class Photon < Base
def initialize(version)
- super(name: 'ubuntu', version: version)
+ super(name: 'photon', version: version)
end
end
end
end