Class: Latitude::API::Resources::Firewall
- Inherits:
-
APIResource
- Object
- APIResource
- Latitude::API::Resources::Firewall
- Extended by:
- Operations::Create, Operations::Delete, Operations::List, Operations::Retrieve, Operations::Update
- Defined in:
- lib/latitude/api/resources/firewall.rb
Defined Under Namespace
Classes: Assignment, Rule
Constant Summary
Constants inherited from APIResource
APIResource::READ_ONLY_ATTRIBUTES
Instance Attribute Summary collapse
- #firewall ⇒ Object
- #firewall_id ⇒ Object
- #name ⇒ String
- #project ⇒ Latitude::API::Objects::Project
- #rules ⇒ Array<Rule>
- #server ⇒ Object
Attributes inherited from APIResource
#id, #meta, #path_params, #raw_data, #type
Class Method Summary collapse
Methods included from Operations::List
Methods included from Operations::Create
Methods included from Operations::Retrieve
Methods included from Operations::Update
Methods included from Operations::Delete
Methods inherited from APIResource
#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute
Methods included from Attributes::ClassMethods
Methods included from Attributes::InstanceMethods
#attribute_spec, #read_attribute, #wrap_attribute
Constructor Details
This class inherits a constructor from Latitude::API::APIResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Latitude::API::APIResource
Instance Attribute Details
#firewall ⇒ Object
|
|
# File 'lib/latitude/api/resources/firewall.rb', line 55
|
#firewall_id ⇒ Object
|
|
# File 'lib/latitude/api/resources/firewall.rb', line 59
|
#name ⇒ String
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/latitude/api/resources/firewall.rb', line 12 class Firewall < APIResource # @!attribute [r] from # @return [String] # @!attribute [r] to # @return [String] # @!attribute [r] port # @return [String] # @!attribute [r] protocol # @return [String] # @!attribute [r] default # @return [Boolean] class Rule < APIObject attribute :from, :string, read_only: true attribute :to, :string, read_only: true attribute :port, :string, read_only: true attribute :protocol, :string, read_only: true attribute :default, :boolean, read_only: true end attribute :name, :string attribute :project, Objects::Project attribute :rules, [Rule] resource_type "firewalls" resource_path "/firewalls" id_prefix "firewall_" extend Operations::List extend Operations::Create extend Operations::Retrieve extend Operations::Update extend Operations::Delete class << self def assignments Assignment end end # @!attribute [rw] server # @return [Server] # @!attribute [rw] firewall # @return [Firewall] # @!attribute [rw] firewall_id # @return [String] class Assignment < APIResource # @!attribute [r] id # @return [String] # @!attribute [r] hostname # @return [String] # @!attribute [r] primary_ipv4 # @return [String] class Server < APIObject attribute :id, :string, read_only: true attribute :hostname, :string, read_only: true attribute :primary_ipv4, :string, read_only: true end # @!attribute [r] id # @return [String] # @!attribute [r] name # @return [String] class Firewall < APIObject attribute :id, :string, read_only: true attribute :name, :string, read_only: true end attribute :server, Server attribute :firewall, Firewall attribute :firewall_id, :string resource_type "firewall_assignments" resource_path "/firewalls/:firewall_id/assignments" extend Operations::List extend Operations::Create extend Operations::Delete class << self def list_all(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: "/firewalls/assignments", query: query, opts: opts) ListObject.new(resource_class: self, parsed: parsed, request_params: params, request_opts: opts) end end end end |
#project ⇒ Latitude::API::Objects::Project
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/latitude/api/resources/firewall.rb', line 12 class Firewall < APIResource # @!attribute [r] from # @return [String] # @!attribute [r] to # @return [String] # @!attribute [r] port # @return [String] # @!attribute [r] protocol # @return [String] # @!attribute [r] default # @return [Boolean] class Rule < APIObject attribute :from, :string, read_only: true attribute :to, :string, read_only: true attribute :port, :string, read_only: true attribute :protocol, :string, read_only: true attribute :default, :boolean, read_only: true end attribute :name, :string attribute :project, Objects::Project attribute :rules, [Rule] resource_type "firewalls" resource_path "/firewalls" id_prefix "firewall_" extend Operations::List extend Operations::Create extend Operations::Retrieve extend Operations::Update extend Operations::Delete class << self def assignments Assignment end end # @!attribute [rw] server # @return [Server] # @!attribute [rw] firewall # @return [Firewall] # @!attribute [rw] firewall_id # @return [String] class Assignment < APIResource # @!attribute [r] id # @return [String] # @!attribute [r] hostname # @return [String] # @!attribute [r] primary_ipv4 # @return [String] class Server < APIObject attribute :id, :string, read_only: true attribute :hostname, :string, read_only: true attribute :primary_ipv4, :string, read_only: true end # @!attribute [r] id # @return [String] # @!attribute [r] name # @return [String] class Firewall < APIObject attribute :id, :string, read_only: true attribute :name, :string, read_only: true end attribute :server, Server attribute :firewall, Firewall attribute :firewall_id, :string resource_type "firewall_assignments" resource_path "/firewalls/:firewall_id/assignments" extend Operations::List extend Operations::Create extend Operations::Delete class << self def list_all(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: "/firewalls/assignments", query: query, opts: opts) ListObject.new(resource_class: self, parsed: parsed, request_params: params, request_opts: opts) end end end end |
#rules ⇒ Array<Rule>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/latitude/api/resources/firewall.rb', line 12 class Firewall < APIResource # @!attribute [r] from # @return [String] # @!attribute [r] to # @return [String] # @!attribute [r] port # @return [String] # @!attribute [r] protocol # @return [String] # @!attribute [r] default # @return [Boolean] class Rule < APIObject attribute :from, :string, read_only: true attribute :to, :string, read_only: true attribute :port, :string, read_only: true attribute :protocol, :string, read_only: true attribute :default, :boolean, read_only: true end attribute :name, :string attribute :project, Objects::Project attribute :rules, [Rule] resource_type "firewalls" resource_path "/firewalls" id_prefix "firewall_" extend Operations::List extend Operations::Create extend Operations::Retrieve extend Operations::Update extend Operations::Delete class << self def assignments Assignment end end # @!attribute [rw] server # @return [Server] # @!attribute [rw] firewall # @return [Firewall] # @!attribute [rw] firewall_id # @return [String] class Assignment < APIResource # @!attribute [r] id # @return [String] # @!attribute [r] hostname # @return [String] # @!attribute [r] primary_ipv4 # @return [String] class Server < APIObject attribute :id, :string, read_only: true attribute :hostname, :string, read_only: true attribute :primary_ipv4, :string, read_only: true end # @!attribute [r] id # @return [String] # @!attribute [r] name # @return [String] class Firewall < APIObject attribute :id, :string, read_only: true attribute :name, :string, read_only: true end attribute :server, Server attribute :firewall, Firewall attribute :firewall_id, :string resource_type "firewall_assignments" resource_path "/firewalls/:firewall_id/assignments" extend Operations::List extend Operations::Create extend Operations::Delete class << self def list_all(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: "/firewalls/assignments", query: query, opts: opts) ListObject.new(resource_class: self, parsed: parsed, request_params: params, request_opts: opts) end end end end |
#server ⇒ Object
|
|
# File 'lib/latitude/api/resources/firewall.rb', line 51
|
Class Method Details
.assignments ⇒ Object
46 47 48 |
# File 'lib/latitude/api/resources/firewall.rb', line 46 def assignments Assignment end |