Skip to content
Snippets Groups Projects
  1. Feb 09, 2018
  2. Feb 08, 2018
  3. Feb 06, 2018
  4. Feb 02, 2018
  5. Jan 29, 2018
  6. Jan 28, 2018
  7. Jan 18, 2018
  8. Jan 16, 2018
  9. Jan 12, 2018
    • Benjamin Bertrand's avatar
      v0.5.3
      ef44731e
    • Benjamin Bertrand's avatar
      Fix inconsistency in interface creation · a3c407f4
      Benjamin Bertrand authored
      The string representation of a Network is the vlan_name.
      This is what we should allow to pass as string to create an interface.
      
      Note that if we pass network_id instead of network when creating
      and interface, the validate_interfaces method from the Network class
      is not called.
      a3c407f4
    • Benjamin Bertrand's avatar
      Cache user retrieval · 0efae3a3
      Benjamin Bertrand authored
      The user_id is stored in the flask session. On every page load, we query
      the database to get:
      - the user objet (user_account table)
      - the user's groups (group table) to know what the user can access
      
      If we try to cache the user_load function, the following error is raised
      when retrieving the groups:
      sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at
      0x7f51e050a940> is not bound to a Session; lazy load operation of
      attribute 'grp' cannot proceed
      
      The groups from AD are only stored to map them with CSENTRY_LDAP_GROUPS.
      We don't do any query on them (get all users from one group).
      As we always query them with one user, it's more efficient to store them
      in the user_account table as an array than in a separate table.
      This allows to easily cache the load_user function.
      
      Note that we have to remember to add the current_user to the sqlalchemy session if
      we want to modify it or access a relationship (like tokens)!
      
      The load_user function is now cached for 30 minutes. This decreases a
      lot the number of database queries.
      
      Fix INFRA-156
      0efae3a3
  10. Jan 11, 2018
  11. Jan 10, 2018
  12. Jan 08, 2018
    • Benjamin Bertrand's avatar
      Add pagination to API · a87309e5
      Benjamin Bertrand authored
      Pagination information (next, prev, first, last) is included in the Link
      HTTP header.
      The total number of entries is provided in the X-Total-Count HTTP
      header.
      v0.5.1
      a87309e5
  13. Jan 05, 2018
  14. Jan 04, 2018
  15. Jan 03, 2018
  16. Jan 02, 2018
Loading