Class: Lacp

Inherits:
Object
  • Object
show all
Defined in:
lib/cnos-rbapi/lacp.rb

Overview

The Lacp class provides a class implementation and methods for managing Lacp on the node. This class presents an abstraction

Constant Summary collapse

@@cfg =
'/nos/api/cfg/lacp'

Class Method Summary collapse

Class Method Details

.get_lacp(conn) ⇒ Object

parameters:

conn - connection object to the node

return: JSON response


34
35
36
37
38
# File 'lib/cnos-rbapi/lacp.rb', line 34

def self.get_lacp(conn)
        url = form_url(conn, @@cfg)
        hdr = form_hdr(conn)
		Rest.get(conn, url ,hdr)
end

.update_lacp(conn, params) ⇒ Object

parameters:

conn - connection object to the node
sys_prio - System Priority
params - dictionary that requires the following format of key-value pairs
	    {	
	    	  "sys_prio": "<sys_prio>",
	    }
description -
sys_prio   :LACP system priority; a positive integer from 1‐65535. Default
	       value: 32768.

return: JSON response


55
56
57
58
59
60
61
# File 'lib/cnos-rbapi/lacp.rb', line 55

def self.update_lacp(conn, params)
        url = form_url(conn, @@cfg)
        hdr = form_hdr(conn)
		params = params.to_json
		Rest.put(conn, url, hdr, params)

end