Skip to content
Snippets Groups Projects
  1. Feb 25, 2020
    • Benjamin Bertrand's avatar
      Fix inventory update · a401320c
      Benjamin Bertrand authored
      The trigger functions were refactored but job_template was passed
      instead of inventory_source.
      
      JIRA INFRA-1792 #action In Progress
      a401320c
  2. Feb 24, 2020
  3. Feb 03, 2020
  4. Dec 19, 2019
  5. Dec 18, 2019
  6. Oct 29, 2019
  7. Sep 18, 2019
  8. Sep 17, 2019
    • Benjamin Bertrand's avatar
      Decouple inventory and core services update · a465e910
      Benjamin Bertrand authored
      The core services update will trigger its own inventory sync on launch.
      As the job takes some time to run, it avoids blocking the main inventory
      sync. It also allows to trigger a core services update less frequently
      by keeping only one in queue.
      
      INFRA JIRA-1290
      a465e910
  9. Jun 14, 2019
  10. May 08, 2019
  11. Apr 05, 2019
  12. Apr 03, 2019
  13. Mar 27, 2019
    • Benjamin Bertrand's avatar
      Add depends_on field on Task · ebae1b17
      Benjamin Bertrand authored
      Allow to trigger a new core service update only if there is none
      depending on the triggered inventory update.
      
      JIRA INFRA-895
      ebae1b17
    • Benjamin Bertrand's avatar
      Increase timeout for core services update · 27b44173
      Benjamin Bertrand authored
      As the core service update doesn't depend anymore on each other but only
      on the inventory update, 2 can be launched almost at the same time.
      As they can't run in parallel, the second one will only start when the
      first one is done, meaning that it can take more than 180 seconds to
      complete.
      
      Increasing the timeout to 500 seconds should avoid the task to be
      reported as failed when it just took longer to run.
      
      JIRA INFRA-895 #action In Progress
      27b44173
  14. Mar 18, 2019
    • Benjamin Bertrand's avatar
      Trigger AWX inventory update on database change · e000c2f0
      Benjamin Bertrand authored
      A job running in AWX prevents an inventory sync (of the same
      inventory). This restricts AWX to run only one job at a time as
      the inventory is always updated on launch.
      To prevent this issue, the inventory is updated from AWX when needed.
      
      - The update is triggered on any model modification that is used in the
      inventory (AnsibleGroup, Cname, Domain, Host, Network, NetworkScope)
      - For Interface, the inventory sync is triggered by the
      trigger_core_services function as it depends on it
      - The inventory update job is put on the "high" queue so that it takes
      precedence over all other jobs.
      
      JIRA INFRA-887 #action In Progress
      e000c2f0
    • Benjamin Bertrand's avatar
      Use queues of different priorities · f30a711b
      Benjamin Bertrand authored
      Ensure that the trigger_core_services_update job is always processed
      before the other jobs (low queue).
      
      JIRA INFRA-887
      f30a711b
  15. Mar 05, 2019
    • Benjamin Bertrand's avatar
      Allow to launch a workflow job · 7cdc15f4
      Benjamin Bertrand authored
      New resource argument can be passed to launch_job_template.
      It is optional and is set to "job" by default.
      Shall be set to "workflow_job" to run a workflow template.
      
      Note that passing the workflow name didn't work during my test.
      The id had to be used instead.
      
      JIRA INFRA-867 #action In Progress
      7cdc15f4
  16. Jan 25, 2019
    • Benjamin Bertrand's avatar
      Fix case insensitive search · 67b2f815
      Benjamin Bertrand authored
      Search on keyword can be made case insensitive by using a normalizer.
      But some fields with type keyword include several words.
      They are only returned by entering all words. This is not what
      most users expect.
      
      It's better to use the "text" type by default (for text fields) and add
      an extra "keyword" field of type "keyword" for sorting.
      
      JIRA INFRA-770
      67b2f815
  17. Dec 18, 2018
  18. Nov 29, 2018
  19. Oct 12, 2018
  20. Oct 11, 2018
    • Benjamin Bertrand's avatar
      Implement server side processing for network hosts · 3a2d05fa
      Benjamin Bertrand authored
      - switch to server side processing to retrieve network hosts
        (the table started to be bigger and takes time to load)
      - add full text search using elasticsearch
      
      Note that only the first IP is displayed in the host table (all
      interfaces were displayed before). Search can be performed on any
      interfaces.
      
      JIRA INFRA-595 #action In Progress
      3a2d05fa
  21. Oct 05, 2018
  22. Sep 28, 2018
    • Benjamin Bertrand's avatar
      Add button to export items to excel file · 8471ec5b
      Benjamin Bertrand authored
      Retrieving all items from the database takes some time.
      The task is thus handled by the RQ worker.
      We use ajax to periodically monitor the status of the job
      and redirect to the file when ready.
      A progress bar is displayed to let the user see the progress.
      
      The mechanism put in place could be re-used for other use cases.
      
      JIRA INFRA-545 #action In Progress
      8471ec5b
  23. Aug 08, 2018
    • Benjamin Bertrand's avatar
      Replace jwt decorators with flask-login · fb3f568e
      Benjamin Bertrand authored
      Using flask-login request_loader, we can validate jwt tokens.
      This allows to use the same decorators for the web UI (using cookies)
      and the API (using JWT) as well as the current_user local proxy.
      fb3f568e
  24. Jul 12, 2018
  25. Jul 11, 2018
  26. Jul 09, 2018
    • Benjamin Bertrand's avatar
      Use sqlalchemy events hook to trigger tasks · d9516a98
      Benjamin Bertrand authored
      Use the before_flush hook to trigger the core services update.
      It's much nicer than having to call a method in several places.
      
      The core services update is triggered on creation/modification/deletion
      of an Interface.
      
      In the before_flush we can manipulate the session (add objects) but we
      shouldn't call commit.
      The db.session.commit() was removed from the launch_task method.
      d9516a98
  27. Jul 06, 2018
  28. Apr 23, 2018
    • Benjamin Bertrand's avatar
      Add stack_member field to item · ce031db6
      Benjamin Bertrand authored
      This is to be used for stack of switches only
      
      - a stack_member is linked to an host (device_type has to be "Switch")
      - a stack_member is an integer between 0 and 9 (included) or can be None
      - the couple (host_id, stack_member) must be unique
      
      JIRA INFRA-267
      ce031db6
  29. Apr 09, 2018
    • Benjamin Bertrand's avatar
      Sort network names in the register new host form · c302b5e3
      Benjamin Bertrand authored
      The sorting of the models was done in the utils.get_model_choices
      funtion but a specific query was passed to not display admin_only networks.
      
      The sorting is now done even when passing a specific query to
      get_model_choices.
      
      JIRA INFRA-284
      c302b5e3
    • Benjamin Bertrand's avatar
      Add attributes favorites page · 3050ce17
      Benjamin Bertrand authored
      - create many-to-many relationships between the user table and
      attributes tables (manufacturer / model / location / status / action)
      - add a checkbox as the first column of the attributes table to add or
      remove an attribute to the favorites
      - add a new page to display the favorite attributes
      
      JIRA INFRA-283
      3050ce17
  30. Feb 26, 2018
    • Benjamin Bertrand's avatar
      Fix broken test · 815463b9
      Benjamin Bertrand authored
      Fix error:
      User instance is not bound to a Session; attribute refresh operation cannot proceed
      815463b9
  31. Feb 12, 2018
    • Benjamin Bertrand's avatar
      Allow admin to create interface outside range · a653f0d9
      Benjamin Bertrand authored
      The network range defines the IP to be allocated.
      This is to reserve some specific addresses (for gateway for example).
      
      An admin user should be able to define an interface outside the network
      range.
      
      The IP address select field was replaced with a string field
      (initialized to the first available IP).
      
      Fixes INFRA-200
      a653f0d9
  32. Feb 09, 2018
  33. 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
  34. Dec 22, 2017
Loading