Re: [openstack-dev] [Congress] Guide for all reactive policy options? (execute[...])

2016-04-12 Thread Bryan Sullivan
Thanks for the hint, Masahito. A very useful command to know. It would be good 
to give a hint about this in the intro to the section "3. Manual Reactive 
Enforcement" 
(https://github.com/openstack/congress/blob/master/doc/source/enforcement.rst). 
That's where I was looking for a summary on how to know whats supported. e.g.

"You can see the supported actions for each Congress datasource driver with 
'openstack congress datasource actions show '"

With your suggestion I was able to get a test running for a "reserved subnet 
error": https://git.opnfv.org/cgit/copper/tree/tests/adhoc/reserved_subnet.sh

Thanks,
Bryan Sullivan

--
Date: Tue Apr 12 05:49:18 UTC 2016
From: Masahito MUROI 
muroi.masahito at lab.ntt.co.jp
   


Hi Bryan,

You can see neutron driver's action with 'openstack congress datasource 
actions show' command.  It shows all execution method supported by 
neutronclient.

btw, the prefix of reaction policy rule is datasource *name*. If you 
initialize openstack like devstack, the datasource name for neutron is 
not neutron but neutronv2.

best regard,
Masahito
  __
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Congress] Guide for all reactive policy options? (execute[...])

2016-04-11 Thread Masahito MUROI

Hi Bryan,

You can see neutron driver's action with 'openstack congress datasource 
actions show' command.  It shows all execution method supported by 
neutronclient.


btw, the prefix of reaction policy rule is datasource *name*. If you 
initialize openstack like devstack, the datasource name for neutron is 
not neutron but neutronv2.


best regard,
Masahito

On 2016/04/12 14:27, Bryan Sullivan wrote:

Hi Congress team,

I'm trying to develop tests for the reactive policy features of
Congress. I have one such test working, shown at
https://git.opnfv.org/cgit/copper/tree/tests/adhoc/dmz01.sh, which
applies the following rule for pausing a server when there has been an
error in server placement (in a hypothetical "dmz" network environment):
|
"execute[nova:servers.pause(id)] :-
||dmz_placement_error(id),
||nova:servers(id,status='ACTIVE')"

I'm also trying to develop a similar test for deletion of a subnet that
has been defined in a reserved subnet space. But I can't figure out how
to specify the action. I'm currently trying things like:

"execute[neutron:delete_subnet(x)] :- reserved_subnet_error(x)"
or
|||"execute[neutron:subnet.delete(x)] :- reserved_subnet_error(x)"

|Where "reserved_subnet_error" is a table created by matching an
allocated subnet against a list of reserved subnets (e.g. for admin
purposes, and not intended to be made available to VMs).

To help me develop such tests, it would be good to know a complete list
of the "execute" action supported in Liberty (for all services). But I
only see a reference to the nova example above in the docs. I've looked
thru the code for neutron actions but can't find anywhere that a
complete set of supported actions is described, or the syntax for
invoking them in an execute rule.

Any pointers to where I should look (even in the code) is much appreciated.|

Thanks,
Bryan Sullivan


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
室井 雅仁(Masahito MUROI)
Software Innovation Center, NTT
Tel: +81-422-59-4539



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Congress] Guide for all reactive policy options? (execute[...])

2016-04-11 Thread Bryan Sullivan
Hi Congress team,

I'm trying to develop tests for the reactive policy features of Congress. I 
have one such test working, shown at 
https://git.opnfv.org/cgit/copper/tree/tests/adhoc/dmz01.sh, which applies the 
following rule for pausing a server when there has been an error in server 
placement (in a hypothetical "dmz" network environment): 

"execute[nova:servers.pause(id)] :- 
  dmz_placement_error(id),
  nova:servers(id,status='ACTIVE')" 

I'm also trying to develop a similar test for deletion of a subnet that has 
been defined in a reserved subnet space. But I can't figure out how to specify 
the action. I'm currently trying things like:

"execute[neutron:delete_subnet(x)] :- reserved_subnet_error(x)"
or 
"execute[neutron:subnet.delete(x)] :- reserved_subnet_error(x)"

Where "reserved_subnet_error" is a table created by matching an allocated 
subnet against a list of reserved subnets (e.g. for admin purposes, and not 
intended to be made available to VMs).

To help me develop such tests, it would be good to know a complete list of the 
"execute" action supported in Liberty (for all services). But I only see a 
reference to the nova example above in the docs. I've looked thru the code for 
neutron actions but can't find anywhere that a complete set of supported 
actions is described, or the syntax for invoking them in an execute rule.

Any pointers to where I should look (even in the code) is much appreciated.

Thanks,
Bryan Sullivan__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev