Top Level Namespace
Defined Under Namespace
Modules: LenovoGem
Classes: Arp, Connect, Igmp, Ipintf, Lacp, Lag, Lldp, Mstp, Rest, Stp, System, Telemetry, Vlag, Vlan, VlanIntf, Vrrp
Instance Method Summary
collapse
Instance Method Details
19
20
21
22
23
24
25
|
# File 'lib/cnos-rbapi/connect.rb', line 19
def form_hdr(conn)
hdr = {}
tmp_ckie = 'auth_cookie='+ conn.getCookie + ';user=' + conn.getUser + '; Max-Age=3600; Path=/'
hdr['Cookie'] = tmp_ckie
hdr['Content-type'] = 'application/json'
return hdr
end
|
27
28
29
30
|
# File 'lib/cnos-rbapi/connect.rb', line 27
def form_url(conn, url)
url = conn.getTransport + '://' + conn.getIp + ':' + conn.getPort + url
return url
end
|