Example #1
0
 def to_core(self, serialized):
     return BaseInterface(
         port_mode=dict((v, k) for k, v in serialized_port_mode.iteritems())[serialized.pop('port_mode')],
         **sub_dict(serialized, 'shutdown', 'access_vlan', 'trunk_native_vlan', 'trunk_vlans', 'mtu')
     )
Example #2
0
 def to_core(self, serialized):
     params = dict(vars(base_interface.to_core(serialized)))
     params.update(sub_dict(serialized, 'name', 'bond_master'))
     return Interface(**params)
Example #3
0
 def to_core(self, api_bond):
     params = dict(vars(base_interface.to_core(api_bond['interface'])))
     params.update(sub_dict(api_bond, 'number', 'link_speed', 'members'))
     return Bond(**params)
Example #4
0
 def to_core(self, api_bond):
     params = dict(vars(base_interface.to_core(api_bond["interface"])))
     params.update(sub_dict(api_bond, "number", "link_speed", "members"))
     return Bond(**params)
Example #5
0
 def to_core(self, api_bond):
     params = dict(vars(base_interface.to_core(api_bond['interface'])))
     params.update(sub_dict(api_bond, 'number', 'link_speed', 'members'))
     return Bond(**params)