attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.
After this, there are only 3 noqa under openstack_dashboard/ :)
Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
Cinder v2 support add or remove volume type access for the given
project since Kilo [1]. This patch add this feature to horizon.
At least cinderclient 1.2.0 is required to support volume type
access extension.
[1]:
https://specs.openstack.org/openstack/cinder-specs/specs/kilo/private-volume-types.html
Implements blueprint: volume-type-access
Change-Id: I323d47ab2aed13305b609e27f8f959f40988537d
The VERSIONS.get_version returned a Version object instead of a string,
it will raise ValueError: Circular reference detected when json encode.
This issue was introduced by commit
834722cf8af7b3471e9c7234da0bac8669025ca2
Change-Id: Ib41b2f7e77ac49911e9d5a4e129047f941bf5d24
Closes-bug: #1672291
The semantic_version.Version objects don't properly support hashing,
so we need to handle that in our wrapper, so that the "in" operator
can work properly with sets and dicts.
Closes-Bug: #1649819
Change-Id: I85e2b2214546817ef4da136b7d4267985ced94dc
1.As mentioned in [1], we should avoid using six.iteritems
to achieve iterators. We can use dict.items instead, as it will
return iterators in PY3 as well. And dict.items/keys will more
readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I88c133a37a11ef9049766a151a134106440bef6a
Even if Horizon is configured to use internal endpoints for requests
made by its server side to other OpenStack services, the client side
should not be restricted to run only in networks which have access to
the internal endpoints.
Change-Id: Ibdc663a133670e8f07530c0d7c5ed7df2d92b99b
Closes-Bug: #1639080
There was an extra variable for the so called "missing"
quotas since 2013. This patch merges them with the
normal nova quotas, cleans up the tests, removes any
usage of that special var and as a side effect, adds
the missing keys to the project quota update page.
Change-Id: Icaac1ebb1749e13fdfc307e89dcc6bbd64bef922
Closes-Bug: 1655393
Added server-side filtering for containers in swift UI using the
magic search directive.
Change-Id: Id0eaa818fab8b2c7d7a0ab40c1a943c2e7342f10
Partial-Implements: blueprint server-side-filtering
As from OpenStack Ocata calls to novaclient.v2.contrib.instance_action
and novaclient.v2.contrib.list_extensions are deprecated
in favour of novaclient.v2.instance_action and
novaclient.v2.list_extensions respectively
Closes-bug: #1661767
Change-Id: I75d89a897093ef24fdb7f2c4a7c29c00fb3b2327
Horizon will get all servers from Nova in different several places,
but sometimes it only need ID and name instead of all the related
information of servers. novaclient already support 'detailed=False'
param for servers query.
Horizon page loading performance can also be improved with this patch.
Closes-Bug: #1661423
Change-Id: Ic4cc95cb4eaed0461a22ab1045fa83ba5a5e9ce4
When the nova client creates a new session, knowing only the ID and
project of a token but not the project's domain, it calls keystoneauth
with None as the project domain. Keystoneauth takes this to mean
novaclient wants to authenticate with the Identity v2.0 API, which
fails if the user is a federated user. This patch grabs the project
domain ID from the request and passes it along to novaclient so that it
can properly create a v3 Token session.
Change-Id: I7f00a9fefd64c453c40b08fbe235ac7e42153050
Depends-on: I18a9d42906cb2116903600d47880ebdfff1e1ef9
Partial-bug: #1660436
Since the APIVersionManager stored the version numbers as ints and
floats, it was not possible to distinguish between version 1.2 and 1.20,
and also version 1.2 would be considered higher than version 1.13. With
the introduction of microversioning in some services, the version
numbers inflate quickly, making this a problem.
This patch wraps the version numbers in a Version object, that stores
the information as a semantic_version and correctly compares with other
Version objects, as well as ints, floats and strings.
It also removes the check for version being specified as a string, so
that it's possible to specify versions such as 1.20 without having to
explicitly create Version objects.
Change-Id: I0b0d87582d617290f08359ad181216cb99edb768
Closes-Bug: #1649819
In api/neutron.py [1], there is a logging, which throws a TypeError,
because the arguments of the format message is passed as a tuple,
which is not working when you pass the arguments to the logger,
instead of replacing in-place. In the current code, running the log
message leds to the following:
TypeError: not enough arguments for format string
Call stack:
File "test.py", line 9, in <module>
"router=%s", (router_id, router))
Message: 'router_static_route_list(): router_id=%s, router=%s'
Arguments: (('asd', 'asdf'),)
In this patchset, this bug is fixed.
[1]: https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/neutron.py#L1079
Change-Id: I233c435bb7ca89c6c8ecd49a66bccb5b59eedf41
Closes-Bug: #1659342
Always try to request and use version 2.40 of the nova api for that
particular call, so that we can use pagination.
Change-Id: I5890776bb273f6dd20807dc0d315f4c67785fcc4
Stitches back together all the pages for the os-simple-tenant-usage
call, so that the usage statistics are complete.
Implements blueprint paginate-simple-tenant-usage
Depends-on: If99db6933de012b71cf2c982075f08b3e664361e
Change-Id: I8c1206807f707ef47dd92e3cb663970804e3ec8e
The volume backup code is passing '' as a default container name,
which will cause cinder/swift to fail. If no container name is provided,
the default value of None will enable the auto creation of a container correctly.
Change-Id: I7813153c65652ce6e1a5ac03204a8738eefdc64e
Closes-Bug: #1658137
The scheduler_hints option is missing from server_create rest api.
This patch adds it.
Change-Id: Iab587abecbfd73fec8e966ca86cdde7242c80207
Closes-bug: #1655255
Following advice from the folk in #openstack-nova, we should make some
small changes to how we use novaclient to prevent a breakage in the
future.
Change-Id: I71795b4267edc76bb8b6c0914521f913b6c643a9
It is a variation of existing fix_auth_url_version() call which
returns as a second value a boolean flag indicating whether the
auth_url was fixed to point to /v3 endpoint. So we could display a
more clear message to deployers from Horizon, based on the value of
this flag. The legacy fix_auth_url_version() call is to be phased out
as soon as Horizon cease to depend on it. Also provide a release note
about removing the old function.
Change-Id: I6c6a35b1c460e22dadf39634fce1bdfa257b8c63
Depends-On: I3a04d838a707465c8c6e81e0e6e2fcf918b7b059
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
This patch handles an exception that is raised when the network service
is not present. When unhandled, this causes the sidebar to not exist.
Change-Id: Ic5a94b267158d17a145c64c75fd7bf88e98478fa
Closes-Bug: 1647766
Since Horizon is going to be the first (or, one of the first)
OpenStack component using the new MongoDB driver, it won't be able to
retrieve traces made by other components using MongoDB driver (which
it should use because Ceilometer driver was too slow) for a
while. This means that Horizon itself is responsible for tracing the
rendering of its pages down to the layer where the flow of control
leaves Horizon domain. So, a lot of api wrappers in
openstack_dashboard.api are augmented with tracing decorator to
achieve this goal.
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Implements-blueprint: openstack-profiler-at-developer-dashboard
Change-Id: Ib36692f0e9e68ed7fa0cd47919ba6581c9c8ab57
The containers module was using an incorrect ID in the "Size" column,
preventing the user from sorting by "Size". This change updates the
ID s/size/bytes/ which is the resource property holding the actual object size
in Bytes.
This change also updates the default "subdir" size to 0, that is the
default value returned in the "Content-Length" header for "subdirectories"
Change-Id: I98d164ec1a08d15f25fcdbc92f45e46c9fa6e5c4
Closes-bug: 1643710
The description for the OPENSTACK_KEYSTONE_DEFAULT_DOMAIN django
variable claims it refers to the ID of the domain. However, the
authenticate method of django_openstack_auth explicitly uses the name
when it requests a token[1], and when multidomain support is enabled
the user is asked for the domain name, not ID. If the operator tries to
set this variable to the ID of any domain besides keystone's own
Default domain, login will fail with "Could not find domain: <domain
ID>" in the keystone logs. This patch forces horizon to use the
variable as a name instead of an ID and updates the comment, so that
everything using this variable is consistent with each other.
This wasn't caught before because the unit tests were only testing
against the default domain, so this patch also adds a second, enabled,
non-default mock domain to test with.
[1] http://git.openstack.org/cgit/openstack/django_openstack_auth/tree/openstack_auth/backend.py?h=2.4.1#n148
Change-Id: I4d16f831c9fc446859c9fb964b7609d5a76338fe
Currently Horizon unable to change quotas if routers extension is
disabled, fix this by adding router and floatingip quotas to
disabled_quotas when router extension is disabled.
Change-Id: I14d8a6e2e439ab48b62ce64c88ebb4643d11e49f
Closes-bug: #1457598
Fix TODO related to security groups of an instance.
Co-Authored-By: Gleb Stepanov <gstepanov@mirantis.com>
Signed-off-by: Cristiana Voicu <cristiana.voicu@orange.com>
Change-Id: I7749c9d64bfd41086a6adfc4c3afd8b4c5029402
Fixes-Bug: 1641042
Fixes situation where exception and error is displayed for
Instance names which have a leading or trailing space.
Change-Id: Ida8d1f01acbaf4820e5fa94d12372a459bba8ed5
Closes-bug: #1634696
"openstack_dashboard.api.keystone: Unable to retrieve Domain: default"
incessant warning logging when switching Projects while being on the
Identity>Project panel.
Retrieving domain information is a Keystone admin URL operation. As a
pre-check, such operations would be Forbidden if the logon user does not
have an 'admin' role on the current project.
Since this is a common occurence, and can cause incessant warning
logging in the horizon logs, we recognize this condition and return the
user's domain information instead.
Signed-off-by: Kam Nasim <kam.nasim@windriver.com>
Closes-Bug: #1638662
Change-Id: Iadd5184a16a73da1da5a7230c89e996248f1eba7
LBaaS v1 feature was removed from neutron-lbaas in Newton.
There is no reason we have LBaaS v1 dashboard in Ocata or later.
Change-Id: Ic7d4ceea1943c3721500ce4b7f769b9dba28a359
Closes-Bug: #1624655
Adding REST API calls to retrieve group list
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>
Partially-Implements: blueprint angularize-identity-tables
Change-Id: I12ca270036b4963fb20d3f6f1a630ded60a449f8