summaryrefslogtreecommitdiff
path: root/openstackclient/network/common.py
Commit message (Collapse)AuthorAgeFilesLines
* Change to plural form of object in multi delete error message in networkv2Huanxuan Ao2016-07-141-1/+1
| | | | | | | | | | | | Usually, the error message of multi delete is: "'result' of 'total' 'objects' failed to delete" the objects is a plural form. To match the other multi delete error messages in OSC, change the object in delete error message in networkv2 to a plural form. Just add a 's' in the message. Change-Id: I17e0735d025bb61014db709d2639813565015b3d
* Standardize logger usageTang Chen2016-06-201-7/+11
| | | | | | | | | | | | | | | | | | | Use file logger for all command specific logs. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html After this patch, all self.log and self.app.log will be standardized to LOG(). NOTE: In shell.py, we got the log in class OpenStackShell, which is also known as self.app.log in other classes. This logger is used to record non-command-specific logs. So we leave it as-is. Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896 Implements: blueprint log-usage
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: exceptionsDean Troyer2016-06-131-1/+2
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Trivial: Fix i18n support in network/common.pyTang Chen2016-05-311-4/+13
| | | | | | Some missing i18n problems in network. Change-Id: I45a09a6ada1aad5a64256c0d0a0a2b6e250df670
* Enhance exception handling for "network delete" commandTang Chen2016-04-141-0/+37
| | | | | | | | | | | | | This patch rework "network delete" command following the rules in doc/source/command-errors.rst. In "network delete" command, there are multiple REST API calls, and we should make as many of them as possible. And log error for each one, give a better error message. Also return a non-zero exit code. Change-Id: I39ae087dd7bd08d049d513abfa6c5cab2bd13b2b Partial-Bug: #1556719
* Merge "Refactor security group rule delete to use SDK"Jenkins2016-02-181-1/+7
|\
| * Refactor security group rule delete to use SDKRichard Theis2016-02-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group rule delete' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set also introduces new FakeSecurityGroupRule classes for testing network and compute security group rules. And fixes were made to the network FakeSecurityGroup class. Change-Id: I8d0917925aa464e8255defae95a2a2adfb6cfb75 Partial-Bug: #1519512 Related-to: blueprint neutron-client
* | Add NetworkAndCompute Lister and ShowOne classesRichard Theis2016-02-121-0/+102
|/ | | | | | | | | | | | | This patch set introduces the NetworkAndComputeLister and NetworkAndComputeShowOne classes which are related to the NetworkAndComputeCommand class. These classes are for commands that must support neutron and nova network. The new classes allows both the parser and actions to be unique. Change-Id: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e Partial-Bug: #1519511 Partial-Bug: #1519512 Related-to: blueprint neutron-client
* Refactor security group delete to use SDKRichard Theis2016-02-021-0/+62
| | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group delete' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set introduces a new NetworkAndComputeCommand class to be used for commands that must support neutron and nova network. The new class allows both the parser and actions to be unique. The current DeleteSecurityGroup class is now a subclass of this new class and has moved under the network v2 commands. This patch set also introduces a new FakeSecurityGroup class for testing security groups. And finally, this patch set updates the command documentation for security group and security group rule to indicate that Network v2 is also used. Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537 Partial-Bug: #1519511 Related-to: blueprint neutron-client
* SDK integration extensions and server create networksTerry Howe2015-12-091-29/+0
| | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* Migrate network client to SDK.Tang Chen2015-12-091-21/+3
| | | | | | | | | | | | | | | | | | | The previous patches have migrate all network commands to the new version using sdk. This patch will remove the temporary method, and implement a new make_client() to create sdk network client. And also, find() in openstackclient/network/common.py must support sdk. The logic of this function will become much easier than before, so this patch also removes two useless test cases of find(). This patch will also remove the patched methods in tests. Change-Id: Ic2f7bca073beb9757172d16f95d9b82c48cbbc12 Implements: blueprint neutron-client Co-Authored-By: Terry Howe <terrylhowe@gmail.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
* Trivial: Fix typo in find() in network.Tang Chen2015-11-271-2/+4
| | | | Change-Id: Ic54fbb9160adefe3d025d537125e125128f75ee6
* Allow network find to use alternate nameTerry Howe2014-07-071-2/+4
| | | | | | | | Add the name_attr to the network find method so it can search for things like floating_ip_address for floating IP addresses rather than just id. Change-Id: I827e3745b06397a54555d1286e477bf2e05bf789
* Network CRUDTerry Howe2014-06-241-0/+43
bp/neutron https://wiki.openstack.org/wiki/OpenStackClient/Commands#Network_2 Change-Id: I89ee083154afa544b03587e84becace36d9d522a