From 1bf6706ad1628dcf18a515f13a7b4ba01a38b758 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 7 Apr 2017 20:59:58 -0500 Subject: Low-level Compute v2 API: security group rules api.compute.APIv2 security group rule functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Ieabd61113bc6d3562738686f52bb06aa84fca765 --- openstackclient/network/v2/security_group_rule.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'openstackclient/network') diff --git a/openstackclient/network/v2/security_group_rule.py b/openstackclient/network/v2/security_group_rule.py index 33c3ff02..ad685cf8 100644 --- a/openstackclient/network/v2/security_group_rule.py +++ b/openstackclient/network/v2/security_group_rule.py @@ -376,15 +376,15 @@ class CreateSecurityGroupRule(common.NetworkAndComputeShowOne): else: remote_ip = '0.0.0.0/0' - obj = client.security_group_rules.create( - group['id'], - protocol, - from_port, - to_port, - remote_ip, - parsed_args.remote_group, + obj = client.api.security_group_rule_create( + security_group_id=group['id'], + ip_protocol=protocol, + from_port=from_port, + to_port=to_port, + remote_ip=remote_ip, + remote_group=parsed_args.remote_group, ) - return _format_security_group_rule_show(obj._info) + return _format_security_group_rule_show(obj) class DeleteSecurityGroupRule(common.NetworkAndComputeDelete): @@ -409,7 +409,7 @@ class DeleteSecurityGroupRule(common.NetworkAndComputeDelete): client.delete_security_group_rule(obj) def take_action_compute(self, client, parsed_args): - client.security_group_rules.delete(self.r) + client.api.security_group_rule_delete(self.r) class ListSecurityGroupRule(common.NetworkAndComputeLister): -- cgit v1.2.1