Project

General

Profile

Bug #11592 ยป test.rb

ally0620 (Ally Kuo), 10/14/2015 03:41 AM

 
1
require "OpEN"
2
require "OpENUtil"
3
  
4
  open = OpENUtil.new()
5
  conn_ret = open.connect("boa-vlan")
6
  exists = false
7
  if conn_ret == OpEN::OPEN_E_NONE
8
    client = open.client
9
    ret = OpEN::openapiVlanCreatedCheck(client,1)
10
    if ret == OpEN::OPEN_E_NONE      
11
      puts "Hello, exists = true!!"
12
    else
13
      puts "Hello, exists = false!!"
14
    end
15
  else
16
    Chef::Log.info "Failed to connect to 'boa-vlan' in 'vlan_exists'."
17
    puts "Hello, Failed to connect!!"
18
  end
19
  open.terminate()