lib/yao/resources/loadbalancer_pool_member.rb in yao-0.3.7 vs lib/yao/resources/loadbalancer_pool_member.rb in yao-0.3.8
- old
+ new
@@ -4,14 +4,19 @@
:admin_state_up, :provisioning_status,
:monitor_address, :address,
:protocol_port, :operating_status
def project
- Yao::Tenant.find self["project_id"]
+ if project_id = self["project_id"]
+ Yao::Tenant.find project_id
+ end
end
+ alias :tenant :project
def subnet
- Yao::Subnet.find self["subnet_id"]
+ if subnet_id = self["subnet_id"]
+ Yao::Subnet.find subnet_id
+ end
end
self.service = "load-balancer"
self.api_version = "v2.0"
self.resource_name = "member"