class Occi::Infrastructure::Networkinterface

Public Instance Methods

address() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 69
def address
  @attributes.occi_.networkinterface_.address
end
address=(address) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 73
def address=(address)
  add_ipnetworkinterface_mixin
  @attributes.occi!.networkinterface!.address = address
end
allocation() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 87
def allocation
  @attributes.occi_.networkinterface_.allocation
end
allocation=(allocation) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 91
def allocation=(allocation)
  add_ipnetworkinterface_mixin
  @attributes.occi!.networkinterface!.allocation = allocation
end
gateway() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 78
def gateway
  @attributes.occi_.networkinterface_.gateway
end
gateway=(gateway) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 82
def gateway=(gateway)
  add_ipnetworkinterface_mixin
  @attributes.occi!.networkinterface!.gateway = gateway
end
interface() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 45
def interface
  @attributes.occi_.networkinterface_.interface
end
interface=(interface) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 49
def interface=(interface)
  @attributes.occi!.networkinterface!.interface = interface
end
ipnetworkinterface(add = true) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 35
def ipnetworkinterface(add = true)
  if add
    Occi::Log.info "[#{self.class}] Adding mixin IPNetworkInterface"
    @mixins << Occi::Infrastructure::Networkinterface::Ipnetworkinterface.mixin
  else
    Occi::Log.info "[#{self.class}] Removing mixin IPNetworkInterface"
    @mixins.delete Occi::Infrastructure::Networkinterface::Ipnetworkinterface.mixin
  end
end
mac() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 53
def mac
  @attributes.occi_.networkinterface_.mac
end
mac=(mac) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 57
def mac=(mac)
  @attributes.occi!.networkinterface!.mac = mac
end
state() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 61
def state
  @attributes.occi_.networkinterface_.state
end
state=(state) click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 65
def state=(state)
  @attributes.occi!.networkinterface!.state = state
end

Private Instance Methods

add_ipnetworkinterface_mixin() click to toggle source
# File lib/occi/infrastructure/networkinterface.rb, line 98
def add_ipnetworkinterface_mixin
  ipnetworkinterface(true) if @mixins.select { |mixin| mixin.type_identifier == Occi::Infrastructure::Networkinterface::Ipnetworkinterface.mixin.type_identifier }.empty?
end