#NEWLINE# def get( self , name ) : #NEWLINE# #INDENT# 'Returns a dictionary object that represents a switchport\n\n        The Switchport resource returns the following:\n\n            * name (str): The name of the interface\n            * mode (str): The switchport mode value\n            * access_vlan (str): The switchport access vlan value\n            * trunk_native_vlan (str): The switchport trunk native vlan vlaue\n            * trunk_allowed_vlans (str): The trunk allowed vlans value\n            * trunk_groups (list): The list of trunk groups configured\n\n        Args:\n            name (string): The interface identifier to get.  Note: Switchports\n                are only supported on Ethernet and Port-Channel interfaces\n\n        Returns:\n            dict: A Python dictionary object of key/value pairs that represent\n                the switchport configuration for the interface specified  If\n                the specified argument is not a switchport then None\n                is returned\n        ' #NEWLINE# config = self . get_block ( ( 'interface %s' % name ) ) #NEWLINE# if ( 'no switchport\n' in resource ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# resource = dict ( name = name ) #NEWLINE# resource . update ( self . _parse_mode ( config ) ) #NEWLINE# resource . update ( self . _parse_access_vlan ( config ) ) #NEWLINE# resource . update ( self . _parse_trunk_native_vlan ( config ) ) #NEWLINE# resource . update ( self . _parse_trunk_allowed_vlans ( config ) ) #NEWLINE# resource . update ( self . _parse_trunk_groups ( config ) ) #NEWLINE# return resource