Beispiel #1
0
 def get_ports_from_otter_launch_configs(self, group_id):
     """
     Returns the list of ports in the luanch configs of the group_id
     """
     launch_config = self.autoscale_client.view_launch_config(
         group_id).entity
     return [lb.port for lb in launch_config.loadBalancers
             if safe_hasattr(lb, 'port')]
Beispiel #2
0
    def _get_cloud_servers_on_pool(self, pool_id):
        """
        Return a list of the cloud server nodes on the specified pool,
        identified by pool_id.
        """
        def as_hash(n):
            return {'server_id': n.cloud_server['id'], 'node_id': n.id}

        node_list = self.rcv3_client.get_nodes_on_pool(pool_id).entity.nodes
        return [as_hash(n) for n in node_list
                if safe_hasattr(n, 'cloud_server')]
Beispiel #3
0
 def get_ports_from_otter_launch_configs(self, group_id):
     """
     Returns the list of ports in the luanch configs of the group_id
     """
     launch_config = self.autoscale_client.view_launch_config(group_id).entity
     return [lb.port for lb in launch_config.loadBalancers if safe_hasattr(lb, "port")]