Skip to content

BB-1137 Add terminate button to app server UI

Boros Gábor requested to merge BB-1137/terminate-appservers into master

Created by: viadanna

Description

This change will allow for manual termination of app servers. This will be allowed for app servers that are not active and instances created from pull requests will be able to deactivate/terminate all app servers.

Testing

  1. Checkout this branch.
  2. Create a test instance with an associated pull request and another one without it.
  3. Manually add appservers in states such as new, failed, running and configuring to evaluate the UI behavior.
  4. Check that only appservers in running state can be made active.
  5. Make sure that only inactive appservers in configuring, running and failed can be terminated.

If it fails to mark an appserver active/inactive, make sure there's an associated server in the correct state:

In [25]: for apps in OpenEdXAppServer.objects.filter(_is_active=True):
    ...:     apps.server = OpenStackServer.objects.create(name_prefix='test', _status='ready', _public_ip='0.0.0.0')
    ...:     apps.save()

Merge request reports