#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
desc "Provider for creating Oracle Solaris address objects"
# replace any hypen with an underscore
# look to see if this is a point-to-point address object
local = nil
else
end
if state == "ok"
enable = :true
else
enable = :false
end
:address_type => type,
:address => local,
:remote_address => remote)
end
end
# pull the instances on the system
# set the provider for the resource to set the property_hash
resources.keys.each do |name|
end
end
end
# property getters
end
end
options = []
options << "-t"
end
if address_type = @resource[:address_type]
end
if address = @resource[:address]
options << "-a" << "local=#{address}"
end
if remote_address = @resource[:remote_address]
options << "-a" << "remote=#{remote_address}"
end
if down = @resource[:down]
options << "-d" << down
end
if seconds = @resource[:seconds]
options << "-w" << seconds
end
if hostname = @resource[:hostname]
options << "-h" << hostname
end
if interface_id = @resource[:interface_id]
options << "-i" << "local=#{interface_id}"
end
if remote_interface_id = @resource[:remote_interface_id]
options << "-i" << "remote=#{remote_interface_id}"
end
if stateful = @resource[:stateful]
options << "-p" << "stateful=#{stateful}"
end
if stateless = @resource[:stateless]
options << "-p" << "stateless=#{stateless}"
end
options
end
def exists?
@property_hash[:ensure] == :present
end
def create
ipadm("create-addr", add_options, @resource[:name])
if @resource[:enable] == :true
ipadm("enable-addr", @resource[:name])
end
end
def destroy
ipadm("delete-addr", @resource[:name])
end
end