import uuid from oslo_config import cfg from pkg_resources import iter_entry_points import requests import six from magnum.common import exception from magnum.i18n import _ from magnum.common import paths template_def_opts = [ cfg.StrOpt('k8s_atomic_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster.yaml'), deprecated_name='template_path', deprecated_group='bay_heat', help=_( 'Location of template to build a k8s cluster on atomic. ')), cfg.StrOpt('k8s_coreos_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster-coreos.yaml'), help=_( 'Location of template to build a k8s cluster on coreos. ')), cfg.StrOpt('coreos_discovery_token_url', default=None, deprecated_name='discovery_token_url', deprecated_group='bay_heat', help=_('coreos discovery token url.')), cfg.StrOpt('swarm_atomic_template_path',
from magnum.common import clients from magnum.common import exception from magnum.common import paths from magnum.i18n import _ from magnum.i18n import _LW from requests import exceptions as req_exceptions LOG = logging.getLogger(__name__) template_def_opts = [ cfg.StrOpt('k8s_atomic_template_path', default=paths.basedir_def('templates/kubernetes/' 'kubecluster.yaml'), deprecated_name='template_path', deprecated_group='bay_heat', help=_( 'Location of template to build a k8s cluster on atomic.')), cfg.StrOpt('k8s_coreos_template_path', default=paths.basedir_def('templates/kubernetes/' 'kubecluster-coreos.yaml'), help=_( 'Location of template to build a k8s cluster on CoreOS.')), cfg.StrOpt('etcd_discovery_service_endpoint_format', default='https://discovery.etcd.io/new?size=%(size)d', help=_('Url for etcd public discovery endpoint.')), cfg.StrOpt('mesos_ubuntu_template_path', default=paths.basedir_def('templates/mesos/' 'mesoscluster.yaml'),
from magnum.common import clients from magnum.common import exception from magnum.common import paths from magnum.i18n import _ from magnum.i18n import _LW LOG = logging.getLogger(__name__) KUBE_SECURE_PORT = '6443' KUBE_INSECURE_PORT = '8080' DOCKER_PORT = '2376' template_def_opts = [ cfg.StrOpt( 'k8s_atomic_template_path', default=paths.basedir_def('templates/kubernetes/' 'kubecluster.yaml'), deprecated_name='template_path', deprecated_group='bay_heat', help=_('Location of template to build a k8s cluster on atomic.')), cfg.StrOpt( 'k8s_coreos_template_path', default=paths.basedir_def('templates/kubernetes/' 'kubecluster-coreos.yaml'), help=_('Location of template to build a k8s cluster on CoreOS.')), cfg.StrOpt('etcd_discovery_service_endpoint_format', default='https://discovery.etcd.io/new?size=%(size)d', help=_('Url for etcd public discovery endpoint.')), cfg.StrOpt('swarm_atomic_template_path', default=paths.basedir_def('templates/swarm/' 'swarmcluster.yaml'), help=_('Location of template to build a swarm '
# License for the specific language governing permissions and limitations # under the License. import os import sys from glob import glob from oslo_config import cfg from yaml import load from magnum.common import paths from magnum.tests import base cfg.CONF.register_opts([cfg.StrOpt('template_path', default=paths.basedir_def('templates'), help='Heat template path')]) class TestTemplate(base.TestCase): def test_template_yaml(self): for yml in [y for x in os.walk(cfg.CONF.template_path) for y in glob(os.path.join(x[0], '*.yaml'))]: with open(yml, 'r') as f: yml_contents = f.read() try: load(yml_contents) except Exception: error_msg = "file: %s: %s" % (yml, sys.exc_info()[1]) self.fail(error_msg)
from magnum.common import exception from magnum.common import paths from magnum.i18n import _ from magnum.i18n import _LW LOG = logging.getLogger(__name__) KUBE_SECURE_PORT = "6443" KUBE_INSECURE_PORT = "8080" DOCKER_PORT = "2376" template_def_opts = [ cfg.StrOpt( "k8s_atomic_template_path", default=paths.basedir_def("templates/kubernetes/" "kubecluster.yaml"), deprecated_name="template_path", deprecated_group="bay_heat", help=_("Location of template to build a k8s cluster on atomic."), ), cfg.StrOpt( "k8s_coreos_template_path", default=paths.basedir_def("templates/kubernetes/" "kubecluster-coreos.yaml"), help=_("Location of template to build a k8s cluster on CoreOS."), ), cfg.StrOpt( "etcd_discovery_service_endpoint_format", default="https://discovery.etcd.io/new?size=%(size)d", help=_("Url for etcd public discovery endpoint."), ), cfg.StrOpt(
import uuid from oslo_config import cfg from pkg_resources import iter_entry_points import requests import six from magnum.common import exception from magnum.openstack.common._i18n import _ from magnum.common import paths template_def_opts = [ cfg.StrOpt( 'k8s_atomic_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster.yaml'), deprecated_name='template_path', deprecated_group='k8s_heat', help=_('Location of template to build a k8s cluster on atomic. ')), cfg.StrOpt( 'k8s_coreos_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster-coreos.yaml'), help=_('Location of template to build a k8s cluster on coreos. ')), cfg.StrOpt('coreos_discovery_token_url', default=None, deprecated_name='discovery_token_url', deprecated_group='k8s_heat', help=_('coreos discovery token url.')), cfg.ListOpt('enabled_definitions', default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s'],
# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import os from glob import glob from oslo_config import cfg from yaml import load from magnum.common import paths from magnum.tests import base cfg.CONF.register_opts([cfg.StrOpt('template_path', default=paths.basedir_def('templates'), help='Heat template path')]) class TestTemplate(base.TestCase): def test_template_yaml(self): for yml in [y for x in os.walk(cfg.CONF.template_path) for y in glob(os.path.join(x[0], '*.yaml'))]: with open(yml, 'r') as f: yml_contents = f.read() load(yml_contents)
from oslo_log import log as logging from pkg_resources import iter_entry_points import requests import six from magnum.common import exception from magnum.common import paths from magnum.i18n import _ from magnum.i18n import _LW LOG = logging.getLogger(__name__) template_def_opts = [ cfg.StrOpt( 'k8s_atomic_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster.yaml'), deprecated_name='template_path', deprecated_group='bay_heat', help=_('Location of template to build a k8s cluster on atomic.')), cfg.StrOpt( 'k8s_coreos_template_path', default=paths.basedir_def('templates/heat-kubernetes/' 'kubecluster-coreos.yaml'), help=_('Location of template to build a k8s cluster on CoreOS.')), cfg.StrOpt('etcd_discovery_service_endpoint_format', default='https://discovery.etcd.io/new?size=%(size)d', help=_('Url for etcd public discovery endpoint.')), cfg.StrOpt('coreos_discovery_token_url', default=None, deprecated_name='discovery_token_url', deprecated_group='bay_heat',
from magnum.common import exception from magnum.common import paths from magnum.i18n import _ from magnum.i18n import _LW LOG = logging.getLogger(__name__) KUBE_SECURE_PORT = "6443" KUBE_INSECURE_PORT = "8080" DOCKER_PORT = "2376" template_def_opts = [ cfg.StrOpt( "k8s_atomic_template_path", default=paths.basedir_def("templates/heat-kubernetes/" "kubecluster.yaml"), deprecated_name="template_path", deprecated_group="bay_heat", help=_("Location of template to build a k8s cluster on atomic."), ), cfg.StrOpt( "k8s_coreos_template_path", default=paths.basedir_def("templates/heat-kubernetes/" "kubecluster-coreos.yaml"), help=_("Location of template to build a k8s cluster on CoreOS."), ), cfg.StrOpt( "etcd_discovery_service_endpoint_format", default="https://discovery.etcd.io/new?size=%(size)d", help=_("Url for etcd public discovery endpoint."), ), cfg.StrOpt(