Merge "New name for services. service_type -> type"
This commit is contained in:
commit
1391d75788
|
@ -221,6 +221,8 @@ def services_list(request, environment_id):
|
|||
|
||||
for service_item in environment.services:
|
||||
service_data = service_item
|
||||
service_data['full_service_name'] = \
|
||||
SERVICE_NAME_DICT[service_data['type']]
|
||||
try:
|
||||
reports = muranoclient(request).sessions.\
|
||||
reports(environment_id, session_id, service_data['id'])
|
||||
|
@ -247,14 +249,14 @@ def service_list_by_type(request, environment_id, service_name):
|
|||
services = services_list(request, environment_id)
|
||||
log.debug('Service::Instances::List')
|
||||
return [service for service in services
|
||||
if service['service_type'] == service_name]
|
||||
if service['type'] == service_name]
|
||||
|
||||
|
||||
def service_create(request, environment_id, parameters):
|
||||
# we should be able to delete session
|
||||
# if we what add new services to this environment
|
||||
session_id = Session.get_or_create_or_delete(request, environment_id)
|
||||
log.debug('Service::Create {0}'.format(parameters['service_type']))
|
||||
log.debug('Service::Create {0}'.format(parameters['type']))
|
||||
return muranoclient(request).services.post(environment_id,
|
||||
path='/',
|
||||
data=parameters,
|
||||
|
|
|
@ -12,14 +12,18 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
AD_NAME = 'Active Directory'
|
||||
IIS_NAME = 'IIS'
|
||||
ASP_NAME = 'ASP.NET Application'
|
||||
IIS_FARM_NAME = 'IIS Farm'
|
||||
ASP_FARM_NAME = 'ASP.NET Farm'
|
||||
AD_NAME = 'activeDirectory'
|
||||
IIS_NAME = 'webServer'
|
||||
ASP_NAME = 'aspNetApp'
|
||||
IIS_FARM_NAME = 'aspNetAppFarm'
|
||||
ASP_FARM_NAME = 'webServerFarm'
|
||||
|
||||
SERVICE_NAMES = (AD_NAME, IIS_NAME, ASP_NAME, IIS_FARM_NAME, ASP_FARM_NAME)
|
||||
|
||||
SERVICE_NAME_DICT = {AD_NAME: 'Active Directory',
|
||||
IIS_NAME: 'IIS',
|
||||
ASP_NAME: 'ASP.NET Application',
|
||||
IIS_FARM_NAME: 'IIS Farm',
|
||||
ASP_FARM_NAME: 'ASP.NET Farm'}
|
||||
|
||||
STATUS_ID_READY = 'ready'
|
||||
STATUS_ID_PENDING = 'pending'
|
||||
|
|
|
@ -212,7 +212,7 @@ class ServicesTable(tables.DataTable):
|
|||
verbose_name=_('Name'),
|
||||
link=get_service_details_link)
|
||||
|
||||
_type = tables.Column('service_type',
|
||||
_type = tables.Column('full_service_name',
|
||||
verbose_name=_('Type'))
|
||||
|
||||
status = tables.Column('status',
|
||||
|
|
|
@ -46,7 +46,7 @@ class OverviewTab(tabs.Tab):
|
|||
detail_info = SortedDict([
|
||||
('Name', service_data.name),
|
||||
('ID', service_data.id),
|
||||
('Type', service_data.service_type),
|
||||
('Type', service_data.full_service_name),
|
||||
('Status', status_name), ])
|
||||
|
||||
if hasattr(service_data, 'unitNamingPattern'):
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
# under the License.
|
||||
|
||||
import logging
|
||||
from muranoclient.common.exceptions import HTTPUnauthorized, \
|
||||
CommunicationError, HTTPInternalServerError, HTTPForbidden
|
||||
|
||||
import re
|
||||
|
||||
from django.core.urlresolvers import reverse, reverse_lazy
|
||||
|
@ -29,13 +26,15 @@ from horizon import tables
|
|||
from horizon import workflows
|
||||
from horizon import messages
|
||||
from horizon.forms.views import ModalFormMixin
|
||||
|
||||
from muranodashboard.panel import api
|
||||
|
||||
from tables import EnvironmentsTable, ServicesTable
|
||||
from workflows import CreateEnvironment, UpdateEnvironment
|
||||
from tabs import ServicesTabs
|
||||
from forms import AD_NAME, IIS_NAME, ASP_NAME, IIS_FARM_NAME, ASP_FARM_NAME
|
||||
|
||||
from muranodashboard.panel import api
|
||||
from muranoclient.common.exceptions import HTTPUnauthorized, \
|
||||
CommunicationError, HTTPInternalServerError, HTTPForbidden
|
||||
|
||||
from consts import AD_NAME, IIS_NAME, ASP_NAME, IIS_FARM_NAME, ASP_FARM_NAME
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -82,7 +81,7 @@ class Wizard(ModalFormMixin, SessionWizardView):
|
|||
step1_data = form_list[1].cleaned_data
|
||||
|
||||
service_type = step0_data.get('service', '')
|
||||
parameters = {'service_type': service_type}
|
||||
parameters = {'type': service_type}
|
||||
|
||||
parameters['units'] = []
|
||||
parameters['unitNamingPattern'] = step1_data.get(
|
||||
|
@ -160,7 +159,7 @@ class Wizard(ModalFormMixin, SessionWizardView):
|
|||
context = super(Wizard, self).get_context_data(form=form, **kwargs)
|
||||
if self.steps.index > 0:
|
||||
data = self.get_cleaned_data_for_step('service_choice')
|
||||
context.update({'service_type': data['service']})
|
||||
context.update({'type': data['service']})
|
||||
return context
|
||||
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
first {% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
{% if wizard.steps.index == 1 %}
|
||||
<h3> {% blocktrans %} {{ service_type }} Service{% endblocktrans %} </h3>
|
||||
{% if service_type == 'Active Directory' %}
|
||||
<h3> {% blocktrans %} {{ type }} Service{% endblocktrans %} </h3>
|
||||
{% if type == 'activeDirectory' %}
|
||||
<p>
|
||||
<strong>{% blocktrans %} Domain Name: {% endblocktrans %}</strong>
|
||||
{% blocktrans %} Enter a desired name for a new domain. This name should fit in standard Windows domain name requirements: it should contain only A-Z, a-z, 0-9, and (-) and should not start or end with a dash.
|
||||
|
@ -66,7 +66,7 @@
|
|||
{% blocktrans %} Once you forget your password you won't be able to operate the service until recovery password would be entered. So it's better for Recovery and Administrator password to be different. {% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% elif service_type == 'ASP.NET Application' %}
|
||||
{% elif type == 'aspNetApp' %}
|
||||
{% blocktrans %} ASP.NET application will be installed onto one IISWeb Server {% endblocktrans %}
|
||||
<p>
|
||||
<strong>{% blocktrans %} Service Name: {% endblocktrans %}</strong>
|
||||
|
@ -86,7 +86,7 @@
|
|||
{% blocktrans %} URL of a git repository with the application you want to deploy. {% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% elif service_type == 'ASP.NET Farm' %}
|
||||
{% elif type == 'aspNetAppFarm' %}
|
||||
<p>
|
||||
{% blocktrans %} The ASP.NET application will be installed on a number of IIS Web Servers, and load balancing will be configured. {% endblocktrans %}
|
||||
</p>
|
||||
|
@ -108,7 +108,7 @@
|
|||
{% blocktrans %} Specify port number where Load Balancer will be running {% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% elif service_type == 'IIS' %}
|
||||
{% elif type == 'webServer' %}
|
||||
<p>{% blocktrans %} Standalone IIS Server {% endblocktrans %}</p>
|
||||
<p>
|
||||
<strong>{% blocktrans %} Service Name: {% endblocktrans %}</strong>
|
||||
|
@ -125,7 +125,7 @@
|
|||
{% blocktrans %} Service can be joined to the Active Directory domain. If you want to create an AD domain create the AD Service first. {% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% elif service_type == 'IIS Farm' %}
|
||||
{% elif type == 'webServerFarm' %}
|
||||
<p>{% blocktrans %} A load-balanced array of IIS servers {% endblocktrans %}</p>
|
||||
<p>
|
||||
<strong>{% blocktrans %} Service Name: {% endblocktrans %}</strong>
|
||||
|
@ -148,7 +148,7 @@
|
|||
<strong>{% blocktrans %} Load Balancer port {% endblocktrans %}</strong>
|
||||
{% blocktrans %} Specify port number where Load Balancer will be running {% endblocktrans %}
|
||||
</p>
|
||||
{% elif service_type == '' %}
|
||||
{% elif type == '' %}
|
||||
<p>{% blocktrans %} Please try again {% endblocktrans %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue