# Path: f5_heat/resources/f5_ltm_pool.py
# class F5LTMPool(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         SERVICE_DOWN_ACTION,
#         MEMBERS
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'service_down_action',
#         'members'
#     )
#     _MEMBER_KEYS = (
#         MEMBER_IP, MEMBER_PORT
#     ) = (
#         'member_ip', 'member_port'
#     )
#     def _assign_members(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


from f5_heat.resources import f5_ltm_pool
from heat.common import exception
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest
  pool:
    type: F5::LTM::Pool
    properties:
      name: testing_pool
      bigip_server: bigip_rsrc
      partition: partition
      service_down_action: Reject
      members: [{'member_ip': '128.0.0.1', 'member_port': 80},
               {'member_ip': '129.0.0.1', 'member_port': 80}]
'''

bad_pool_defn = '''
heat_template_version: 2015-04-30
description: Testing F5 LTM Pool plugin
resources:
  bigip_rsrc:
    type: F5::BigIP::Device
    properties:
      ip: 10.0.0.1
      username: admin
      password: admin
  partition:
    type: F5::Sys::Partition
    properties:
      name: Common
      bigip_server: bigip_rsrc
  pool:
    type: F5::LTM::Pool
    properties:
      name: testing_pool

# Path: f5_heat/resources/f5_ltm_pool.py
# class F5LTMPool(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         SERVICE_DOWN_ACTION,
#         MEMBERS
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'service_down_action',
#         'members'
#     )
#     _MEMBER_KEYS = (
#         MEMBER_IP, MEMBER_PORT
#     ) = (
#         'member_ip', 'member_port'
#     )
#     def _assign_members(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


# Path: f5_heat/resources/test/test_f5_ltm_pool.py
from f5_heat.resources import f5_ltm_pool
from heat.common import exception
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest

  pool:
    type: F5::LTM::Pool
    properties:
      name: testing_pool
      bigip_server: bigip_rsrc
      partition: partition
      service_down_action: Reject
      members: [{'member_ip': '128.0.0.1', 'member_port': 80},
               {'member_ip': '129.0.0.1', 'member_port': 80}]
'''

bad_pool_defn = '''
heat_template_version: 2015-04-30
description: Testing F5 LTM Pool plugin
resources:
  bigip_rsrc:
    type: F5::BigIP::Device
    properties:
      ip: 10.0.0.1
      username: admin
      password: admin
  partition:
    type: F5::Sys::Partition
    properties:
      name: Common
      bigip_server: bigip_rsrc
  pool:
    type: F5::LTM::Pool
    properties:
      name: testing_pool

      partition: partition