Class: Fog::Network::HuaweiCloud::Vpc
- Inherits:
-
HuaweiCloud::Model
- Object
- Model
- HuaweiCloud::Model
- Fog::Network::HuaweiCloud::Vpc
- Defined in:
- lib/fog/network/huaweicloud/models/vpc.rb
Instance Attribute Summary
Attributes inherited from HuaweiCloud::Model
Instance Method Summary collapse
- #create ⇒ Object
-
#destroy ⇒ Object
TODO not support def update requires :id merge_attributes(service.update_subnet(id, attributes).body) self end.
Methods inherited from HuaweiCloud::Model
Constructor Details
This class inherits a constructor from Fog::HuaweiCloud::Model
Instance Method Details
#create ⇒ Object
13 14 15 16 17 |
# File 'lib/fog/network/huaweicloud/models/vpc.rb', line 13 def create requires :name, :cidr merge_attributes(service.create_vpc(name, cidr).body['vpc']) self end |
#destroy ⇒ Object
TODO not support def update
requires :id
merge_attributes(service.update_subnet(id, attributes).body['subnet'])
self
end
26 27 28 29 30 |
# File 'lib/fog/network/huaweicloud/models/vpc.rb', line 26 def destroy requires :id service.delete_vpc(id) true end |