99
100
101
102
103
|
# File 'lib/puppet/provider/ce/api/car/car_api.rb', line 99
def create_car(resource)
session = Puppet::NetDev::CE::Device.session
create_car_xml = '<rpc><edit-config><target><running/></target><default-operation>merge</default-operation><error-option>rollback-on-error</error-option><config><qos xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0"><qosIfCarTmpls><qosIfCarTmpl operation="create"><carTmplName>' + (resource[:name]).to_s + '</carTmplName><cir>' + (resource[:speed]).to_s + '</cir><pir></pir><cbs></cbs><pbs></pbs></qosIfCarTmpl></qosIfCarTmpls></qos></config></edit-config></rpc>'
session.rpc.do_config(create_car_xml)
end
|