- Mar 27, 2019
-
-
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
-
- Mar 18, 2019
-
-
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
-
Benjamin Bertrand authored
Ensure that the trigger_core_services_update job is always processed before the other jobs (low queue). JIRA INFRA-887
-
- Mar 05, 2019
-
-
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
-
- Jan 25, 2019
-
-
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
-
- Dec 18, 2018
-
-
Benjamin Bertrand authored
Dynamic mapping set to "strict" so that we don't forget to update the mapping when adding new fields to a model. JIRA INFRA-723 #action In Progress
-
- Nov 29, 2018
-
-
Benjamin Bertrand authored
JIRA INFRA-640
-
- Oct 12, 2018
-
-
Benjamin Bertrand authored
IndexError raised due to: {'cn': 'Alessio Curri (new)', 'sAMAccountName': 'alessiocurri2', 'mail': []} JIRA INFRA-610 #action In Progress
-
- Oct 11, 2018
-
-
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
-
- Oct 05, 2018
-
-
Benjamin Bertrand authored
JIRA INFRA-575 #action In Progress
-
- Sep 28, 2018
-
-
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
-
- Aug 08, 2018
-
-
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.
-
- Jul 12, 2018
-
-
Benjamin Bertrand authored
JIRA INFRA-412
-
- Jul 11, 2018
-
-
Benjamin Bertrand authored
Allow to enter Ansible variables on host in YAML format. Use codemirror (http://codemirror.net) to make editing YAML easier. JIRA INFRA-412
-
- Jul 09, 2018
-
-
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.
-
- Jul 06, 2018
-
-
Benjamin Bertrand authored
Add new jinja2 filter to format datetime
- Apr 23, 2018
-
-
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
-
- Apr 09, 2018
-
-
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
-
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
-
- Feb 26, 2018
-
-
Benjamin Bertrand authored
Fix error: User instance is not bound to a Session; attribute refresh operation cannot proceed
-
- Feb 12, 2018
-
-
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
-
- Feb 09, 2018
-
-
Benjamin Bertrand authored
Fixes INFRA-197
-
- Jan 08, 2018
-
-
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.
-
- Dec 22, 2017
-
-
Benjamin Bertrand authored
-
- Dec 21, 2017
-
-
Benjamin Bertrand authored
Strings are automatically converted to datetime object. Note that datetime are stored without timezone in the database (in UTC).
-
Benjamin Bertrand authored
- This will help tracking who and what was created / changed - Move fetch_current_user_id to utils.py - Make ItemComment inherit from CreatedMixin
-
- Dec 19, 2017
-
-
Benjamin Bertrand authored
When registering a new host, only admin users shall be able to select networks marked as "admin_only"
-
- Dec 15, 2017
-
-
Benjamin Bertrand authored
If a selectfield is disabled, None is returned (not a string). To pass wtforms validation, that value shall be part of the choices. We use None as the value for SelectField that are optional (instead of ''). We were previously converting '' to None when creating a model. We now use the coerce function to let the form convert 'None' to None.
-
- Dec 06, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
- Nov 15, 2017
-
-
Benjamin Bertrand authored
-
- Nov 03, 2017
-
-
Benjamin Bertrand authored
-
- Sep 07, 2017
-
-
Benjamin Bertrand authored
Can use: - /api/items?serial_number=123456 - /api/items?location_id=1
-
- Sep 06, 2017
-
-
Benjamin Bertrand authored
This can be done via the Admin interface but this latter shall be restricted to admin users. This simple page allows the group "create" to easily add new Manufacturer, Model or Location.
-
Benjamin Bertrand authored
The serial number might not be unique and can't be used as the string to hash. There are for example SD cards that all have the same SN. Using an ICS id allows to pre-print labels that can be assigned to hardware when scanning serial numbers. This id shall be easy to remember (unlike UUID).
-
- Aug 18, 2017
-
-
Benjamin Bertrand authored
-
- Jul 20, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
- Jul 19, 2017
-
-
Benjamin Bertrand authored
The hash is supposed to be computed in the __init__ method of Item. But flask-admin never passes any parameter when creating the model class. The attributes are changed after creation. When creating an item in the admin view, we use the on_model_change method to update the hash. There might be a better way to avoid this code duplication. This works for now.
-