class OpenShift::Runtime::Cartridge

Attributes

endpoints[R]
name[R]
namespace[R]
short_name[R]
vendor[R]
version[R]

Public Class Methods

new(manifest = {}) click to toggle source
# File lib/openshift-origin-node/model/cartridge.rb, line 50
          def initialize(manifest = {})
                  @name = manifest["Name"]
# FIXME: remove after element is renamed to CartridgeShortName
                  @namespace = manifest["Namespace"]
                  @short_name = manifest["CartridgeShortName"] ||= manifest["Namespace"]

@namespace.upcase!
@short_name.upcase!

@vendor = manifest['CartridgeVendor'] ||= "not_provided"
@version = manifest['CartridgeVersion']

endpoint_strings = manifest["Endpoints"] ||= []
@endpoints = Endpoint.parse_endpoints(@namespace, endpoint_strings)
          end

Public Instance Methods

public_endpoints() click to toggle source

Convenience method which returns an array containing only those Endpoints which have a public_port_name specified.

# File lib/openshift-origin-node/model/cartridge.rb, line 68
def public_endpoints
        @endpoints.select {|e| e.public_port_name != nil}
end