Skip to content

Commit

Permalink
Fix imports so that we can use resources with Kilo
Browse files Browse the repository at this point in the history
Change-Id: I890e3fd7e5d8c5ab9179310a05aba4aee1365799
Closes-Bug: #1493048
  • Loading branch information
safchain committed Sep 7, 2015
1 parent bb13193 commit 16134f8
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 7 deletions.
14 changes: 12 additions & 2 deletions contrail_heat/resources/attach_policy.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.common import exception
from heat.engine.resources.neutron import neutron
try:
from heat.engine.resources.neutron import neutron
except ImportError:
from heat.engine.resources.openstack.neutron import neutron
from heat.engine import properties

from neutronclient.common.exceptions import NeutronClientException
from neutronclient.neutron import v2_0 as neutronV20
from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging

logger = logging.getLogger(__name__)

Expand Down
5 changes: 4 additions & 1 deletion contrail_heat/resources/contrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from cfgm_common import exceptions as cfgm_exp
from heat.engine import resource
from heat.engine.properties import Properties
from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging
from vnc_api import vnc_api

LOG = logging.getLogger(__name__)
Expand Down
4 changes: 4 additions & 0 deletions contrail_heat/resources/network_ipam.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import properties
from vnc_api import vnc_api
from contrail_heat.resources import contrail
Expand Down
10 changes: 9 additions & 1 deletion contrail_heat/resources/network_policy.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
try:
from heat.common.i18n import _
except ImportError:
pass

from heat.engine import constraints
from heat.engine import clients
from heat.engine import properties
from vnc_api import vnc_api
from contrail_heat.resources.contrail import ContrailResource

from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging
import uuid
import copy

Expand Down
5 changes: 5 additions & 0 deletions contrail_heat/resources/physical_interface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
try:
from heat.common.i18n import _
except ImportError:
pass

from heat.engine import properties
from vnc_api import vnc_api
from contrail_heat.resources import contrail
Expand Down
5 changes: 5 additions & 0 deletions contrail_heat/resources/physical_router.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
try:
from heat.common.i18n import _
except ImportError:
pass

from heat.engine import properties
from vnc_api import vnc_api
from contrail_heat.resources import contrail
Expand Down
9 changes: 8 additions & 1 deletion contrail_heat/resources/service_instance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import constraints
from heat.engine import properties
from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging
from vnc_api import vnc_api
from contrail_heat.resources.contrail import ContrailResource
import uuid
Expand Down
9 changes: 8 additions & 1 deletion contrail_heat/resources/service_template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import constraints
from heat.engine import properties
from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging
from vnc_api import vnc_api
from contrail_heat.resources.contrail import ContrailResource

Expand Down
4 changes: 4 additions & 0 deletions contrail_heat/resources/virtual_machine_interface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import properties
from heat.engine import constraints
from vnc_api import vnc_api
Expand Down
9 changes: 8 additions & 1 deletion contrail_heat/resources/virtual_network.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import uuid

from contrail_heat.resources import contrail
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import constraints
from heat.engine import properties
from heat.openstack.common import log as logging
try:
from heat.openstack.common import log as logging
except ImportError:
from oslo_log import log as logging
from vnc_api import vnc_api

LOG = logging.getLogger(__name__)
Expand Down
4 changes: 4 additions & 0 deletions contrail_heat/resources/vn_subnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
try:
from heat.common.i18n import _
except ImportError:
pass
from heat.engine import constraints
from heat.engine import properties
from vnc_api import vnc_api
Expand Down

0 comments on commit 16134f8

Please sign in to comment.