HomePhabricator

Use Interface transactions, not Device transactions, to destroy Interfaces

Description

Use Interface transactions, not Device transactions, to destroy Interfaces

Summary:
Depends on D19324. Ref T13120. Ref T12414.

This moves "Destroy Interface" to use Interface transactions instead of Device transactions, so we can ultimately get rid of the complex and difficult-to-modernize AlmanacDeviceTransaction::TYPE_INTERFACE.

This transaction is a bit weird since it makes the interface delete itself, but this should work OK for now. At some point in the future I'd probably want to change this into more of a "disable" action, but I don't think we face any immediate peril by retaining this behavior for now.

Test Plan:

  • Destroyed interfaces on devices using the web UI, saw them vanish.
  • Ran daemons, nothing fataled/exploded even though the transaction is weird and destroys the object it affects.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13120, T12414

Differential Revision: https://secure.phabricator.com/D19325