Skip to content

Commit

Permalink
Merge pull request #19 from stackhpc/upstream/yoga-2023-05-24
Browse files Browse the repository at this point in the history
Synchronise yoga with upstream
  • Loading branch information
darmach authored May 25, 2023
2 parents 1bcb92c + 5c8a8ba commit fa7c917
Show file tree
Hide file tree
Showing 20 changed files with 783 additions and 449 deletions.
8 changes: 8 additions & 0 deletions .zuul.d/nodejs-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
vars:
node_version: 14
tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
# NOTE: This is stable branch (<=stable/zed) job and new tox 4
# require some changes in tox.ini to be compatible with it. Let's
# pin tox <4 for stable branches testing (<=stable/zed).
ensure_tox_version: '<4'
nodeset: ubuntu-focal
pre-run: playbooks/horizon-nodejs/pre.yaml
required-projects:
Expand All @@ -20,6 +24,10 @@
vars:
node_version: 14
tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
# NOTE: This is stable branch (<=stable/zed) job and new tox 4
# require some changes in tox.ini to be compatible with it. Let's
# pin tox <4 for stable branches testing (<=stable/zed).
ensure_tox_version: '<4'
pre-run: playbooks/horizon-nodejs/pre.yaml
nodeset: ubuntu-focal
required-projects:
Expand Down
4 changes: 2 additions & 2 deletions horizon/templates/auth/_login_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h3 class="login-title">
{% endcomment %}
{% if HORIZON_CONFIG.password_autocomplete != "on" %}
<div class="fake_credentials" style="display: none">
<input type="text" name="fake_email" value="" />
<input type="password" name="fake_password" value="" />
<input type="text" name="fake_email" value="" autocomplete="new-password"/>
<input type="password" name="fake_password" value="" autocomplete="new-password"/>
</div>
{%endif%}
{% if show_sso_opts %}
Expand Down
4 changes: 2 additions & 2 deletions horizon/test/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class WrapperFindOverride(object):
"""Mixin for overriding find_element methods."""

def find_element(self, by=by.By.ID, value=None):
repeat = range(2)
repeat = range(10)
for i in repeat:
try:
web_el = super().find_element(by, value)
Expand All @@ -48,7 +48,7 @@ def find_element(self, by=by.By.ID, value=None):
self)

def find_elements(self, by=by.By.ID, value=None):
repeat = range(2)
repeat = range(10)
for i in repeat:
try:
web_els = super().find_elements(by, value)
Expand Down
1 change: 1 addition & 0 deletions openstack_dashboard/api/microversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"auto_allocated_network": ["2.37", "2.60"],
"key_types": ["2.2", "2.9"],
"key_type_list": ["2.9"],
"rescue_instance_volume_based": ["2.87", "2.93"],
},
"cinder": {
"groups": ["3.27", "3.43", "3.48", "3.58"],
Expand Down
15 changes: 9 additions & 6 deletions openstack_dashboard/api/nova.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def server_list_paged(request,
deleted = request.session.pop('server_deleted',
None)
view_marker = 'possibly_deleted' if deleted and marker else 'ok'
search_opts['marker'] = deleted if deleted else marker
search_opts['marker'] = marker if marker or deleted else None
search_opts['limit'] = page_size + 1
# NOTE(amotoki): It looks like the 'sort_keys' must be unique to make
# the pagination in the nova API works as expected. Multiple servers
Expand All @@ -505,7 +505,7 @@ def server_list_paged(request,
servers = [Server(s, request)
for s in
nova_client.servers.list(detailed,
search_opts,
search_opts=search_opts,
sort_keys=sort_keys,
sort_dirs=['desc'] * 3)]
if not servers:
Expand All @@ -514,7 +514,7 @@ def server_list_paged(request,
servers = [Server(s, request)
for s in
nova_client.servers.list(detailed,
search_opts,
search_opts=search_opts,
sort_keys=sort_keys,
sort_dirs=['asc'] * 3)]
(servers, has_more_data, has_prev_data) = update_pagination(
Expand Down Expand Up @@ -665,9 +665,12 @@ def server_metadata_delete(request, instance_id, keys):

@profiler.trace
def server_rescue(request, instance_id, password=None, image=None):
_nova.novaclient(request).servers.rescue(instance_id,
password=password,
image=image)
microversion = get_microversion(request, "rescue_instance_volume_based")
_nova.novaclient(request, version=microversion).servers.rescue(
instance_id,
password=password,
image=image
)


@profiler.trace
Expand Down
4 changes: 2 additions & 2 deletions openstack_dashboard/dashboards/admin/flavors/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CreateFlavorInfoAction(workflows.Action):
_flavor_id_regex = (r'^[a-zA-Z0-9. _-]+$')
_flavor_id_help_text = _("flavor id can only contain alphanumeric "
"characters, underscores, periods, hyphens, "
"spaces.")
"spaces. Use 'auto' to automatically generate id")
name = forms.CharField(
label=_("Name"),
max_length=255)
Expand Down Expand Up @@ -93,7 +93,7 @@ def clean(self):
error_msg = _('The name "%s" is already used by '
'another flavor.') % name
self._errors['name'] = self.error_class([error_msg])
if flavor.id == flavor_id:
if (flavor.id != 'auto') and (flavor.id == flavor_id):
error_msg = _('The ID "%s" is already used by '
'another flavor.') % flavor_id
self._errors['flavor_id'] = self.error_class([error_msg])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,9 @@ <h4 translate>Image Source</h4>
<label class="control-label" for="imageForm-image_url">
<translate>File</translate><span class="hz-icon-required fa fa-asterisk"></span>
</label>
<div class="input-group" ng-hide="ctrl.uploadProgress > -1">
<span class="input-group-btn">
<button class="btn btn-primary" ng-model="image_file"
ngf-select="ctrl.prepareUpload(image_file)"
name="image_file" ng-required="true"
ng-disabled="viewModel.isSubmitting"
id="imageForm-image_file" translate>Browse...</button>
</span>
<input type="text" class="form-control" readonly ng-model="image_file.name">
<div ng-hide="ctrl.uploadProgress > -1">
<input type="file" ng-model="image_file" ngf-select="ctrl.prepareUpload(image_file)"
name="image_file" ng-required="true" ng-disabled="viewModel.isSubmitting">
</div>
<div ng-hide="ctrl.uploadProgress < 0" class="progress-text">
<uib-progressbar value="ctrl.uploadProgress"></uib-progressbar>
Expand Down Expand Up @@ -239,7 +233,7 @@ <h4 translate>Image Sharing</h4>
<translate>Visibility</translate>
</label>
<div class="form-field">
<div class="btn-group">
<div class="btn-group" name="visibility">
<label class="btn btn-default"
ng-repeat="option in ctrl.imageVisibilityOptions"
ng-model="ctrl.image.visibility"
Expand All @@ -254,7 +248,7 @@ <h4 translate>Image Sharing</h4>
<translate>Protected</translate>
</label>
<div class="form-field">
<div class="btn-group">
<div class="btn-group" name="protected">
<label class="btn btn-default"
ng-repeat="option in ctrl.imageProtectedOptions"
ng-model="ctrl.image.protected"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h4 translate>Image Sharing</h4>
<div class="form-group">
<label class="control-label required" translate>Visibility</label>
<div class="form-field">
<div class="btn-group">
<div class="btn-group" name="visibility">
<label class="btn btn-default"
ng-repeat="option in ctrl.imageVisibilityOptions"
ng-model="ctrl.image.visibility"
Expand All @@ -139,7 +139,7 @@ <h4 translate>Image Sharing</h4>
<div class="form-group">
<label class="control-label required" translate>Protected</label>
<div class="form-field">
<div class="btn-group">
<div class="btn-group" name="protected">
<label class="btn btn-default"
ng-repeat="option in ctrl.imageProtectedOptions"
ng-model="ctrl.image.protected"
Expand Down
7 changes: 7 additions & 0 deletions openstack_dashboard/test/integration_tests/basewebobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ def wait_till_element_disappears(self, element_getter):
# it will raise the NoSuchElementException exception.
pass

def wait_until_element_is_visible(self, locator):
with self.waits_disabled():
try:
self._wait_till_element_visible(locator)
except Exceptions.NoSuchElementException:
pass

def wait_till_spinner_disappears(self):
def getter():
return self.driver.find_element(*self._spinner_locator)
Expand Down
6 changes: 3 additions & 3 deletions openstack_dashboard/test/integration_tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
default='angular',
help='type/version of images panel'),
cfg.StrOpt('http_image',
default='http://download.cirros-cloud.net/0.3.1/'
'cirros-0.3.1-x86_64-uec.tar.gz',
default='http://download.cirros-cloud.net/0.5.2/'
'cirros-0.5.2-x86_64-uec.tar.gz',
help='http accessible image'),
cfg.ListOpt('images_list',
default=['cirros-0.3.5-x86_64-disk'],
default=['cirros-0.5.2-x86_64-disk'],
help='default list of images')
]

Expand Down
5 changes: 3 additions & 2 deletions openstack_dashboard/test/integration_tests/horizon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ panel_type=legacy
[image]
# http accessible image (string value)
panel_type=angular
http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
images_list=cirros-0.3.5-x86_64-disk
http_image=http://download.cirros-cloud.net/0.5.2/cirros-0.5.2-x86_64-uec.tar.gz
images_list=cirros-0.5.2-x86_64-disk


[identity]
# Username to use for non-admin API requests. (string value)
Expand Down
Loading

0 comments on commit fa7c917

Please sign in to comment.