Class: SDM::PeeringGroup
- Inherits:
-
Object
- Object
- SDM::PeeringGroup
- Defined in:
- lib/models/porcelain.rb
Overview
PeeringGroups are the building blocks used for explicit network topology making. They may be linked to other peering groups. Sets of PeeringGroupResource and PeeringGroupNode can be attached to a peering group.
Instance Attribute Summary collapse
-
#id ⇒ Object
Unique identifier of the PeeringGroup.
-
#name ⇒ Object
Unique human-readable name of the PeeringGroup.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil) ⇒ PeeringGroup
constructor
A new instance of PeeringGroup.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil) ⇒ PeeringGroup
Returns a new instance of PeeringGroup.
13031 13032 13033 13034 13035 13036 13037 |
# File 'lib/models/porcelain.rb', line 13031 def initialize( id: nil, name: nil ) @id = id == nil ? "" : id @name = name == nil ? "" : name end |
Instance Attribute Details
#id ⇒ Object
Unique identifier of the PeeringGroup.
13027 13028 13029 |
# File 'lib/models/porcelain.rb', line 13027 def id @id end |
#name ⇒ Object
Unique human-readable name of the PeeringGroup.
13029 13030 13031 |
# File 'lib/models/porcelain.rb', line 13029 def name @name end |
Instance Method Details
#to_json(options = {}) ⇒ Object
13039 13040 13041 13042 13043 13044 13045 |
# File 'lib/models/porcelain.rb', line 13039 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |