docs: def interface_list(env, securitygroup_id, sortby):
      """List interfaces associated with security groups."""
      mgr = SoftLayer.NetworkManager(env.client)
  
      table = formatting.Table(COLUMNS)
      table.sortby = sortby
  
      mask = (
          '''networkComponentBindings[
              networkComponentId,
              networkComponent[
                  id,
                  port,
                  guest[
                      id,
                      hostname,
                      primaryBackendIpAddress,
                      primaryIpAddress
                  ]
              ]
          ]'''
      )
  
      secgroup = mgr.get_securitygroup(securitygroup_id, mask=mask)
      for binding in secgroup.get('networkComponentBindings', []):
          interface_id = binding['networkComponentId']
          try:
              interface = binding['networkComponent']
              vsi = interface['guest']
              vsi_id = vsi['id']
              hostname = vsi['hostname']
              priv_pub = 'PRIVATE' if interface['port'] == 0 else 'PUBLIC'
              ip_address = (vsi['primaryBackendIpAddress']
                            if interface['port'] == 0
                            else vsi['primaryIpAddress'])
          except KeyError:
              vsi_id = "N/A"
              hostname = "Not enough permission to view"
              priv_pub = "N/A"
              ip_address = "N/A"
  
          table.add_row([
              interface_id,
              vsi_id,
              hostname,
              priv_pub,
              ip_address
          ])
  
      env.fout(table)