Class: Alula::Dcp::Config::ClearStaged

Inherits:
SingletonDcpCommandResource show all
Extended by:
ResourceAttributes
Defined in:
lib/alula/resources/dcp/config/clear_staged.rb

Overview

Clear all staged DCP configuration for a device

This command removes all pending configuration changes that have not yet been applied to the device.

Examples:

result = Alula::Dcp::Config::ClearStaged.call(device_id: 'device-mac-address')
if result.is_a?(Alula::AlulaError)
  puts "Error: #{result.message}"
else
  puts "Staged data cleared successfully"
end

Constant Summary

Constants inherited from SingletonDcpCommandResource

SingletonDcpCommandResource::BASE_PATH

Instance Attribute Summary

Attributes inherited from SingletonDcpCommandResource

#device_id, #values

Class Method Summary collapse

Methods included from ResourceAttributes

date_fields, extended, field, field_names, filterable_fields, get_fields, get_http_methods, get_resource_path, get_type, http_methods, param_key, resource_path, sortable_fields, type

Methods inherited from SingletonDcpCommandResource

#apply_attributes, #call, #construct_new_resource, #initialize, #model_name, payload_to_camelcase, request

Constructor Details

This class inherits a constructor from Alula::SingletonDcpCommandResource

Class Method Details

.call(device_id:) ⇒ Alula::AlulaResponse, Alula::AlulaError

Clear all staged configuration for a device

Parameters:

  • device_id (String)

    The device hardware ID (MAC address)

Returns:



28
29
30
31
32
33
34
# File 'lib/alula/resources/dcp/config/clear_staged.rb', line 28

def self.call(device_id:)
  request(
    device_id: device_id,
    http_method: :delete,
    payload: {}
  )
end

.payload_required?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/alula/resources/dcp/config/clear_staged.rb', line 36

def self.payload_required?
  false
end