Method: OpenC3::InterfaceModel#undeploy
- Defined in:
- lib/openc3/models/interface_model.rb
#undeploy ⇒ Object
Looks up the deployed MicroserviceModel and destroy the microservice model should should trigger the operator to kill the microservice that in turn will destroy the InterfaceStatusModel when a stop is called.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/openc3/models/interface_model.rb', line 377 def undeploy type = self.class._get_type name = "#{@scope}__#{type}__#{@name}" model = MicroserviceModel.get_model(name: name, scope: @scope) if model model.destroy ConfigTopic.write({ kind: 'deleted', type: type.downcase, name: @name, plugin: @plugin }, scope: @scope) end if type == 'INTERFACE' status_model = InterfaceStatusModel.get_model(name: @name, scope: @scope) else status_model = RouterStatusModel.get_model(name: @name, scope: @scope) end status_model.destroy if status_model end |