Class: Puppet::Provider::Cudawaf
- Inherits:
-
Puppet::Provider
- Object
- Puppet::Provider
- Puppet::Provider::Cudawaf
- Defined in:
- lib/puppet/provider/cudawaf.rb
Overview
Initialize the Cudawaf device.
Class Method Summary collapse
- .client_delete(instance, *args) ⇒ Object
-
.client_get(instance, *args) ⇒ Object
The following API methods are for accessing the WAF via the RestClient library.
- .client_post(instance, *args) ⇒ Object
- .client_put(instance, *args) ⇒ Object
- .delete(instance, *args) ⇒ Object
- .device(url) ⇒ Object
- .device_url ⇒ Object
-
.get(instance, *args) ⇒ Object
The following API methods are for accessing the WAF via the Swagger SDK.
- .post(instance, *args) ⇒ Object
- .put(instance, *args) ⇒ Object
- .transport ⇒ Object
Class Method Details
.client_delete(instance, *args) ⇒ Object
64 65 66 |
# File 'lib/puppet/provider/cudawaf.rb', line 64 def self.client_delete(instance, *args) transport.client_delete(device_url, instance, *args) end |
.client_get(instance, *args) ⇒ Object
The following API methods are for accessing the WAF via the RestClient library.
52 53 54 |
# File 'lib/puppet/provider/cudawaf.rb', line 52 def self.client_get(instance, *args) transport.client_get(device_url, instance, *args) end |
.client_post(instance, *args) ⇒ Object
56 57 58 |
# File 'lib/puppet/provider/cudawaf.rb', line 56 def self.client_post(instance, *args) transport.client_post(device_url, instance, *args) end |
.client_put(instance, *args) ⇒ Object
60 61 62 |
# File 'lib/puppet/provider/cudawaf.rb', line 60 def self.client_put(instance, *args) transport.client_put(device_url, instance, *args) end |
.delete(instance, *args) ⇒ Object
45 46 47 |
# File 'lib/puppet/provider/cudawaf.rb', line 45 def self.delete(instance, *args) transport.delete(device_url, instance, *args) end |
.device(url) ⇒ Object
8 9 10 |
# File 'lib/puppet/provider/cudawaf.rb', line 8 def self.device(url) Puppet::Util::NetworkDevice::Cudawaf::Device.new(url) end |
.device_url ⇒ Object
20 21 22 |
# File 'lib/puppet/provider/cudawaf.rb', line 20 def self.device_url Puppet::Util::NetworkDevice.current ? Puppet::Util::NetworkDevice.current.url.to_s : Facter.value(:url) end |
.get(instance, *args) ⇒ Object
The following API methods are for accessing the WAF via the Swagger SDK.
33 34 35 |
# File 'lib/puppet/provider/cudawaf.rb', line 33 def self.get(instance, *args) transport.get(device_url, instance, *args) end |
.post(instance, *args) ⇒ Object
37 38 39 |
# File 'lib/puppet/provider/cudawaf.rb', line 37 def self.post(instance, *args) transport.post(device_url, instance, *args) end |
.put(instance, *args) ⇒ Object
41 42 43 |
# File 'lib/puppet/provider/cudawaf.rb', line 41 def self.put(instance, *args) transport.put(device_url, instance, *args) end |
.transport ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/puppet/provider/cudawaf.rb', line 12 def self.transport if Puppet::Util::NetworkDevice.current Puppet::Util::NetworkDevice.current.transport else Puppet::Util::NetworkDevice::Transport::Cudawaf.new(Facter.value(:url)) end end |