Merge remote-tracking branch 'origin/master' into f4-merge-branch

Change-Id: Ie6c321e67aa9338334e4649879e60847a5d1eb56
This commit is contained in:
Dean Troyer 2017-09-14 11:06:51 -05:00
commit 5309bf5f87
78 changed files with 7842 additions and 1864 deletions

View File

@ -0,0 +1,22 @@
# Redirect docs from the old to new location following the Great Docs Migration of 2017
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-objects/([^/.]+).html$ /python-openstackclient/$1/cli/command-objects/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/authentication.html$ /python-openstackclient/$1/cli/authentication.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/backward-incompatible.html$ /python-openstackclient/$1/cli/backward-incompatible.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-list.html$ /python-openstackclient/$1/cli/command-list.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/commands.html$ /python-openstackclient/$1/cli/commands.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/decoder.html$ /python-openstackclient/$1/cli/decoder.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/interactive.html$ /python-openstackclient/$1/cli/interactive.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/specs/([^/.]+).html$ /python-openstackclient/$1/contributor/specs/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-beta.html$ /python-openstackclient/$1/contributor/command-beta.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-errors.html$ /python-openstackclient/$1/contributor/command-errors.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-logs.html$ /python-openstackclient/$1/contributor/command-logs.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-options.html$ /python-openstackclient/$1/contributor/command-options.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-wrappers.html$ /python-openstackclient/$1/contributor/command-wrappers.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/developing.html$ /python-openstackclient/$1/contributor/developing.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/humaninterfaceguide.html$ /python-openstackclient/$1/contributor/humaninterfaceguide.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugins.html$ /python-openstackclient/$1/contributor/plugins.html

View File

@ -2,149 +2,25 @@
container
=========
Object Storage v1
A **container** defines a namespace for **objects**. Applies to Object Storage v1
container create
----------------
.. autoprogram-cliff:: openstack.object_store.v1
:command: container create
Create new container
.. autoprogram-cliff:: openstack.object_store.v1
:command: container delete
.. program:: container create
.. code:: bash
.. autoprogram-cliff:: openstack.object_store.v1
:command: container list
openstack container create
<container-name> [<container-name> ...]
.. autoprogram-cliff:: openstack.object_store.v1
:command: container save
.. describe:: <container-name>
.. autoprogram-cliff:: openstack.object_store.v1
:command: container set
New container name(s)
.. autoprogram-cliff:: openstack.object_store.v1
:command: container show
container delete
----------------
Delete container
.. program:: container delete
.. code:: bash
openstack container delete
[-r] | [--recursive]
<container> [<container> ...]
.. option:: --recursive, -r
Recursively delete objects in container before container delete
.. describe:: <container>
Container(s) to delete
container list
--------------
List containers
.. program:: container list
.. code:: bash
openstack container list
[--prefix <prefix>]
[--marker <marker>]
[--end-marker <end-marker>]
[--limit <num-containers>]
[--long]
[--all]
.. option:: --prefix <prefix>
Filter list using <prefix>
.. option:: --marker <marker>
Anchor for paging
.. option:: --end-marker <end-marker>
End anchor for paging
.. option:: --limit <num-containers>
Limit the number of containers returned
.. option:: --long
List additional fields in output
.. option:: --all
List all containers (default is 10000)
container save
--------------
Save container contents locally
.. program:: container save
.. code:: bash
openstack container save
<container>
.. describe:: <container>
Container to save
container set
-------------
Set container properties
.. program:: container set
.. code:: bash
openstack container set
[--property <key=value> [...] ]
<container>
.. option:: --property <key=value>
Set a property on this container (repeat option to set multiple properties)
.. describe:: <container>
Container to modify
container show
--------------
Display container details
.. program:: container show
.. code:: bash
openstack container show
<container>
.. describe:: <container>
Container to display
container unset
---------------
Unset container properties
.. program:: container unset
.. code:: bash
openstack container unset
[--property <key>]
<container>
.. option:: --property <key>
Property to remove from container (repeat option to remove multiple properties)
.. describe:: <container>
Container to modify
.. autoprogram-cliff:: openstack.object_store.v1
:command: container unset

View File

@ -16,7 +16,8 @@ Associate project with image
openstack image add project
[--project-domain <project-domain>]
<image> <project>
<image>
<project>
.. option:: --project-domain <project-domain>
@ -60,7 +61,8 @@ Create/upload an image
[--public | --private | --community | --shared]
[--property <key=value> [...] ]
[--tag <tag> [...] ]
[--project <project> [--project-domain <project-domain>]]
[--project <project>]
[--project-domain <project-domain>]
<image-name>
.. option:: --id <id>
@ -153,11 +155,11 @@ Create/upload an image
.. option:: --property <key=value>
Set a property on this image (repeat for multiple values)
Set a property on this image (repeat option to set multiple properties)
.. option:: --tag <tag>
Set a tag on this image (repeat for multiple values)
Set a tag on this image (repeat option to set multiple tags)
.. versionadded:: 2
@ -205,13 +207,12 @@ List available images
openstack image list
[--public | --private | --shared]
[--property <key=value>]
[--name <name>]
[--status <status>]
[--long]
[--sort <key>[:<direction>]]
[--limit <num-images>]
[--marker <image>]
[--name <name>]
[--status <status>]
.. option:: --public
@ -231,6 +232,18 @@ List available images
Filter output based on property
.. option:: --name <name>
Filter images based on name
*Image version 2 only.*
.. option:: --status <status>
Filter images based on status
*Image version 2 only*
.. option:: --long
List additional fields in output
@ -251,15 +264,6 @@ List available images
The last image of the previous page. Display list of images
after marker. Display all images if not specified. (name or ID)
.. option:: --name <name>
Filter images based on name
.. option:: --status <status>
Filter images based on status
*Image version 2 only*
image remove project
@ -272,7 +276,7 @@ Disassociate project with image
.. program:: image remove project
.. code:: bash
openstack image remove remove
openstack image remove project
[--project-domain <project-domain>]
<image>
<project>
@ -347,8 +351,9 @@ Set image properties
[--os-distro <os-distro>]
[--os-version <os-version>]
[--ramdisk-id <ramdisk-id>]
[--activate|--deactivate]
[--project <project> [--project-domain <project-domain>]]
[--deactivate | --activate]
[--project <project>]
[--project-domain <project-domain>]
[--accept | --reject | --pending]
<image>
@ -460,7 +465,7 @@ Set image properties
.. option:: --tag <tag>
Set a tag on this image (repeat for multiple values)
Set a tag on this image (repeat option to set multiple tags)
.. versionadded:: 2
@ -500,18 +505,18 @@ Set image properties
.. versionadded:: 2
.. option:: --activate
Activate the image.
.. versionadded:: 2
.. option:: --deactivate
Deactivate the image.
.. versionadded:: 2
.. option:: --activate
Activate the image.
.. versionadded:: 2
.. option:: --project <project>
Set an alternate project on this image (name or ID).
@ -568,8 +573,13 @@ Display image details
.. code:: bash
openstack image show
[--human-readable]
<image>
.. option:: --human-readable
Print image size in a human-friendly format.
.. _image_show-image:
.. describe:: <image>
@ -585,16 +595,16 @@ Unset image tags or properties
.. program:: image unset
.. code:: bash
openstack image set
openstack image unset
[--tag <tag>]
[--property <property>]
[--property <property-key>]
<image>
.. option:: --tag <tag>
Unset a tag on this image (repeat option to unset multiple tags)
.. option:: --property <property>
.. option:: --property <property-key>
Unset a property on this image (repeat option to unset multiple properties)

View File

@ -0,0 +1,57 @@
============
implied role
============
Identity v3
implied role create
-------------------
Creates an association between prior and implied roles
.. program:: implied role create
.. code:: bash
openstack implied role create
<role>
--implied-role <role>
.. option:: <role>
Prior role <role> (name or ID) implies another role
.. option:: --implied-role <role>
<role> (name or ID) implied by another role
implied role delete
-------------------
Deletes an association between prior and implied roles
.. program:: implied role delete
.. code:: bash
openstack implied role delete
<role>
--implied-role <role>
.. option:: <role>
Prior role <role> (name or ID) implies another role
.. option:: --implied-role <role>
<role> (name or ID) implied by another role
implied role list
-----------------
List implied roles
.. program:: implied role list
.. code:: bash
openstack implied role list

View File

@ -2,44 +2,14 @@
object store account
====================
Object Storage v1
An **object store account** represents the top-level of the hierarchy that
is comprised of **containers** and **objects**. Applies to Object Storage v1.
object store account set
------------------------
.. autoprogram-cliff:: openstack.object_store.v1
:command: object store account set
Set account properties
.. autoprogram-cliff:: openstack.object_store.v1
:command: object store account show
.. program:: object store account set
.. code:: bash
openstack object store account set
[--property <key=value> [...] ]
.. option:: --property <key=value>
Set a property on this account (repeat option to set multiple properties)
object store account show
-------------------------
Display account details
.. program:: object store account show
.. code:: bash
openstack object store account show
object store account unset
--------------------------
Unset account properties
.. program:: object store account unset
.. code:: bash
openstack object store account unset
[--property <key>]
.. option:: --property <key>
Property to remove from account (repeat option to remove multiple properties)
.. autoprogram-cliff:: openstack.object_store.v1
:command: object store account unset

View File

@ -2,195 +2,26 @@
object
======
Object Storage v1
An **object** stores data content, such as documents, images, and so on. They
can also store custom metadata with an object. Applies to Object Storage v1.
object create
-------------
.. autoprogram-cliff:: openstack.object_store.v1
:command: object create
Upload object to container
.. autoprogram-cliff:: openstack.object_store.v1
:command: object delete
.. program:: object create
.. code:: bash
.. autoprogram-cliff:: openstack.object_store.v1
:command: object list
openstack object create
[--name <name>]
<container>
<filename> [<filename> ...]
.. autoprogram-cliff:: openstack.object_store.v1
:command: object save
.. option:: --name <name>
.. autoprogram-cliff:: openstack.object_store.v1
:command: object set
Upload a file and rename it. Can only be used when uploading a single object
.. autoprogram-cliff:: openstack.object_store.v1
:command: object show
.. describe:: <container>
Container for new object
.. describe:: <filename>
Local filename(s) to upload
object delete
-------------
Delete object from container
.. program:: object delete
.. code:: bash
openstack object delete
<container>
<object> [<object> ...]
.. describe:: <container>
Delete object(s) from <container>
.. describe:: <object>
Object(s) to delete
object list
-----------
List objects
.. program object list
.. code:: bash
openstack object list
[--prefix <prefix>]
[--delimiter <delimiter>]
[--marker <marker>]
[--end-marker <end-marker>]
[--limit <num-objects>]
[--long]
[--all]
<container>
.. option:: --prefix <prefix>
Filter list using <prefix>
.. option:: --delimiter <delimiter>
Roll up items with <delimiter>
.. option:: --marker <marker>
Anchor for paging
.. option:: --end-marker <end-marker>
End anchor for paging
.. option:: --limit <num-objects>
Limit number of objects returned
.. option:: --long
List additional fields in output
.. option:: --all
List all objects in <container> (default is 10000)
.. describe:: <container>
Container to list
object save
-----------
Save object locally
.. program:: object save
.. code:: bash
openstack object save
[--file <filename>]
<container>
<object>
.. option:: --file <filename>
Destination filename (defaults to object name);
using - as the filename will print the file to stdout
.. describe:: <container>
Download <object> from <container>
.. describe:: <object>
Object to save
object set
----------
Set object properties
.. program:: object set
.. code:: bash
openstack object set
[--property <key=value> [...] ]
<container>
<object>
.. option:: --property <key=value>
Set a property on this object (repeat option to set multiple properties)
.. describe:: <container>
Modify <object> from <container>
.. describe:: <object>
Object to modify
object show
-----------
Display object details
.. program:: object show
.. code:: bash
openstack object show
<container>
<object>
.. describe:: <container>
Display <object> from <container>
.. describe:: <object>
Object to display
object unset
------------
Unset object properties
.. program:: object unset
.. code:: bash
openstack object unset
[--property <key>]
<container>
<object>
.. option:: --property <key>
Property to remove from object (repeat option to remove multiple properties)
.. describe:: <container>
Modify <object> from <container>
.. describe:: <object>
Object to modify
.. autoprogram-cliff:: openstack.object_store.v1
:command: object unset

View File

@ -18,7 +18,7 @@ Create new subnet
openstack subnet create
[--project <project> [--project-domain <project-domain>]]
[--subnet-pool <subnet-pool> | --use-default-subnet-pool [--prefix-length <prefix-length>]]
[--subnet-pool <subnet-pool> | --use-default-subnet-pool [--prefix-length <prefix-length>] | --use-prefix-delegation]
[--subnet-range <subnet-range>]
[--allocation-pool start=<ip-address>,end=<ip-address>]
[--dhcp | --no-dhcp]
@ -48,6 +48,11 @@ Create new subnet
Subnet pool from which this subnet will obtain a CIDR (name or ID)
.. option:: --use-prefix-delegation
Use 'prefix-delegation' if IP is IPv6 format and IP would be delegated
externally
.. option:: --use-default-subnet-pool
Use default subnet pool for :option:`--ip-version`

View File

@ -204,6 +204,7 @@ conflicts when creating new plugins. For a complete list check out
* ``data protection trigger``: (**Data Protection (Karbor)**)
* ``data protection checkpoint``: (**Data Protection (Karbor)**)
* ``data protection scheduledoperation``: (**Data Protection (Karbor)**)
* ``data protection operationlog``: (**Data Protection (Karbor)**)
* ``loadbalancer``: (**Load Balancer (Octavia)**)
* ``loadbalancer healthmonitor``: (**Load Balancer (Octavia)**)
* ``loadbalancer l7policy``: (**Load Balancer (Octavia)**)

View File

@ -58,11 +58,11 @@ ironic-inspector
.. list-plugins:: openstack.baremetal_introspection.v1
:detailed:
.. karbor
.. ------
.. bug 1705258: Exclude karborclient 0.4.0 until a fixed version is released.
.. .. list-plugins:: openstack.data_protection.v1
.. :detailed:
karbor
------
.. list-plugins:: openstack.data_protection.v1
:detailed:
mistral
-------

View File

@ -187,6 +187,9 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Output file base name for HTML help builder.
htmlhelp_basename = 'OpenStackCommandLineClientdoc'
# Add any paths that contain "extra" files, such as .htaccess or robots.txt
html_extra_path = ['_extra']
# -- Options for LaTeX output -------------------------------------------------
@ -278,4 +281,4 @@ autoprogram_cliff_application = 'openstack'
autoprogram_cliff_ignored = [
'--help', '--format', '--column', '--max-width', '--fit-width',
'--print-empty', '--prefix', '--noindent']
'--print-empty', '--prefix', '--noindent', '--quote']

View File

@ -14,7 +14,7 @@ for defining and using options in all situations. The alternative of only
using it when necessary leads to errors when copy-n-paste is used for a
new command without understanding why or why not that instance is correct.
The :ref:`hig` describes the guildelines for option names and usage.
The :ref:`hig` describes the guidelines for option names and usage.
In short:
* All option names shall be GNU-style long names (two leading dashes).

View File

@ -16,11 +16,11 @@
"""Manage access to the clients, including authenticating when needed."""
import logging
import pkg_resources
import sys
from osc_lib import clientmanager
from osc_lib import shell
import pkg_resources
LOG = logging.getLogger(__name__)

View File

@ -16,10 +16,10 @@
"""Compute v2 Server operation event implementations"""
import logging
import six
from osc_lib.command import command
from osc_lib import utils
import six
from openstackclient.i18n import _

View File

@ -0,0 +1,129 @@
# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
#
"""Identity v3 Implied Role action implementations"""
import logging
from osc_lib.command import command
import six
from openstackclient.i18n import _
LOG = logging.getLogger(__name__)
def _get_role_ids(identity_client, parsed_args):
"""Return prior and implied role id(s)
If prior and implied role id(s) are retrievable from identity
client, return tuple containing them.
"""
role_id = None
implied_role_id = None
roles = identity_client.roles.list()
for role in roles:
role_id_or_name = (role.name, role.id)
if parsed_args.role in role_id_or_name:
role_id = role.id
elif parsed_args.implied_role in role_id_or_name:
implied_role_id = role.id
return (role_id, implied_role_id)
class CreateImpliedRole(command.ShowOne):
_description = _("Creates an association between prior and implied roles")
def get_parser(self, prog_name):
parser = super(CreateImpliedRole, self).get_parser(prog_name)
parser.add_argument(
'role',
metavar='<role>',
help=_('Role (name or ID) that implies another role'),
)
parser.add_argument(
'--implied-role',
metavar='<role>',
help='<role> (name or ID) implied by another role',
required=True,
)
return parser
def take_action(self, parsed_args):
identity_client = self.app.client_manager.identity
(prior_role_id, implied_role_id) = _get_role_ids(
identity_client, parsed_args)
response = identity_client.roles.create_implied(
prior_role_id, implied_role_id)
response._info.pop('links', None)
return zip(*sorted([(k, v['id'])
for k, v in six.iteritems(response._info)]))
class DeleteImpliedRole(command.Command):
_description = _("Deletes an association between prior and implied roles")
def get_parser(self, prog_name):
parser = super(DeleteImpliedRole, self).get_parser(prog_name)
parser.add_argument(
'role',
metavar='<role>',
help=_('Role (name or ID) that implies another role'),
)
parser.add_argument(
'--implied-role',
metavar='<role>',
help='<role> (name or ID) implied by another role',
required=True,
)
return parser
def take_action(self, parsed_args):
identity_client = self.app.client_manager.identity
(prior_role_id, implied_role_id) = _get_role_ids(
identity_client, parsed_args)
identity_client.roles.delete_implied(
prior_role_id, implied_role_id)
class ListImpliedRole(command.Lister):
_description = _("List implied roles")
_COLUMNS = ['Prior Role ID', 'Prior Role Name',
'Implied Role ID', 'Implied Role Name']
def get_parser(self, prog_name):
parser = super(ListImpliedRole, self).get_parser(prog_name)
return parser
def take_action(self, parsed_args):
def _list_implied(response):
for rule in response:
for implies in rule.implies:
yield (rule.prior_role['id'],
rule.prior_role['name'],
implies['id'],
implies['name'])
identity_client = self.app.client_manager.identity
response = identity_client.roles.list_inference_roles()
return (self._COLUMNS, _list_implied(response))

View File

@ -991,16 +991,16 @@ class UnsetImage(command.Command):
default=[],
action='append',
help=_("Unset a tag on this image "
"(repeat option to set multiple tags)"),
"(repeat option to unset multiple tags)"),
)
parser.add_argument(
"--property",
dest="properties",
metavar="<property_key>",
metavar="<property-key>",
default=[],
action='append',
help=_("Unset a property on this image "
"(repeat option to set multiple properties)"),
"(repeat option to unset multiple properties)"),
)
return parser

View File

@ -1,541 +0,0 @@
# Translations template for python-openstackclient.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the
# python-openstackclient project.
#
# Translators:
# Ettore Atalan <atalanttore@googlemail.com>, 2014-2015
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: python-openstackclient 2.5.1.dev51\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-06-03 19:37+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-06-02 01:43+0000\n"
"Last-Translator: Andreas Jaeger <jaegerandi@gmail.com>\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.0\n"
"X-Generator: Zanata 3.7.3\n"
"Language-Team: German\n"
msgid "Add a property to <name> (repeat option to set multiple properties)"
msgstr ""
"Fügen Sie eine Eigenschaft zu <Name> hinzu (wiederholen Sie die Option, um "
"mehrere Eigenschaften festzulegen)"
msgid "Allow disk over-commit on the destination host"
msgstr "Festplattenüberladung auf dem Zielhost erlauben"
msgid "Availability zone name"
msgstr "Name der Verfügbarkeitszone"
msgid "Complete\n"
msgstr "Fertig\n"
msgid "Confirm server resize is complete"
msgstr "Bestätigen Sie, ob die Größenänderung des Servers abgeschlossen ist"
msgid ""
"Create a NIC on the server. Specify option multiple times to create multiple "
"NICs. Either net-id or port-id must be provided, but not both. net-id: "
"attach NIC to network with this UUID, port-id: attach NIC to port with this "
"UUID, v4-fixed-ip: IPv4 fixed address for NIC (optional), v6-fixed-ip: IPv6 "
"fixed address for NIC (optional)."
msgstr ""
"Erstellen Sie ein NIC auf dem Server. Geben Sie die Option mehrfach an, um "
"mehrere NICs zu erstellen. Entweder net-id oder port-id müssen "
"bereitgestellt werden, aber nicht beide. net-id: NIC an Netzwerk mit dieser "
"UUID binden, port-id: NIC an Port mit dieser UUID binden, v4-fixed-ip: Feste "
"IPv4-Adresse für NIC (optional), v6-fixed-ip: Feste IPv6-Adresse für NIC "
"(optional)."
msgid ""
"Create credentials for user (name or ID; default: current authenticated user)"
msgstr ""
"Anmeldedaten für Benutzer erstellen (Name oder Kennung; Standard: aktuell "
"authentifizierter Benutzer)"
msgid ""
"Create credentials in project (name or ID; default: current authenticated "
"project)"
msgstr ""
"Anmeldedaten in Projekt erstellen (Name oder Kennung; Standard: aktuell "
"authentifiziertes Projekt)"
msgid "Credentials access key"
msgstr "Anmeldedaten-Zugriffsschlüssel"
msgid "Default project (name or ID)"
msgstr "Standardprojekt (Name oder Kennung)"
msgid "Delete credentials for user (name or ID)"
msgstr "Anmeldedaten für Benutzer löschen (name or ID)"
msgid "Destination port (ssh -p option)"
msgstr "Zielport (ssh -p Option)"
msgid "Disable a service"
msgstr "Dienst deaktivieren"
msgid "Disable project"
msgstr "Projekt deaktivieren"
msgid "Disable user"
msgstr "Benutzer deaktivieren"
msgid "Display server diagnostics information"
msgstr "Serverdiagnoseinformationen anzeigen"
msgid "Do not over-commit disk on the destination host (default)"
msgstr "Festplatte auf dem Zielhost nicht überladen (Standard)"
msgid "Enable project"
msgstr "Projekt aktivieren"
msgid "Enable project (default)"
msgstr "Projekt aktivieren (Standardeinstellung)"
msgid "Enable user (default)"
msgstr "Benutzer aktivieren (Standardeinstellung)"
msgid "Endpoint ID to delete"
msgstr "Zu löschende Endpunktkennung"
msgid "Error creating server\n"
msgstr "Fehler beim Erstellen des Servers\n"
msgid "Error creating server snapshot\n"
msgstr "Fehler beim Erstellen der Server-Schattenkopie\n"
#, python-format
msgid "Error creating server: %s"
msgstr "Fehler beim Erstellen des Servers: %s"
msgid "Error deleting server\n"
msgstr "Fehler beim Löschen des Servers\n"
#, python-format
msgid "Error deleting server: %s"
msgstr "Fehler beim Löschen des Servers: %s"
msgid "Error retrieving diagnostics data"
msgstr "Fehler beim Abrufen der Diagnosedaten"
msgid "Filter by parent region ID"
msgstr "Nach übergeordneter Regionskennung filtern"
msgid "Filter list by user (name or ID)"
msgstr "Liste nach Benutzer filtern (Name oder Kennung)"
msgid "Filter users by <project> (name or ID)"
msgstr "Benutzer nach <project> filtern (Name oder Kennung)"
msgid "Filter users by project (name or ID)"
msgstr "Benutzer nach Projekt filtern (Name oder Kennung)"
msgid "Floating IP address"
msgstr "Bewegliche IP-Adresse"
msgid "Hints for the scheduler (optional extension)"
msgstr "Hinweise für den Planer (optionale Erweiterung)"
msgid "Include <project> (name or ID)"
msgstr "<project> miteinbeziehen (Name oder Kennung)"
msgid "Include <user> (name or ID)"
msgstr "<user> miteinbeziehen (Name oder Kennung)"
msgid "Include all projects (admin only)"
msgstr "Alle Projekte miteinbeziehen (nur Administrator)"
msgid "Keypair to inject into this server (optional extension)"
msgstr "In diesem Server einzufügendes Schlüsselpaar (optionale Erweiterung)"
msgid "List additional fields in output"
msgstr "Zusätzliche Felder in der Ausgabe auflisten"
msgid "Login name (ssh -l option)"
msgstr "Anmeldename (ssh -l Option)"
msgid "MD5 hash"
msgstr "MD5-Hashwert"
msgid ""
"Map block devices; map is <id>:<type>:<size(GB)>:<delete_on_terminate> "
"(optional extension)"
msgstr ""
"Blockorientierte Geräte abbilden; Abbildung ist <Kennung>:<Typ>:<Größe(GB)>:"
"<beim_Beenden_löschen> (optionale Erweiterung)"
msgid "Maximum number of servers to launch (default=1)"
msgstr "Maximale Anzahl der zu startenden Server (Standard=1)"
msgid "Minimum number of servers to launch (default=1)"
msgstr "Minimale Anzahl der zu startenden Server (Standard=1)"
msgid "Name of new image (default is server name)"
msgstr "Name des neuen Abbilds (Servername ist Standard)"
msgid "Name or ID of security group to remove from server"
msgstr "Name oder Kennung der vom Server zu entfernenden Sicherheitsgruppe"
msgid "Name or ID of server to use"
msgstr "Name oder Kennung des zu verwendenden Servers"
msgid "New endpoint admin URL"
msgstr "Administrator-URL des neuen Endpunktes"
msgid "New endpoint internal URL"
msgstr "Interne URL des neuen Endpunktes"
msgid "New endpoint public URL (required)"
msgstr "Öffentliche URL des neuen Endpunktes (erforderlich)"
msgid "New endpoint region ID"
msgstr "Neue Endpunkt-Regionskennung"
msgid "New endpoint service (name or ID)"
msgstr "Neuer Endpunktdienst (Name oder Kennung)"
msgid "New parent region ID"
msgstr "Neue übergeordnete Regionskennung"
msgid "New password: "
msgstr "Neues Passwort:"
msgid "New project name"
msgstr "Name des neuen Projekts"
msgid "New region ID"
msgstr "Neue Regionskennung"
msgid "New region description"
msgstr "Beschreibung des neuen Bereichs"
msgid "New role name"
msgstr "Name der neuen Rolle"
msgid "New server name"
msgstr "Neuer Servername"
msgid "New service description"
msgstr "Beschreibung des neuen Dienstes"
msgid "New service name"
msgstr "Name des neuen Dienstes"
msgid "New service type (compute, image, identity, volume, etc)"
msgstr "Neuer Diensttyp (Berechnen, Abbild, Identität, Datenträger, usw.)"
msgid "New user name"
msgstr "Neuer Benutzername"
#, python-format
msgid "No service catalog with a type, name or ID of '%s' exists."
msgstr "Kein Dienstkatalog mit Typ, Namen oder Kennung von '%s' ist vorhanden."
msgid "Only return instances that match the reservation"
msgstr "Nur Instanzen zurückgeben, die der Einschränkung entsprechen"
msgid "Options in ssh_config(5) format (ssh -o option)"
msgstr "Optionen im ssh_config(5)-Format (ssh -o Option)"
msgid "Parent region ID"
msgstr "Übergeordnete Regionskennung"
msgid "Passwords do not match, password unchanged"
msgstr "Passwörter stimmen nicht überein, Passwort unverändert"
msgid "Perform a block live migration"
msgstr "Blockorientierte Live-Migration ausführen"
msgid "Perform a hard reboot"
msgstr "Harten Neustart ausführen"
msgid "Perform a shared live migration (default)"
msgstr "Gemeinsame Live-Migration ausführen (Standard)"
msgid "Perform a soft reboot"
msgstr "Weichen Neustart ausführen"
msgid "Private key file (ssh -i option)"
msgstr "Private Schlüsseldatei (ssh -i Option)"
msgid "Project description"
msgstr "Projektbeschreibung"
msgid "Project must be specified"
msgstr "Projekt muss angegeben werden"
msgid "Project to display (name or ID)"
msgstr "Anzuzeigendes Projekt (Name oder Kennung)"
msgid "Project to modify (name or ID)"
msgstr "Zu änderndes Projekt (Name oder Kennung)"
msgid "Project(s) to delete (name or ID)"
msgstr "Zu löschende(s) Projekt(e) (Name oder Kennung)"
msgid "Prompt interactively for password"
msgstr "Interaktiv nach dem Passwort abfragen"
msgid ""
"Property to add/change for this server (repeat option to set multiple "
"properties)"
msgstr ""
"Zu hinzufügende/ändernde Eigenschaft für diesen Server (wiederholen Sie die "
"Option, um mehrere Eigenschaften festzulegen)"
msgid "Region ID to delete"
msgstr "Zu löschende Regionskennung"
msgid "Region to display"
msgstr "Anzuzeigende Region"
msgid "Region to modify"
msgstr "Zu ändernde Region"
msgid "Regular expression to match IP addresses"
msgstr "Regulärer Ausdruck zum Abgleichen mit IP-Adressen"
msgid "Regular expression to match IPv6 addresses"
msgstr "Regulärer Ausdruck zum Abgleichen mit IPv6-Adressen"
msgid "Regular expression to match instance name (admin only)"
msgstr ""
"Regulärer Ausdruck zum Abgleichen des Instanznamens (nur Administrator) "
msgid "Regular expression to match names"
msgstr "Regulärer Ausdruck zum Abgleichen mit Namen"
msgid "Resize server to specified flavor"
msgstr "Servergröße auf angegebene Variante ändern"
msgid "Restore server state before resize"
msgstr "Serverstatus vor der Größenänderung wiederherstellen"
msgid "Return existing domain"
msgstr "Vorhandene Domäne zurückgeben"
msgid "Return existing group"
msgstr "Vorhandene Gruppe zurückgeben"
msgid "Return existing project"
msgstr "Vorhandenes Projekt zurückgeben"
msgid "Return existing role"
msgstr "Vorhandene Rolle zurückgeben"
msgid "Return existing user"
msgstr "Vorhandenen Benutzer zurückgeben"
msgid "Retype new password: "
msgstr "Neues Passwort erneut eingeben:"
msgid "Role to add to <project>:<user> (name or ID)"
msgstr "Zu <project>:<user> hinzuzufügende Rolle (Name oder Kennung)"
msgid "Role to display (name or ID)"
msgstr "Anzuzeigende Rolle (Name oder Kennung)"
msgid "Role to remove (name or ID)"
msgstr "Zu entfernende Rolle (Name oder Kennung)"
msgid "Role(s) to delete (name or ID)"
msgstr "Zu löschende Rolle(n) (Name oder Kennung)"
msgid "Search by hostname"
msgstr "Nach Hostname suchen"
msgid "Search by server status"
msgstr "Nach Serverstatus suchen"
msgid "Search by user (admin only) (name or ID)"
msgstr "Nach Benutzer suchen (nur Administrator) (Name oder Kennung)"
msgid "Security group to add (name or ID)"
msgstr "Zu hinzufügende Sicherheitsgruppe (Name oder Kennung)"
msgid "Select an availability zone for the server"
msgstr "Wählen Sie eine Verfügbarkeitszone für den Server aus"
msgid "Server (name or ID)"
msgstr "Server (Name oder Kennung)"
msgid "Server internal device name for volume"
msgstr "Serverinterner Gerätename für Datenträger"
msgid "Server(s) to delete (name or ID)"
msgstr "Zu löschende(r) Server (Name oder Kennung)"
msgid "Service to delete (name or ID)"
msgstr "Zu löschender Dienst (Name oder Kennung)"
msgid "Service to display (type or name)"
msgstr "Anzuzeigender Dienst (Typ oder Name)"
msgid "Service to display (type, name or ID)"
msgstr "Anzuzeigender Dienst (Typ, Name oder Kennung)"
msgid "Set a project property (repeat option to set multiple properties)"
msgstr ""
"Legen Sie eine Projekteigenschaft fest (wiederholen Sie die Option, um "
"mehrere Eigenschaften festzulegen)"
msgid ""
"Set a scope, such as a project or domain, set a project scope with --os-"
"project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with "
"--os-domain-name, OS_DOMAIN_NAME or auth.domain_name"
msgstr ""
"Setzen Sie eine Eigenschaft, wie Projekt oder Domäne, setzen Sie eine "
"Projekteigenschaft mit --os-project-name, OS_PROJECT_NAME oder auth."
"project_name, setzen Sie eine Dömaneneigenschaft mit --os-domain-name, "
"OS_DOMAIN_NAME oder auth.domain_name."
msgid ""
"Set a service AUTH_URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url"
msgstr ""
"Legen Sie eine Dienst-AUTH_URL mit --os-auth-url, OS_AUTH_URL oder auth."
"auth_url fest"
msgid "Set a service URL, with --os-url, OS_URL or auth.url"
msgstr "Legen Sie eine Dienst-URL mit --os-url, OS_URL oder auth.url fest"
msgid "Set a token with --os-token, OS_TOKEN or auth.token"
msgstr "Legen Sie einen Token mit --os-token, OS_TOKEN oder auth.token fest"
msgid "Set a username with --os-username, OS_USERNAME, or auth.username"
msgstr ""
"Legen Sie einen Benutzernamen mit --os-username, OS_USERNAME oder auth."
"username fest"
msgid ""
"Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url"
msgstr ""
"Legen Sie eine Authentifizierungs-URL mit --os-auth-url, OS_AUTH_URL oder "
"auth.auth_url fest"
msgid "Set default project (name or ID)"
msgstr "Standardprojekt festlegen (Name oder Kennung)"
msgid "Set new root password (interactive only)"
msgstr "Neues root-Passwort festlegen (Nur interaktiv)"
msgid "Set project description"
msgstr "Projektbeschreibung festlegen"
msgid "Set project name"
msgstr "Projektname festlegen"
msgid "Set user email address"
msgstr "E-Mail-Adresse des Benutzers festlegen"
msgid "Set user name"
msgstr "Benutzername festlegen"
msgid "Set user password"
msgstr "Benutzerpasswort festlegen"
msgid "Show credentials for user (name or ID)"
msgstr "Anmeldedaten für Benutzer anzeigen (name or ID)"
msgid "Show service catalog information"
msgstr "Dienstkataloginformation anzeigen"
msgid "Target hostname"
msgstr "Zielhostname"
msgid ""
"The argument --type is deprecated, use service create --name <service-name> "
"type instead."
msgstr ""
"Das Argument --type ist veraltet, verwenden Sie stattdessen service create --"
"name <Dienstname> type."
msgid "Token to be deleted"
msgstr "Zu löschender Token"
msgid "URL"
msgstr "URL"
msgid "Use only IPv4 addresses"
msgstr "Nur IPv4-Adressen verwenden"
msgid "Use only IPv6 addresses"
msgstr "Nur IPv6-Adressen verwenden"
msgid "Use other IP address (public, private, etc)"
msgstr "Andere IP-Adresse verwenden (öffentlich, privat, usw.)"
msgid "Use private IP address"
msgstr "Private IP-Adresse verwenden"
msgid "Use public IP address"
msgstr "Öffentliche IP-Adresse verwenden"
msgid ""
"Use specified volume as the config drive, or 'True' to use an ephemeral drive"
msgstr ""
"Benutzerdefinierter Datenträger als Konfigurationslaufwerk oder 'True', um "
"ein flüchtiges Laufwerk zu verwenden"
msgid "User data file to serve from the metadata server"
msgstr "Vom Metadatenserver anzubietende Benutzerdatendatei"
msgid "User must be specified"
msgstr "Benutzer muss angegeben werden"
msgid "User to change (name or ID)"
msgstr "Zu ändernder Benutzer (Name oder Kennung)"
msgid "User to display (name or ID)"
msgstr "Anzuzeigender Benutzer (Name oder Kennung)"
msgid "User to list (name or ID)"
msgstr "Aufzulistender Benutzer (Name oder Kennung)"
msgid "User(s) to delete (name or ID)"
msgstr "Zu löschende(r) Benutzer (Name oder Kennung)"
msgid "Version"
msgstr "Version"
msgid "Volume to add (name or ID)"
msgstr "Zu hinzufügender Datenträger (Name oder Kennung)"
msgid "Volume to remove (name or ID)"
msgstr "Zu entfernender Datenträger (Name oder Kennung)"
msgid "Wait for build to complete"
msgstr "Warten Sie, bis die Herstellung abgeschlossen ist"
msgid "Wait for delete to complete"
msgstr "Warten Sie, bis das Löschen abgeschlossen ist"
msgid "Wait for image create to complete"
msgstr "Warten Sie, bis die Abbilderstellung abgeschlossen ist"
msgid "Wait for reboot to complete"
msgstr "Warten Sie, bis der Neustart abgeschlossen ist"
msgid "Wait for rebuild to complete"
msgstr "Warten Sie, bis die Wiederherstellung abgeschlossen ist"
msgid "Wait for resize to complete"
msgstr "Warten Sie, bis die Größenänderung abgeschlossen ist"
msgid "either net-id or port-id should be specified but not both"
msgstr "entweder net-id oder port-id sollten angegeben sein, aber nicht beide"
msgid "max instances should be > 0"
msgstr "max. Instanzen sollten > 0 sein"
msgid "min instances should be <= max instances"
msgstr "min. Instanzen sollten <= max. Instanzen sein"
msgid "min instances should be > 0"
msgstr "min. Instanzen sollten > 0 sein"

File diff suppressed because it is too large Load Diff

View File

@ -1,423 +0,0 @@
# Translations template for python-openstackclient.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the
# python-openstackclient project.
#
# Translators:
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: python-openstackclient 2.5.1.dev51\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-06-03 19:37+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2015-06-14 06:41+0000\n"
"Last-Translator: openstackjenkins <jenkins@openstack.org>\n"
"Language: zh-TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: Babel 2.0\n"
"X-Generator: Zanata 3.7.3\n"
"Language-Team: Chinese (Taiwan)\n"
msgid "Add a property to <name> (repeat option to set multiple properties)"
msgstr "加入屬性到 <name>(重復這選項來設定多個屬性)"
msgid "Allow disk over-commit on the destination host"
msgstr "允許目標主機過量使用"
msgid "Complete\n"
msgstr "完成\n"
msgid "Confirm server resize is complete"
msgstr "確認調整雲實例容量完成"
msgid "Credentials access key"
msgstr "憑鑰存取密鑰"
msgid "Default project (name or ID)"
msgstr "預設專案(名稱或識別號)"
msgid "Destination port (ssh -p option)"
msgstr "目標埠口ssh -p 選項)"
msgid "Disable project"
msgstr "關閉專案"
msgid "Disable user"
msgstr "關閉用戶"
msgid "Display server diagnostics information"
msgstr "顯示雲實例診斷資訊"
msgid "Do not over-commit disk on the destination host (default)"
msgstr "不準目標主機過量使用(預設)"
msgid "Enable project"
msgstr "啟用專案"
msgid "Enable project (default)"
msgstr "啟用專案(預設)"
msgid "Enable user (default)"
msgstr "啟用用戶(預設)"
msgid "Endpoint ID to delete"
msgstr "要刪除的端點識別號"
#, python-format
msgid "Error creating server: %s"
msgstr "新增雲實例時出錯:%s"
msgid "Error retrieving diagnostics data"
msgstr "獲得診斷資料時出錯"
msgid "Filter by parent region ID"
msgstr "以父地區識別號來篩選"
msgid "Filter users by <project> (name or ID)"
msgstr "以 <project> 來篩選用戶(名稱或識別號)"
msgid "Filter users by project (name or ID)"
msgstr "以專案篩選用戶(名稱或識別號)"
msgid "Hints for the scheduler (optional extension)"
msgstr "給排程器的提示(選用)"
msgid "Include <project> (name or ID)"
msgstr "包括 <project>(名稱或識別號)"
msgid "Include <user> (name or ID)"
msgstr "包括 <user>(名稱或識別號)"
msgid "Include all projects (admin only)"
msgstr "包括所有的專案(管理員專用)"
msgid "Keypair to inject into this server (optional extension)"
msgstr "要注入到此伺服器的密鑰對(選用)"
msgid "List additional fields in output"
msgstr "列出額外的欄位"
msgid "Login name (ssh -l option)"
msgstr "登入名稱ssh -l 選項)"
msgid ""
"Map block devices; map is <id>:<type>:<size(GB)>:<delete_on_terminate> "
"(optional extension)"
msgstr ""
"映射區塊裝置;映射是 <id>:<type>:<size(GB)>:<delete_on_terminate>(選用)"
msgid "Maximum number of servers to launch (default=1)"
msgstr "最多要發動的雲實例(預設為 1"
msgid "Minimum number of servers to launch (default=1)"
msgstr "最少要發動的雲實例(預設為 1"
msgid "Name of new image (default is server name)"
msgstr "新映像檔的名稱(預設為雲實例名稱)"
msgid "Name or ID of security group to remove from server"
msgstr "要從雲實例移除的安全性群組名稱或識別號"
msgid "Name or ID of server to use"
msgstr "要用的雲實例名稱或識別號"
msgid "New endpoint admin URL"
msgstr "新端點管理員網址"
msgid "New endpoint internal URL"
msgstr "新端點內部網址"
msgid "New endpoint public URL (required)"
msgstr "新端點公開網址(需要)"
msgid "New endpoint region ID"
msgstr "新端點地區識別號"
msgid "New endpoint service (name or ID)"
msgstr "新端點伺服器(名稱或識別號)"
msgid "New parent region ID"
msgstr "新父地區識別號"
msgid "New password: "
msgstr "新密碼:"
msgid "New project name"
msgstr "新專案名稱"
msgid "New region ID"
msgstr "新地區識別號"
msgid "New region description"
msgstr "新地區描述"
msgid "New role name"
msgstr "新角色名稱"
msgid "New server name"
msgstr "新雲實例名稱"
msgid "New service description"
msgstr "新伺服器描述"
msgid "New service name"
msgstr "新伺服器名稱"
msgid "New service type (compute, image, identity, volume, etc)"
msgstr "新伺服器類型compute、image、identity 或 volume 等等)"
msgid "New user name"
msgstr "新用戶名稱"
#, python-format
msgid "No service catalog with a type, name or ID of '%s' exists."
msgstr "沒有相似「%s」類型、名稱或識別號的伺服器分類。"
msgid "Only return instances that match the reservation"
msgstr "只回傳要保留的雲實例"
msgid "Options in ssh_config(5) format (ssh -o option)"
msgstr "ssh_config(5) 格式的選項ssh -o 選項)"
msgid "Parent region ID"
msgstr "父地區識別號"
msgid "Passwords do not match, password unchanged"
msgstr "密碼不一樣,未更換密碼"
msgid "Perform a block live migration"
msgstr "覆行區塊的即時轉移"
msgid "Perform a hard reboot"
msgstr "履行強制重開機"
msgid "Perform a shared live migration (default)"
msgstr "覆行已分享的即時轉移(預設)"
msgid "Perform a soft reboot"
msgstr "履行重開機"
msgid "Private key file (ssh -i option)"
msgstr "私鑰檔案ssh -i 選項)"
msgid "Project description"
msgstr "專案描述"
msgid "Project must be specified"
msgstr "必須指定專案"
msgid "Project to display (name or ID)"
msgstr "要顯示的專案(名稱或識別號)"
msgid "Project to modify (name or ID)"
msgstr "要更改的專案(名稱或識別號)"
msgid "Project(s) to delete (name or ID)"
msgstr "要刪除的專案(名稱或識別號)"
msgid "Prompt interactively for password"
msgstr "為密碼互動提示"
msgid ""
"Property to add/change for this server (repeat option to set multiple "
"properties)"
msgstr "要加入這個雲實例的屬性(重復這選項來設定多個屬性)"
msgid "Region ID to delete"
msgstr "要刪除的地區識別號"
msgid "Region to display"
msgstr "要顯示的地區"
msgid "Region to modify"
msgstr "要更改的地區"
msgid "Regular expression to match IP addresses"
msgstr "以正規式來匹配 IP 位址"
msgid "Regular expression to match IPv6 addresses"
msgstr "以正規式來匹配 IPv6 位址"
msgid "Regular expression to match instance name (admin only)"
msgstr "以正規式來匹配雲實例名稱(管理員專用)"
msgid "Regular expression to match names"
msgstr "以正規式來匹配名稱"
msgid "Resize server to specified flavor"
msgstr "調整雲實例容量來符合指定的虛擬硬體樣板"
msgid "Restore server state before resize"
msgstr "恢復雲實例狀態到未調整容量前"
msgid "Return existing domain"
msgstr "回傳存在的地域"
msgid "Return existing group"
msgstr "回傳存在的群組"
msgid "Return existing project"
msgstr "回傳存在的專案"
msgid "Return existing role"
msgstr "回傳存在的角色"
msgid "Return existing user"
msgstr "回傳存在的用戶"
msgid "Retype new password: "
msgstr "重新輸入新密碼:"
msgid "Role to add to <project>:<user> (name or ID)"
msgstr "加入角色到 <project>:<user>(名稱或識別號)"
msgid "Role to display (name or ID)"
msgstr "要顯示的角色(名稱或識別號)"
msgid "Role to remove (name or ID)"
msgstr "要移除的角色(名稱或識別號)"
msgid "Role(s) to delete (name or ID)"
msgstr "要刪除的角色(名稱或識別號)"
msgid "Search by hostname"
msgstr "以主機名稱來尋找"
msgid "Search by server status"
msgstr "以雲實例狀態來尋找"
msgid "Security group to add (name or ID)"
msgstr "要加入的安全性群組(名稱或識別號)"
msgid "Select an availability zone for the server"
msgstr "為雲實例選擇可用的區域。"
msgid "Server (name or ID)"
msgstr "伺服器(名稱或識別號)"
msgid "Server internal device name for volume"
msgstr "雲硬碟在雲實例內的裝置名稱"
msgid "Server(s) to delete (name or ID)"
msgstr "要刪除的雲實例(名稱或識別號)"
msgid "Service to delete (name or ID)"
msgstr "要刪除的伺服器(名稱或識別號)"
msgid "Service to display (type or name)"
msgstr "要顯示的伺服器(類型或名稱)"
msgid "Service to display (type, name or ID)"
msgstr "要顯示的伺服器(類型、名稱或識別號)"
msgid "Set a project property (repeat option to set multiple properties)"
msgstr "設定專案屬性(重復這選項來設定多個屬性)"
msgid "Set default project (name or ID)"
msgstr "設定預設專案(名稱或識別號)"
msgid "Set new root password (interactive only)"
msgstr "設定新密碼(只限互動)"
msgid "Set project description"
msgstr "設定專案描述"
msgid "Set project name"
msgstr "設定專案名稱"
msgid "Set user email address"
msgstr "設定用戶電子信箱位址"
msgid "Set user name"
msgstr "設定用戶名稱"
msgid "Set user password"
msgstr "設定用戶密碼"
msgid "Show service catalog information"
msgstr "顯示伺服器分類資訊"
msgid "Target hostname"
msgstr "目標主機名稱"
msgid ""
"The argument --type is deprecated, use service create --name <service-name> "
"type instead."
msgstr ""
"已經淘汰 --type 參數,請用 service create --name <service-name> 來代替。"
msgid "Token to be deleted"
msgstr "要刪除的記號"
msgid "Use only IPv4 addresses"
msgstr "只使用 IPv4 位址"
msgid "Use only IPv6 addresses"
msgstr "只使用 IPv6 位址"
msgid "Use other IP address (public, private, etc)"
msgstr "使用其他 IP 位址(公開、私人等等)"
msgid "Use private IP address"
msgstr "使用私人 IP 位址"
msgid "Use public IP address"
msgstr "使用公開 IP 位址"
msgid ""
"Use specified volume as the config drive, or 'True' to use an ephemeral drive"
msgstr "使用指定的雲硬碟為設定檔硬碟或「True」來使用暫時性硬碟"
msgid "User data file to serve from the metadata server"
msgstr "來自詮釋資料伺服器要服務的用戶資料檔案"
msgid "User must be specified"
msgstr "必須指定用戶"
msgid "User to change (name or ID)"
msgstr "要更換的用戶(名稱或識別號)"
msgid "User to display (name or ID)"
msgstr "要顯示的用戶(名稱或識別號)"
msgid "User to list (name or ID)"
msgstr "要列出的用戶(名稱或識別號)"
msgid "User(s) to delete (name or ID)"
msgstr "要刪除的用戶(名稱或識別號)"
msgid "Volume to add (name or ID)"
msgstr "要加入的雲硬碟(名稱或識別號)"
msgid "Volume to remove (name or ID)"
msgstr "要移除的雲硬碟(名稱或識別號)"
msgid "Wait for build to complete"
msgstr "等待完成建立"
msgid "Wait for image create to complete"
msgstr "等待映像檔新增完成"
msgid "Wait for reboot to complete"
msgstr "等待重開機完成"
msgid "Wait for rebuild to complete"
msgstr "等待重建完成"
msgid "Wait for resize to complete"
msgstr "等待調整容量完成"
msgid "either net-id or port-id should be specified but not both"
msgstr "任選網路識別號或接口識別號,但不能兩者都指定"
msgid "max instances should be > 0"
msgstr "雲實例發動的最大值要大於 0"
msgid "min instances should be <= max instances"
msgstr "雲實例發動的最少值不應大於最大值"
msgid "min instances should be > 0"
msgstr "雲實例發動的最少值要大於 0"

View File

@ -141,7 +141,7 @@ def _get_columns(item):
'tenant_id': 'project_id',
}
# Do not show this column when displaying a subnet
invisible_columns = ['use_default_subnetpool']
invisible_columns = ['use_default_subnet_pool']
return sdk_utils.get_osc_show_columns_for_sdk_resource(
item,
column_map,
@ -192,6 +192,8 @@ def _get_attrs(client_manager, parsed_args, is_create=True):
subnet_pool = client.find_subnet_pool(parsed_args.subnet_pool,
ignore_missing=False)
attrs['subnetpool_id'] = subnet_pool.id
if parsed_args.use_prefix_delegation:
attrs['subnetpool_id'] = "prefix_delegation"
if parsed_args.use_default_subnet_pool:
attrs['use_default_subnet_pool'] = True
if parsed_args.prefix_length is not None:
@ -266,6 +268,11 @@ class CreateSubnet(command.ShowOne):
help=_("Subnet pool from which this subnet will obtain a CIDR "
"(Name or ID)")
)
subnet_pool_group.add_argument(
'--use-prefix-delegation',
help=_("Use 'prefix-delegation' if IP is IPv6 format "
"and IP would be delegated externally")
)
subnet_pool_group.add_argument(
'--use-default-subnet-pool',
action='store_true',

View File

@ -14,10 +14,10 @@ import os
import re
import shlex
import subprocess
import testtools
from tempest.lib.cli import output_parser
from tempest.lib import exceptions
import testtools
COMMON_DIR = os.path.dirname(os.path.abspath(__file__))

View File

@ -13,11 +13,11 @@
import json
import tempfile
from openstackclient.tests.functional import base
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions
from openstackclient.tests.functional import base
class KeypairBase(base.TestCase):
"""Methods for functional tests."""

View File

@ -10,9 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstackclient.tests.functional.identity.v3 import common
from tempest.lib.common.utils import data_utils
from openstackclient.tests.functional.identity.v3 import common
class ServiceProviderTests(common.IdentityTests):
# Introduce functional test cases for command 'Service Provider'

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -20,34 +21,6 @@ from openstackclient.tests.functional.network.v2 import common
class NetworkQosPolicyTests(common.NetworkTests):
"""Functional tests for QoS policy"""
HEADERS = ['Name']
FIELDS = ['name']
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.NAME = uuid.uuid4().hex
opts = cls.get_opts(cls.FIELDS)
raw_output = cls.openstack(
'network qos policy create ' +
cls.NAME +
opts
)
cls.assertOutput(cls.NAME + "\n", raw_output)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'network qos policy delete ' +
cls.NAME
)
cls.assertOutput('', raw_output)
finally:
super(NetworkQosPolicyTests, cls).tearDownClass()
def setUp(self):
super(NetworkQosPolicyTests, self).setUp()
@ -55,33 +28,46 @@ class NetworkQosPolicyTests(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.NAME = uuid.uuid4().hex
cmd_output = json.loads(self.openstack(
'network qos policy create -f json ' +
self.NAME
))
self.addCleanup(self.openstack,
'network qos policy delete ' + self.NAME)
self.assertEqual(self.NAME, cmd_output['name'])
def test_qos_rule_create_delete(self):
# This is to check the output of qos policy delete
policy_name = uuid.uuid4().hex
self.openstack('network qos policy create -f json ' + policy_name)
raw_output = self.openstack(
'network qos policy delete ' + policy_name)
self.assertEqual('', raw_output)
def test_qos_policy_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('network qos policy list' + opts)
self.assertIn(self.NAME, raw_output)
cmd_output = json.loads(self.openstack(
'network qos policy list -f json'))
self.assertIn(self.NAME, [p['Name'] for p in cmd_output])
def test_qos_policy_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('network qos policy show ' + self.NAME +
opts)
self.assertEqual(self.NAME + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos policy show -f json ' + self.NAME))
self.assertEqual(self.NAME, cmd_output['name'])
def test_qos_policy_set(self):
self.openstack('network qos policy set --share ' + self.NAME)
opts = self.get_opts(['shared'])
raw_output = self.openstack('network qos policy show ' + self.NAME +
opts)
self.assertEqual("True\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos policy show -f json ' + self.NAME))
self.assertTrue(cmd_output['shared'])
def test_qos_policy_default(self):
self.openstack('network qos policy set --default ' + self.NAME)
opts = self.get_opts(['is_default'])
raw_output = self.openstack('network qos policy show ' + self.NAME +
opts)
self.assertEqual("True\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos policy show -f json ' + self.NAME))
self.assertTrue(cmd_output['is_default'])
self.openstack('network qos policy set --no-default ' + self.NAME)
opts = self.get_opts(['is_default'])
raw_output = self.openstack('network qos policy show ' + self.NAME +
opts)
self.assertEqual("False\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos policy show -f json ' + self.NAME))
self.assertFalse(cmd_output['is_default'])

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -20,51 +21,6 @@ from openstackclient.tests.functional.network.v2 import common
class NetworkQosRuleTestsMinimumBandwidth(common.NetworkTests):
"""Functional tests for QoS minimum bandwidth rule"""
RULE_ID = None
MIN_KBPS = 2800
MIN_KBPS_MODIFIED = 7500
DIRECTION = '--egress'
HEADERS = ['ID']
FIELDS = ['id']
TYPE = 'minimum-bandwidth'
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
opts = cls.get_opts(cls.FIELDS)
cls.openstack(
'network qos policy create ' +
cls.QOS_POLICY_NAME
)
cls.RULE_ID = cls.openstack(
'network qos rule create ' +
'--type ' + cls.TYPE + ' ' +
'--min-kbps ' + str(cls.MIN_KBPS) + ' ' +
cls.DIRECTION + ' ' +
cls.QOS_POLICY_NAME +
opts
)
cls.assertsOutputNotNone(cls.RULE_ID)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'network qos rule delete ' +
cls.QOS_POLICY_NAME + ' ' +
cls.RULE_ID
)
cls.openstack(
'network qos policy delete ' +
cls.QOS_POLICY_NAME
)
cls.assertOutput('', raw_output)
finally:
super(NetworkQosRuleTestsMinimumBandwidth, cls).tearDownClass()
def setUp(self):
super(NetworkQosRuleTestsMinimumBandwidth, self).setUp()
@ -72,72 +28,67 @@ class NetworkQosRuleTestsMinimumBandwidth(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
self.openstack(
'network qos policy create ' +
self.QOS_POLICY_NAME
)
self.addCleanup(self.openstack,
'network qos policy delete ' + self.QOS_POLICY_NAME)
cmd_output = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type minimum-bandwidth ' +
'--min-kbps 2800 ' +
'--egress ' +
self.QOS_POLICY_NAME
))
self.RULE_ID = cmd_output['id']
self.addCleanup(self.openstack,
'network qos rule delete ' +
self.QOS_POLICY_NAME + ' ' +
self.RULE_ID)
self.assertTrue(self.RULE_ID)
def test_qos_rule_create_delete(self):
# This is to check the output of qos rule delete
policy_name = uuid.uuid4().hex
self.openstack('network qos policy create -f json ' + policy_name)
self.addCleanup(self.openstack,
'network qos policy delete ' + policy_name)
rule = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type minimum-bandwidth ' +
'--min-kbps 2800 ' +
'--egress ' + policy_name
))
raw_output = self.openstack(
'network qos rule delete ' +
policy_name + ' ' + rule['id'])
self.assertEqual('', raw_output)
def test_qos_rule_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('network qos rule list '
+ self.QOS_POLICY_NAME + opts)
self.assertIn(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule list -f json ' + self.QOS_POLICY_NAME))
self.assertIn(self.RULE_ID, [rule['ID'] for rule in cmd_output])
def test_qos_rule_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
self.assertEqual(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(self.RULE_ID, cmd_output['id'])
def test_qos_rule_set(self):
self.openstack('network qos rule set --min-kbps ' +
str(self.MIN_KBPS_MODIFIED) + ' ' +
self.openstack('network qos rule set --min-kbps 7500 ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID)
opts = self.get_opts(['min_kbps'])
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
self.assertEqual(str(self.MIN_KBPS_MODIFIED) + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(7500, cmd_output['min_kbps'])
class NetworkQosRuleTestsDSCPMarking(common.NetworkTests):
"""Functional tests for QoS DSCP marking rule"""
RULE_ID = None
QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
DSCP_MARK = 8
DSCP_MARK_MODIFIED = 32
HEADERS = ['ID']
FIELDS = ['id']
TYPE = 'dscp-marking'
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
opts = cls.get_opts(cls.FIELDS)
cls.openstack(
'network qos policy create ' +
cls.QOS_POLICY_NAME
)
cls.RULE_ID = cls.openstack(
'network qos rule create ' +
'--type ' + cls.TYPE + ' ' +
'--dscp-mark ' + str(cls.DSCP_MARK) + ' ' +
cls.QOS_POLICY_NAME +
opts
)
cls.assertsOutputNotNone(cls.RULE_ID)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'network qos rule delete ' +
cls.QOS_POLICY_NAME + ' ' +
cls.RULE_ID
)
cls.openstack(
'network qos policy delete ' + cls.QOS_POLICY_NAME)
cls.assertOutput('', raw_output)
finally:
super(NetworkQosRuleTestsDSCPMarking, cls).tearDownClass()
def setUp(self):
super(NetworkQosRuleTestsDSCPMarking, self).setUp()
@ -145,78 +96,63 @@ class NetworkQosRuleTestsDSCPMarking(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
self.openstack(
'network qos policy create ' +
self.QOS_POLICY_NAME
)
self.addCleanup(self.openstack,
'network qos policy delete ' + self.QOS_POLICY_NAME)
cmd_output = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type dscp-marking ' +
'--dscp-mark 8 ' +
self.QOS_POLICY_NAME
))
self.RULE_ID = cmd_output['id']
self.addCleanup(self.openstack,
'network qos rule delete ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID)
self.assertTrue(self.RULE_ID)
def test_qos_rule_create_delete(self):
# This is to check the output of qos rule delete
policy_name = uuid.uuid4().hex
self.openstack('network qos policy create -f json ' + policy_name)
self.addCleanup(self.openstack,
'network qos policy delete ' + policy_name)
rule = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type dscp-marking ' +
'--dscp-mark 8 ' + policy_name
))
raw_output = self.openstack(
'network qos rule delete ' +
policy_name + ' ' + rule['id'])
self.assertEqual('', raw_output)
def test_qos_rule_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('network qos rule list '
+ self.QOS_POLICY_NAME + opts)
self.assertIn(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule list -f json ' + self.QOS_POLICY_NAME))
self.assertIn(self.RULE_ID, [rule['ID'] for rule in cmd_output])
def test_qos_rule_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
self.assertEqual(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(self.RULE_ID, cmd_output['id'])
def test_qos_rule_set(self):
self.openstack('network qos rule set --dscp-mark ' +
str(self.DSCP_MARK_MODIFIED) + ' ' +
self.openstack('network qos rule set --dscp-mark 32 ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID)
opts = self.get_opts(['dscp_mark'])
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
self.assertEqual(str(self.DSCP_MARK_MODIFIED) + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(32, cmd_output['dscp_mark'])
class NetworkQosRuleTestsBandwidthLimit(common.NetworkTests):
"""Functional tests for QoS bandwidth limit rule"""
RULE_ID = None
QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
MAX_KBPS = 10000
MAX_KBPS_MODIFIED = 15000
MAX_BURST_KBITS = 1400
MAX_BURST_KBITS_MODIFIED = 1800
RULE_DIRECTION = 'egress'
RULE_DIRECTION_MODIFIED = 'ingress'
HEADERS = ['ID']
FIELDS = ['id']
TYPE = 'bandwidth-limit'
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
opts = cls.get_opts(cls.FIELDS)
cls.openstack(
'network qos policy create ' +
cls.QOS_POLICY_NAME
)
cls.RULE_ID = cls.openstack(
'network qos rule create ' +
'--type ' + cls.TYPE + ' ' +
'--max-kbps ' + str(cls.MAX_KBPS) + ' ' +
'--max-burst-kbits ' + str(cls.MAX_BURST_KBITS) + ' ' +
'--' + cls.RULE_DIRECTION + ' ' +
cls.QOS_POLICY_NAME +
opts
)
cls.assertsOutputNotNone(cls.RULE_ID)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'network qos rule delete ' +
cls.QOS_POLICY_NAME + ' ' +
cls.RULE_ID
)
cls.openstack(
'network qos policy delete ' + cls.QOS_POLICY_NAME)
cls.assertOutput('', raw_output)
finally:
super(NetworkQosRuleTestsBandwidthLimit, cls).tearDownClass()
def setUp(self):
super(NetworkQosRuleTestsBandwidthLimit, self).setUp()
@ -224,30 +160,65 @@ class NetworkQosRuleTestsBandwidthLimit(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.QOS_POLICY_NAME = 'qos_policy_' + uuid.uuid4().hex
self.openstack(
'network qos policy create ' +
self.QOS_POLICY_NAME
)
self.addCleanup(self.openstack,
'network qos policy delete ' + self.QOS_POLICY_NAME)
cmd_output = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type bandwidth-limit ' +
'--max-kbps 10000 ' +
'--max-burst-kbits 1400 ' +
'--egress ' +
self.QOS_POLICY_NAME
))
self.RULE_ID = cmd_output['id']
self.addCleanup(self.openstack,
'network qos rule delete ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID)
self.assertTrue(self.RULE_ID)
def test_qos_rule_create_delete(self):
# This is to check the output of qos rule delete
policy_name = uuid.uuid4().hex
self.openstack('network qos policy create -f json ' + policy_name)
self.addCleanup(self.openstack,
'network qos policy delete ' + policy_name)
rule = json.loads(self.openstack(
'network qos rule create -f json ' +
'--type bandwidth-limit ' +
'--max-kbps 10000 ' +
'--max-burst-kbits 1400 ' +
'--egress ' + policy_name
))
raw_output = self.openstack(
'network qos rule delete ' +
policy_name + ' ' + rule['id'])
self.assertEqual('', raw_output)
def test_qos_rule_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('network qos rule list '
+ self.QOS_POLICY_NAME + opts)
self.assertIn(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule list -f json '
+ self.QOS_POLICY_NAME))
self.assertIn(self.RULE_ID, [rule['ID'] for rule in cmd_output])
def test_qos_rule_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
self.assertEqual(self.RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(self.RULE_ID, cmd_output['id'])
def test_qos_rule_set(self):
self.openstack('network qos rule set --max-kbps ' +
str(self.MAX_KBPS_MODIFIED) + ' --max-burst-kbits ' +
str(self.MAX_BURST_KBITS_MODIFIED) + ' ' +
'--' + self.RULE_DIRECTION_MODIFIED + ' ' +
self.openstack('network qos rule set --max-kbps 15000 ' +
'--max-burst-kbits 1800 ' +
'--ingress ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID)
opts = self.get_opts(['direction', 'max_burst_kbps', 'max_kbps'])
raw_output = self.openstack('network qos rule show ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID +
opts)
expected = (str(self.RULE_DIRECTION_MODIFIED) + "\n" +
str(self.MAX_BURST_KBITS_MODIFIED) + "\n" +
str(self.MAX_KBPS_MODIFIED) + "\n")
self.assertEqual(expected, raw_output)
cmd_output = json.loads(self.openstack(
'network qos rule show -f json ' +
self.QOS_POLICY_NAME + ' ' + self.RULE_ID))
self.assertEqual(15000, cmd_output['max_kbps'])
self.assertEqual(1800, cmd_output['max_burst_kbps'])
self.assertEqual('ingress', cmd_output['direction'])

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
from openstackclient.tests.functional.network.v2 import common
@ -29,6 +31,7 @@ class NetworkQosRuleTypeTests(common.NetworkTests):
self.skipTest("No Network service present")
def test_qos_rule_type_list(self):
raw_output = self.openstack('network qos rule type list')
cmd_output = json.loads(self.openstack(
'network qos rule type list -f json'))
for rule_type in self.AVAILABLE_RULE_TYPES:
self.assertIn(rule_type, raw_output)
self.assertIn(rule_type, [x['Type'] for x in cmd_output])

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -22,69 +23,51 @@ class NetworkRBACTests(common.NetworkTests):
HEADERS = ['ID']
FIELDS = ['id']
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.NET_NAME = uuid.uuid4().hex
cls.PROJECT_NAME = uuid.uuid4().hex
opts = cls.get_opts(cls.FIELDS)
raw_output = cls.openstack(
'network create ' + cls.NET_NAME + opts
)
cls.OBJECT_ID = raw_output.strip('\n')
opts = cls.get_opts(['id', 'object_id'])
raw_output = cls.openstack(
'network rbac create ' +
cls.OBJECT_ID +
' --action access_as_shared' +
' --target-project admin' +
' --type network' + opts
)
cls.ID, object_id, rol = tuple(raw_output.split('\n'))
cls.assertOutput(cls.OBJECT_ID, object_id)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output_rbac = cls.openstack(
'network rbac delete ' + cls.ID
)
raw_output_network = cls.openstack(
'network delete ' + cls.OBJECT_ID
)
cls.assertOutput('', raw_output_rbac)
cls.assertOutput('', raw_output_network)
finally:
super(NetworkRBACTests, cls).tearDownClass()
def setUp(self):
super(NetworkRBACTests, self).setUp()
# Nothing in this class works with Nova Network
if not self.haz_network:
self.skipTest("No Network service present")
self.NET_NAME = uuid.uuid4().hex
self.PROJECT_NAME = uuid.uuid4().hex
cmd_output = json.loads(self.openstack(
'network create -f json ' + self.NET_NAME
))
self.addCleanup(self.openstack,
'network delete ' + cmd_output['id'])
self.OBJECT_ID = cmd_output['id']
cmd_output = json.loads(self.openstack(
'network rbac create -f json ' +
self.OBJECT_ID +
' --action access_as_shared' +
' --target-project admin' +
' --type network'
))
self.addCleanup(self.openstack,
'network rbac delete ' + cmd_output['id'])
self.ID = cmd_output['id']
self.assertEqual(self.OBJECT_ID, cmd_output['object_id'])
def test_network_rbac_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('network rbac list' + opts)
self.assertIn(self.ID, raw_output)
cmd_output = json.loads(self.openstack('network rbac list -f json'))
self.assertIn(self.ID, [rbac['ID'] for rbac in cmd_output])
def test_network_rbac_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('network rbac show ' + self.ID + opts)
self.assertEqual(self.ID + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'network rbac show -f json ' + self.ID))
self.assertEqual(self.ID, cmd_output['id'])
def test_network_rbac_set(self):
opts = self.get_opts(self.FIELDS)
project_id = self.openstack(
'project create ' + self.PROJECT_NAME + opts)
project_id = json.loads(self.openstack(
'project create -f json ' + self.PROJECT_NAME))['id']
self.openstack('network rbac set ' + self.ID +
' --target-project ' + self.PROJECT_NAME)
opts = self.get_opts(['target_project_id'])
raw_output_rbac = self.openstack('network rbac show ' + self.ID + opts)
cmd_output_rbac = json.loads(self.openstack(
'network rbac show -f json ' + self.ID))
self.assertEqual(project_id, cmd_output_rbac['target_project_id'])
raw_output_project = self.openstack(
'project delete ' + self.PROJECT_NAME)
self.assertEqual(project_id, raw_output_rbac)
self.assertOutput('', raw_output_project)
self.assertEqual('', raw_output_project)

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -18,64 +19,117 @@ from openstackclient.tests.functional.network.v2 import common
class NetworkSegmentTests(common.NetworkTests):
"""Functional tests for network segment"""
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.NETWORK_NAME = uuid.uuid4().hex
cls.PHYSICAL_NETWORK_NAME = uuid.uuid4().hex
# Create a network for the all subnet tests
cmd_output = json.loads(cls.openstack(
'network create -f json ' +
cls.NETWORK_NAME
))
# Get network_id for assertEqual
cls.NETWORK_ID = cmd_output["id"]
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'network delete ' +
cls.NETWORK_NAME
)
cls.assertOutput('', raw_output)
finally:
super(NetworkSegmentTests, cls).tearDownClass()
def setUp(self):
super(NetworkSegmentTests, self).setUp()
# Nothing in this class works with Nova Network
if not self.haz_network:
self.skipTest("No Network service present")
self.NETWORK_NAME = uuid.uuid4().hex
self.PHYSICAL_NETWORK_NAME = uuid.uuid4().hex
# Create a network for the segment
opts = self.get_opts(['id'])
raw_output = self.openstack(
'network create ' + self.NETWORK_NAME + opts
)
self.addCleanup(self.openstack,
'network delete ' + self.NETWORK_NAME)
self.NETWORK_ID = raw_output.strip('\n')
# Get the segment for the network.
opts = self.get_opts(['ID', 'Network'])
raw_output = self.openstack(
'network segment list '
'--network ' + self.NETWORK_NAME + ' ' +
opts
)
raw_output_row = raw_output.split('\n')[0]
self.NETWORK_SEGMENT_ID = raw_output_row.split(' ')[0]
def test_network_segment_create_delete(self):
opts = self.get_opts(['id'])
raw_output = self.openstack(
' network segment create --network ' + self.NETWORK_ID +
' --network-type geneve ' +
' --segment 2055 test_segment ' + opts
name = uuid.uuid4().hex
json_output = json.loads(self.openstack(
' network segment create -f json ' +
'--network ' + self.NETWORK_ID + ' ' +
'--network-type geneve ' +
'--segment 2055 ' +
name
))
self.assertEqual(
name,
json_output["name"],
)
raw_output = self.openstack(
'network segment delete ' + name,
)
network_segment_id = raw_output.strip('\n')
raw_output = self.openstack('network segment delete ' +
network_segment_id)
self.assertOutput('', raw_output)
def test_network_segment_list(self):
opts = self.get_opts(['ID'])
raw_output = self.openstack('network segment list' + opts)
self.assertIn(self.NETWORK_SEGMENT_ID, raw_output)
name = uuid.uuid4().hex
json_output = json.loads(self.openstack(
' network segment create -f json ' +
'--network ' + self.NETWORK_ID + ' ' +
'--network-type geneve ' +
'--segment 2055 ' +
name
))
network_segment_id = json_output.get('id')
network_segment_name = json_output.get('name')
self.addCleanup(
self.openstack,
'network segment delete ' + network_segment_id
)
self.assertEqual(
name,
json_output["name"],
)
json_output = json.loads(self.openstack(
'network segment list -f json'
))
item_map = {
item.get('ID'): item.get('Name') for item in json_output
}
self.assertIn(network_segment_id, item_map.keys())
self.assertIn(network_segment_name, item_map.values())
def test_network_segment_set_show(self):
name = uuid.uuid4().hex
json_output = json.loads(self.openstack(
' network segment create -f json ' +
'--network ' + self.NETWORK_ID + ' ' +
'--network-type geneve ' +
'--segment 2055 ' +
name
))
self.addCleanup(
self.openstack,
'network segment delete ' + name
)
self.assertIsNone(
json_output["description"],
)
def test_network_segment_set(self):
new_description = 'new_description'
raw_output = self.openstack('network segment set ' +
'--description ' + new_description +
' ' + self.NETWORK_SEGMENT_ID)
self.assertOutput('', raw_output)
opts = self.get_opts(['description'])
raw_output = self.openstack('network segment show ' +
self.NETWORK_SEGMENT_ID + opts)
self.assertEqual(new_description + "\n", raw_output)
cmd_output = self.openstack(
'network segment set ' +
'--description ' + new_description + ' ' +
name
)
self.assertOutput('', cmd_output)
def test_network_segment_show(self):
opts = self.get_opts(['network_id'])
raw_output = self.openstack('network segment show ' +
self.NETWORK_SEGMENT_ID + opts)
self.assertEqual(self.NETWORK_ID + "\n", raw_output)
json_output = json.loads(self.openstack(
'network segment show -f json ' +
name
))
self.assertEqual(
new_description,
json_output["description"],
)

View File

@ -13,14 +13,14 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
from openstackclient.tests.functional.network.v2 import common
class TestNetworkServiceProvider(common.NetworkTests):
"""Functional tests for network service provider"""
SERVICE_TYPE = 'L3_ROUTER_NAT'
def setUp(self):
super(TestNetworkServiceProvider, self).setUp()
# Nothing in this class works with Nova Network
@ -28,5 +28,6 @@ class TestNetworkServiceProvider(common.NetworkTests):
self.skipTest("No Network service present")
def test_network_service_provider_list(self):
raw_output = self.openstack('network service provider list')
self.assertIn(self.SERVICE_TYPE, raw_output)
cmd_output = json.loads(self.openstack(
'network service provider list -f json'))
self.assertIn('L3_ROUTER_NAT', [x['Service Type'] for x in cmd_output])

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -17,44 +18,6 @@ from openstackclient.tests.functional.network.v2 import common
class SecurityGroupTests(common.NetworkTests):
"""Functional tests for security group"""
HEADERS = ['Name']
FIELDS = ['name']
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.NAME = uuid.uuid4().hex
cls.OTHER_NAME = uuid.uuid4().hex
opts = cls.get_opts(cls.FIELDS)
raw_output = cls.openstack(
'security group create ' +
cls.NAME +
opts
)
expected = cls.NAME + '\n'
cls.assertOutput(expected, raw_output)
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
# Rename test
raw_output = cls.openstack(
'security group set --name ' +
cls.OTHER_NAME + ' ' +
cls.NAME
)
cls.assertOutput('', raw_output)
# Delete test
raw_output = cls.openstack(
'security group delete ' +
cls.OTHER_NAME
)
cls.assertOutput('', raw_output)
finally:
super(SecurityGroupTests, cls).tearDownClass()
def setUp(self):
super(SecurityGroupTests, self).setUp()
@ -62,22 +25,33 @@ class SecurityGroupTests(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.NAME = uuid.uuid4().hex
self.OTHER_NAME = uuid.uuid4().hex
cmd_output = json.loads(self.openstack(
'security group create -f json ' +
self.NAME
))
self.addCleanup(self.openstack,
'security group delete ' + cmd_output['id'])
self.assertEqual(self.NAME, cmd_output['name'])
def test_security_group_list(self):
opts = self.get_opts(self.HEADERS)
raw_output = self.openstack('security group list' + opts)
self.assertIn(self.NAME, raw_output)
cmd_output = json.loads(self.openstack('security group list -f json'))
self.assertIn(self.NAME, [sg['Name'] for sg in cmd_output])
def test_security_group_set(self):
other_name = uuid.uuid4().hex
raw_output = self.openstack(
'security group set --description NSA ' + self.NAME
'security group set --description NSA --name ' +
other_name + ' ' + self.NAME
)
self.assertEqual('', raw_output)
opts = self.get_opts(['description'])
raw_output = self.openstack('security group show ' + self.NAME + opts)
self.assertEqual("NSA\n", raw_output)
cmd_output = json.loads(self.openstack(
'security group show -f json ' + other_name))
self.assertEqual('NSA', cmd_output['description'])
def test_security_group_show(self):
opts = self.get_opts(self.FIELDS)
raw_output = self.openstack('security group show ' + self.NAME + opts)
self.assertEqual(self.NAME + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'security group show -f json ' + self.NAME))
self.assertEqual(self.NAME, cmd_output['name'])

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import uuid
from openstackclient.tests.functional.network.v2 import common
@ -17,54 +18,6 @@ from openstackclient.tests.functional.network.v2 import common
class SecurityGroupRuleTests(common.NetworkTests):
"""Functional tests for security group rule"""
SECURITY_GROUP_RULE_ID = None
NAME_FIELD = ['name']
ID_FIELD = ['id']
ID_HEADER = ['ID']
@classmethod
def setUpClass(cls):
common.NetworkTests.setUpClass()
if cls.haz_network:
cls.SECURITY_GROUP_NAME = uuid.uuid4().hex
# Create the security group to hold the rule
opts = cls.get_opts(cls.NAME_FIELD)
raw_output = cls.openstack(
'security group create ' +
cls.SECURITY_GROUP_NAME +
opts
)
expected = cls.SECURITY_GROUP_NAME + '\n'
cls.assertOutput(expected, raw_output)
# Create the security group rule.
opts = cls.get_opts(cls.ID_FIELD)
raw_output = cls.openstack(
'security group rule create ' +
cls.SECURITY_GROUP_NAME + ' ' +
'--protocol tcp --dst-port 80:80 ' +
'--ingress --ethertype IPv4 ' +
opts
)
cls.SECURITY_GROUP_RULE_ID = raw_output.strip('\n')
@classmethod
def tearDownClass(cls):
try:
if cls.haz_network:
raw_output = cls.openstack(
'security group rule delete ' +
cls.SECURITY_GROUP_RULE_ID
)
cls.assertOutput('', raw_output)
raw_output = cls.openstack(
'security group delete ' +
cls.SECURITY_GROUP_NAME
)
cls.assertOutput('', raw_output)
finally:
super(SecurityGroupRuleTests, cls).tearDownClass()
def setUp(self):
super(SecurityGroupRuleTests, self).setUp()
@ -72,16 +25,35 @@ class SecurityGroupRuleTests(common.NetworkTests):
if not self.haz_network:
self.skipTest("No Network service present")
self.SECURITY_GROUP_NAME = uuid.uuid4().hex
# Create the security group to hold the rule
cmd_output = json.loads(self.openstack(
'security group create -f json ' +
self.SECURITY_GROUP_NAME
))
self.addCleanup(self.openstack,
'security group delete ' + self.SECURITY_GROUP_NAME)
self.assertEqual(self.SECURITY_GROUP_NAME, cmd_output['name'])
# Create the security group rule.
cmd_output = json.loads(self.openstack(
'security group rule create -f json ' +
self.SECURITY_GROUP_NAME + ' ' +
'--protocol tcp --dst-port 80:80 ' +
'--ingress --ethertype IPv4 '
))
self.addCleanup(self.openstack,
'security group rule delete ' + cmd_output['id'])
self.SECURITY_GROUP_RULE_ID = cmd_output['id']
def test_security_group_rule_list(self):
opts = self.get_opts(self.ID_HEADER)
raw_output = self.openstack('security group rule list ' +
self.SECURITY_GROUP_NAME +
opts)
self.assertIn(self.SECURITY_GROUP_RULE_ID, raw_output)
cmd_output = json.loads(self.openstack(
'security group rule list -f json ' + self.SECURITY_GROUP_NAME))
self.assertIn(self.SECURITY_GROUP_RULE_ID,
[rule['ID'] for rule in cmd_output])
def test_security_group_rule_show(self):
opts = self.get_opts(self.ID_FIELD)
raw_output = self.openstack('security group rule show ' +
self.SECURITY_GROUP_RULE_ID +
opts)
self.assertEqual(self.SECURITY_GROUP_RULE_ID + "\n", raw_output)
cmd_output = json.loads(self.openstack(
'security group rule show -f json ' + self.SECURITY_GROUP_RULE_ID))
self.assertEqual(self.SECURITY_GROUP_RULE_ID, cmd_output['id'])

View File

@ -12,14 +12,35 @@
import fixtures
from openstackclient.tests.functional.volume import base
from openstackclient.tests.functional import base
from openstackclient.tests.functional.volume import base as volume_base
class BaseVolumeTests(base.BaseVolumeTests):
"""Base class for Volume functional tests. """
class BaseVolumeTests(volume_base.BaseVolumeTests):
"""Base class for Volume functional tests"""
@classmethod
def setUpClass(cls):
super(BaseVolumeTests, cls).setUpClass()
# TODO(dtroyer): This needs to be updated to specifically check for
# Volume v1 rather than just 'volume', but for now
# that is enough until we get proper version negotiation
cls.haz_volume_v1 = base.is_service_enabled('volume')
def setUp(self):
super(BaseVolumeTests, self).setUp()
# This class requires Volume v1
# if not self.haz_volume_v1:
# self.skipTest("No Volume v1 service present")
# TODO(dtroyer): We really want the above to work but right now
# (12Sep2017) DevStack still creates a 'volume'
# service type even though there is no service behind
# it. Until that is fixed we need to just skip the
# volume v1 functional tests in master.
self.skipTest("No Volume v1 service present")
ver_fixture = fixtures.EnvironmentVariable(
'OS_VOLUME_API_VERSION', '1'
)

View File

@ -13,12 +13,12 @@
"""Compute v2 API Library Tests"""
from keystoneauth1 import session
from osc_lib import exceptions as osc_lib_exceptions
from requests_mock.contrib import fixture
from keystoneclient import session
from openstackclient.api import compute_v2 as compute
from openstackclient.tests.unit import utils
from osc_lib import exceptions as osc_lib_exceptions
FAKE_PROJECT = 'xyzpdq'

View File

@ -15,6 +15,7 @@
# or Jun 2017.
import logging
import mock
from openstackclient.common import logs

View File

@ -11,8 +11,8 @@
# under the License.
import copy
import mock
import mock
from osc_lib import exceptions
from openstackclient.common import quota

View File

@ -14,9 +14,10 @@
#
import copy
import mock
import uuid
import mock
from openstackclient.api import compute_v2
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes

View File

@ -13,10 +13,10 @@
# under the License.
#
import mock
from mock import call
import uuid
import mock
from mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -15,9 +15,9 @@
import argparse
import collections
import getpass
import mock
from mock import call
from osc_lib import exceptions
from osc_lib import utils as common_utils
from oslo_utils import timeutils

View File

@ -12,6 +12,7 @@
#
import datetime
import mock
from openstackclient.compute.v2 import usage

View File

@ -14,10 +14,10 @@
#
import json
import mock
import sys
from keystoneauth1 import fixture
import mock
import requests
import six

View File

@ -14,11 +14,11 @@
#
import copy
import mock
import uuid
from keystoneauth1 import access
from keystoneauth1 import fixture
import mock
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit import utils

View File

@ -12,8 +12,8 @@
#
import copy
import mock
import mock
from osc_lib import exceptions
from openstackclient.identity.v2_0 import role_assignment

View File

@ -14,11 +14,11 @@
#
import copy
import mock
import uuid
from keystoneauth1 import access
from keystoneauth1 import fixture
import mock
from osc_lib.cli import format_columns
from openstackclient.tests.unit import fakes
@ -185,6 +185,8 @@ ROLE_2 = {
'links': base_url + 'roles/' + 'r2',
}
ROLES = [ROLE, ROLE_2]
service_id = 's-123'
service_name = 'Texaco'
service_type = 'gas'
@ -969,3 +971,25 @@ class FakeRoleAssignment(object):
info=copy.deepcopy(role_assignment_info), loaded=True)
return role_assignment
class FakeImpliedRoleResponse(object):
"""Fake one or more role assignment."""
def __init__(self, prior_role, implied_roles):
self.prior_role = prior_role
self.implies = [role for role in implied_roles]
@staticmethod
def create_list():
"""Create a fake implied role list response.
:return:
A list of FakeImpliedRoleResponse objects
"""
# set default attributes.
implied_roles = [
FakeImpliedRoleResponse(ROLES[0], [ROLES[1]])
]
return implied_roles

View File

@ -13,6 +13,7 @@
# under the License.
import copy
import mock
from openstackclient.identity.v3 import identity_provider

View File

@ -0,0 +1,181 @@
# Copyright 2013 Nebula Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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 copy
from openstackclient.identity.v3 import implied_role
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
class TestRole(identity_fakes.TestIdentityv3):
def setUp(self):
super(TestRole, self).setUp()
# Get a shortcut to the UserManager Mock
self.users_mock = self.app.client_manager.identity.users
self.users_mock.reset_mock()
# Get a shortcut to the UserManager Mock
self.groups_mock = self.app.client_manager.identity.groups
self.groups_mock.reset_mock()
# Get a shortcut to the DomainManager Mock
self.domains_mock = self.app.client_manager.identity.domains
self.domains_mock.reset_mock()
# Get a shortcut to the ProjectManager Mock
self.projects_mock = self.app.client_manager.identity.projects
self.projects_mock.reset_mock()
# Get a shortcut to the RoleManager Mock
self.roles_mock = self.app.client_manager.identity.roles
self.roles_mock.reset_mock()
def _is_inheritance_testcase(self):
return False
class TestImpliedRoleCreate(TestRole):
def setUp(self):
super(TestImpliedRoleCreate, self).setUp()
self.roles_mock.list.return_value = [
fakes.FakeResource(
None,
copy.deepcopy(identity_fakes.ROLES[0]),
loaded=True,
),
fakes.FakeResource(
None,
copy.deepcopy(identity_fakes.ROLES[1]),
loaded=True,
),
]
self.roles_mock.create_implied.return_value = fakes.FakeResource(
None,
{'prior_role': copy.deepcopy(identity_fakes.ROLES[0]),
'implied': copy.deepcopy(identity_fakes.ROLES[1]), },
loaded=True,
)
self.cmd = implied_role.CreateImpliedRole(self.app, None)
def test_implied_role_create(self):
arglist = [
identity_fakes.ROLES[0]['id'],
'--implied-role', identity_fakes.ROLES[1]['id'],
]
verifylist = [
('role', identity_fakes.ROLES[0]['id']),
('implied_role', identity_fakes.ROLES[1]['id']),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
# In base command class ShowOne in cliff, abstract method take_action()
# returns a two-part tuple with a tuple of column names and a tuple of
# data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.create_implied(prior, implied)
self.roles_mock.create_implied.assert_called_with(
identity_fakes.ROLES[0]['id'],
identity_fakes.ROLES[1]['id']
)
collist = ('implied', 'prior_role')
self.assertEqual(collist, columns)
datalist = (
identity_fakes.ROLES[1]['id'],
identity_fakes.ROLES[0]['id']
)
self.assertEqual(datalist, data)
class TestImpliedRoleDelete(TestRole):
def setUp(self):
super(TestImpliedRoleDelete, self).setUp()
self.roles_mock.list.return_value = [
fakes.FakeResource(
None,
copy.deepcopy(identity_fakes.ROLES[0]),
loaded=True,
),
fakes.FakeResource(
None,
copy.deepcopy(identity_fakes.ROLES[1]),
loaded=True,
),
]
self.roles_mock.delete_implied.return_value = fakes.FakeResource(
None,
{'prior-role': copy.deepcopy(identity_fakes.ROLES[0]),
'implied': copy.deepcopy(identity_fakes.ROLES[1]), },
loaded=True,
)
self.cmd = implied_role.DeleteImpliedRole(self.app, None)
def test_implied_role_delete(self):
arglist = [
identity_fakes.ROLES[0]['id'],
'--implied-role', identity_fakes.ROLES[1]['id'],
]
verifylist = [
('role', identity_fakes.ROLES[0]['id']),
('implied_role', identity_fakes.ROLES[1]['id']),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.cmd.take_action(parsed_args)
self.roles_mock.delete_implied.assert_called_with(
identity_fakes.ROLES[0]['id'],
identity_fakes.ROLES[1]['id']
)
class TestImpliedRoleList(TestRole):
def setUp(self):
super(TestImpliedRoleList, self).setUp()
self.roles_mock.list_inference_roles.return_value = (
identity_fakes.FakeImpliedRoleResponse.create_list())
self.cmd = implied_role.ListImpliedRole(self.app, None)
def test_implied_role_list(self):
arglist = []
verifylist = []
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
self.roles_mock.list_inference_roles.assert_called_with()
collist = ['Prior Role ID', 'Prior Role Name',
'Implied Role ID', 'Implied Role Name']
self.assertEqual(collist, columns)
datalist = [
(identity_fakes.ROLES[0]['id'], identity_fakes.ROLES[0]['name'],
identity_fakes.ROLES[1]['id'], identity_fakes.ROLES[1]['name'])
]
x = [d for d in data]
self.assertEqual(datalist, x)

View File

@ -13,8 +13,8 @@
# under the License.
import copy
import mock
import mock
from osc_lib import exceptions
from openstackclient.identity.v3 import mapping

View File

@ -14,8 +14,8 @@
#
import copy
import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -12,6 +12,7 @@
#
import copy
import mock
from openstackclient.identity.v3 import role_assignment

View File

@ -12,8 +12,8 @@
#
import copy
import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,8 +14,8 @@
#
import contextlib
import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,9 +14,10 @@
#
import copy
import mock
import uuid
import mock
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit import utils
from openstackclient.tests.unit.volume.v1 import fakes as volume_fakes

View File

@ -14,8 +14,8 @@
#
import copy
import mock
import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -14,11 +14,11 @@
#
import copy
import mock
import random
import uuid
from glanceclient.v2 import schemas
import mock
from osc_lib.cli import format_columns
import warlock

View File

@ -14,9 +14,9 @@
#
import copy
import mock
from glanceclient.v2 import schemas
import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions
import warlock

View File

@ -11,8 +11,8 @@
# under the License.
import copy
import mock
import mock
from osc_lib.tests import utils as osc_lib_utils
from openstackclient import shell

View File

@ -12,9 +12,10 @@
#
import argparse
import mock
import mock
import openstack
from openstackclient.common import exceptions
from openstackclient.network import common
from openstackclient.tests.unit import utils

View File

@ -13,11 +13,12 @@
import argparse
import copy
import mock
from random import choice
from random import randint
import uuid
import mock
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes_v3
from openstackclient.tests.unit import utils

View File

@ -11,10 +11,10 @@
# under the License.
#
import mock
from mock import call
import random
import mock
from mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,8 +12,8 @@
#
import argparse
import mock
import mock
from mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,6 +12,7 @@
#
import argparse
import mock
from mock import call

View File

@ -14,6 +14,7 @@
#
import copy
import mock
from openstackclient.api import object_store_v1 as object_store

View File

@ -14,6 +14,7 @@
#
import copy
import mock
from openstackclient.api import object_store_v1 as object_store

View File

@ -13,10 +13,10 @@
# under the License.
#
import mock
import os
import sys
import mock
from osc_lib.tests import utils as osc_lib_test_utils
from oslo_utils import importutils
import wrapt

View File

@ -14,8 +14,9 @@
# under the License.
#
import fixtures
import os
import fixtures
import testtools
from cliff import columns as cliff_columns

View File

@ -14,10 +14,11 @@
#
import copy
import mock
import random
import uuid
import mock
from openstackclient.tests.unit import fakes
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
from openstackclient.tests.unit import utils

View File

@ -14,6 +14,7 @@
#
import copy
import mock
from mock import call

View File

@ -14,6 +14,7 @@
#
import argparse
import mock
from mock import call

View File

@ -13,10 +13,10 @@
#
import copy
import mock
import random
import uuid
import mock
from osc_lib.cli import format_columns
from openstackclient.tests.unit import fakes

View File

@ -14,6 +14,7 @@
#
import copy
import mock
from mock import call

View File

@ -13,6 +13,7 @@
#
import argparse
import mock
from mock import call

View File

@ -13,6 +13,7 @@
#
import argparse
import mock
from mock import call

View File

@ -0,0 +1,16 @@
---
features:
- |
Support for creating, deleting, and listing implied roles has been added.
This allows users to create an inference rule between two roles. The
first, called the prior role is the role explicitly assigned to an
individual. The second, called the implied role, is one that the user
is assgined implicitly. Additionally, these rules can be chained, such
that an implied role from the first inference rule can be the implied role
in the second. Thus one explicitly assigned role can lead to multiple
implied roles.
``implied role create <role> --implied-role <implied-role>`` creates an
association between prior and implied roles.
``implied role delete <role> --implied-role <implied-role>`` removes an
association between prior and implied roles.
``implied role list`` Lists all implied roles that currently exist.

View File

@ -0,0 +1,6 @@
---
features:
- |
Add ``--use-prefix-delegation`` option to the ``subnet create`` command to
specify 'Prefix Delegation' as a subnetpool when creating subnets.
[Bug `1513894 <https://bugs.launchpad.net/bugs/1513894>`_]

View File

@ -6,6 +6,7 @@ OpenStackClient Release Notes
:maxdepth: 1
unreleased
pike
ocata
newton
mitaka
@ -23,6 +24,7 @@ OpenStack release was made is shown below:
================= =======================
OpenStack Release OpenStackClient Release
================= =======================
Pike 3.12.0
Ocata 3.8.1
Newton 3.2.0
Mitaka 2.3.0

View File

@ -0,0 +1,6 @@
===================================
Pike Series Release Notes
===================================
.. release-notes::
:branch: stable/pike

View File

@ -6,12 +6,12 @@ six>=1.9.0 # MIT
Babel!=2.4.0,>=2.3.4 # BSD
cliff>=2.8.0 # Apache-2.0
keystoneauth1>=3.1.0 # Apache-2.0
openstacksdk>=0.9.17 # Apache-2.0
keystoneauth1>=3.2.0 # Apache-2.0
openstacksdk>=0.9.18 # Apache-2.0
osc-lib>=1.7.0 # Apache-2.0
oslo.i18n!=3.15.2,>=2.1.0 # Apache-2.0
oslo.utils>=3.20.0 # Apache-2.0
python-glanceclient>=2.7.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.utils>=3.28.0 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
python-novaclient>=9.0.0 # Apache-2.0
python-cinderclient>=3.1.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0
python-cinderclient>=3.2.0 # Apache-2.0

View File

@ -247,6 +247,10 @@ openstack.identity.v3 =
identity_provider_set = openstackclient.identity.v3.identity_provider:SetIdentityProvider
identity_provider_show = openstackclient.identity.v3.identity_provider:ShowIdentityProvider
implied_role_create = openstackclient.identity.v3.implied_role:CreateImpliedRole
implied_role_delete = openstackclient.identity.v3.implied_role:DeleteImpliedRole
implied_role_list = openstackclient.identity.v3.implied_role:ListImpliedRole
mapping_create = openstackclient.identity.v3.mapping:CreateMapping
mapping_delete = openstackclient.identity.v3.mapping:DeleteMapping
mapping_list = openstackclient.identity.v3.mapping:ListMapping

View File

@ -5,16 +5,17 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
openstackdocstheme>=1.16.0 # Apache-2.0
flake8-import-order==0.13 # LGPLv3
mock>=2.0.0 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
requests-mock>=1.1 # Apache-2.0
requests-mock>=1.1.0 # Apache-2.0
sphinx>=1.6.2 # BSD
stevedore>=1.20.0 # Apache-2.0
os-client-config>=1.28.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
tempest>=16.1.0 # Apache-2.0
@ -23,12 +24,12 @@ bandit>=1.1.0 # Apache-2.0
wrapt>=1.7.0 # BSD License
# Install these to generate sphinx autodocs
aodhclient>=0.7.0 # Apache-2.0
gnocchiclient>=2.7.0 # Apache-2.0
python-barbicanclient!=4.5.0,>=4.0.0 # Apache-2.0
aodhclient>=0.9.0 # Apache-2.0
gnocchiclient>=3.3.1 # Apache-2.0
python-barbicanclient!=4.5.0,!=4.5.1,>=4.0.0 # Apache-2.0
python-congressclient<2000,>=1.3.0 # Apache-2.0
python-designateclient>=1.5.0 # Apache-2.0
python-heatclient>=1.6.1 # Apache-2.0
python-designateclient>=2.7.0 # Apache-2.0
python-heatclient>=1.10.0 # Apache-2.0
python-ironicclient>=1.14.0 # Apache-2.0
python-ironic-inspector-client>=1.5.0 # Apache-2.0
python-karborclient>=0.6.0 # Apache-2.0
@ -36,7 +37,7 @@ python-mistralclient>=3.1.0 # Apache-2.0
python-muranoclient>=0.8.2 # Apache-2.0
python-neutronclient>=6.3.0 # Apache-2.0
python-octaviaclient>=1.0.0 # Apache-2.0
python-saharaclient>=1.1.0 # Apache-2.0
python-saharaclient>=1.2.0 # Apache-2.0
python-searchlightclient>=1.0.0 #Apache-2.0
python-senlinclient>=1.1.0 # Apache-2.0
python-troveclient>=2.2.0 # Apache-2.0

View File

@ -91,3 +91,5 @@ exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools
# If 'ignore' is not set there are default errors and warnings that are set
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default
ignore = __
import-order-style = pep8
application_import_names = openstackclient