Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes : #3070 Add the decommissioning status for devices #3103

Merged

Conversation

clercrobin
Copy link

@clercrobin clercrobin commented Apr 24, 2019

Fixes : #3070

Environment

  • Python version: 3.6.7
  • NetBox version: 2.5.10

Proposed Functionality

To extend the issue #154, we want to add a status decommissioning to the already existing status list:

  • offline
  • active
  • planned
  • staged
  • failed
  • inventory

Use Case

We are currently using Netbox as our asset management system, in addition to its DCIM functionality and are quite happy with this. A valuable output from Netbox would be a forecasting vision enabled by a status like planned. However it is not sufficient to complete this functionality and thus to indicate that a machine will be soon offline we want to add the status decommissioning.

It would enable the 2 following views:

  • Current status: Active + decommissioning
  • Forecast: Active + planned

Database Changes

The device statuses lines (314 - 328) of the file netbox\dcim\constants.py would change to:

STATUS_OFFLINE = 0
STATUS_ACTIVE = 1
STATUS_PLANNED = 2
STATUS_STAGED = 3
STATUS_FAILED = 4
STATUS_INVENTORY = 5
STATUS_DECOMMISSIONING = 6
DEVICE_STATUS_CHOICES = [
    [DEVICE_STATUS_ACTIVE, 'Active'],
    [DEVICE_STATUS_OFFLINE, 'Offline'],
    [DEVICE_STATUS_PLANNED, 'Planned'],
    [DEVICE_STATUS_STAGED, 'Staged'],
    [DEVICE_STATUS_FAILED, 'Failed'],
    [DEVICE_STATUS_INVENTORY, 'Inventory'],
    [DEVICE_STATUS_DECOMMISSIONING, 'Decommissioning'],
]

External Dependencies

No external dependancy

@clercrobin clercrobin changed the title Add the decommissioning status for devices Fixes : #3070 Add the decommissioning status for devices Apr 25, 2019
@jeremystretch jeremystretch merged commit bd4086c into netbox-community:develop Apr 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add decommissioning as device status
3 participants