Ejemplo n.º 1
0
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _

from horizon import exceptions
from horizon import forms
from horizon import messages

from openstack_dashboard import api

from openstack_dashboard.dashboards.project.instances \
    import tables as project_tables

from openstack_dashboard.REST.RESTClient import RESTClient
server = RESTClient.get_instance()


class Response(object):
    def __init__(self, code, message=None, data=None):
        self.code = code
        self.message = message
        self.data = data


class AddForm(forms.SelfHandlingForm):
    instance_id = forms.ChoiceField(label=_("Instance"))

    def __init__(self, request, *args, **kwargs):
        super(AddForm, self).__init__(request, *args, **kwargs)
        authUrl = "http://*****:*****@127.0.0.1:61209"
Ejemplo n.º 2
0
    import workflows as ha_cluster_workflows

from openstack_dashboard.REST.RESTClient import RESTClient

import xmlrpclib

import ConfigParser
import MySQLdb, MySQLdb.cursors
from horizon import exceptions

LOG = logging.getLogger(__name__)

config = ConfigParser.RawConfigParser()
config.read('/refactor-HASS/hass.conf')

server = RESTClient.getInstance()


class Response(object):
    def __init__(self, code, message=None, data=None):
        self.code = code
        self.message = message
        self.data = data


class Cluster:
    def __init__(self, cluster_name, id, computing_node_number,
                 instance_number):
        self.id = id
        self.cluster_name = cluster_name
        self.computing_node_number = computing_node_number