Class: Yao::Resources::Router
Instance Attribute Summary
#service
Class Method Summary
collapse
Instance Method Summary
collapse
included, #tenant
Methods inherited from Base
#[], #[]=, #created, friendly_attributes, #id, #initialize, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, #to_hash, #updated
#admin=, #api_version, #api_version=, #as_member, #client, #create, #destroy, extended, #find_by_name, #get, #get!, #list, #resources_path, #resources_path=, #return_single_on_querying, #return_single_on_querying=, #update
Class Method Details
.add_interface(id, param) ⇒ Object
18
19
20
|
# File 'lib/yao/resources/router.rb', line 18
def add_interface(id, param)
PUT(['routers', id, 'add_router_interface.json'].join('/'), param.to_json)
end
|
.get_by_name(name) ⇒ Object
Also known as:
find_by_name
26
27
28
|
# File 'lib/yao/resources/router.rb', line 26
def get_by_name(name)
self.list(name: name)
end
|
.remove_interface(id, param) ⇒ Object
22
23
24
|
# File 'lib/yao/resources/router.rb', line 22
def remove_interface(id, param)
PUT(['routers', id, 'remove_router_interface.json'].join('/'), param.to_json)
end
|
Instance Method Details
#interfaces ⇒ Object
13
14
15
|
# File 'lib/yao/resources/router.rb', line 13
def interfaces
Yao::Port.list(device_id: id)
end
|