Commit Graph

16 Commits

Author SHA1 Message Date
Zuul f979628edc Merge "Remove a sample file of masakari.conf" 2021-08-16 09:15:06 +00:00
Arthur Dayne 3bc725eb7a Support noauth2 auth_strategy
Currently, noauth2 auth_strategy is not supported. If you specify
[DEFAULT]auth_strategy=noauth2 in `/etc/masakari/ masakari.conf`
and start the masakari api service, it gives ImportError.

Added NoAuthMiddleware to support noauth2 auth_strategy.

Closes-Bug: #1836354
Change-Id: I288cd5838b09d3e6c31b6408fff85e6bb5f529a6
2019-10-03 04:42:03 +00:00
binhong.hua c22c1d8081 fix oslo-config-generator conf
1) oslo.config should not in conf
2) namespace masakari.api and masakari.engine not exist in entry_point

Change-Id: Iad749cd8467f67a1aef64fb35a654ce221b172b4
2019-03-12 15:53:17 +08:00
tpatil 5993b2fbc0 Add masakari-custom-recovery-methods.conf in etc/masakari
Added missing masakari-custom-recovery-methods.conf in
etc/masakari directory.

Closes-Bug: #1786742
Change-Id: Ic758c4cd7375403d028dda26bc4aefef37b8f43b
2018-08-13 08:09:42 +00:00
bhagyashris ad3dc737c9 Add hooks for recovery method customization plugins
This change adds hooks for pulling in plugins for
Interoperable recovery method customization taksflow
by configuring the actions in terms of execution order,
extra parameters to execute commands in action.

Implements: blueprint recovery-method-customization

Change-Id: I8150935ce0a4e592bd0f87bb3c7b3e599cefa033
2018-08-02 13:13:00 +05:30
shilpa.devharakar d7592cbe25 Register and Document policy in code
Adds below things for the implementation of framework for registering and
using default policy rules.
* Policy-in-code
  The framework for registering and using default policy rules.
  Rules should be defined and returned from a module in
  masakari/policies/, and then added to the list in masakari/policies/__init__.py.
  A new context.can() method has been added for policy enforcement of
  registered rules. It has the same parameters as the enforce() method
  currently being used.
* Add policy sample generation
  The entry point and config file necessary for using the
  oslo.policy sample generation script. It also adds a tox target to
  simplify the usage of it.
* Add policy documentation and sample file
  Documentation and sample file for default policy in code feature.
* Hacking check for policy registration
  It ensures that policy registration happens in the centralized
  masakari/policies/ directory.
* Hacking check for _ENFORCER.enforce()
  Hacking check in order to ensure that only registered policies
  are used for authorization checks _ENFORCER.authorize should be used rather
  than _ENFORCER.enforce.
* Add entry_point for oslo policy scripts
  There are two helper scripts in oslo.policy to help deployers understand
  their policy configuration better. With the setup.cfg entry these can be
  called directly from oslo.policy.

Changes done here are with the reference of [1] at NOVA side
which is contributed by Andrew Laski and Claudiu Belu

[1] https://review.openstack.org/#/q/topic:bp/policy-in-code+project:openstack/nova+status:merged

Change-Id: If885a66d92c31be440d27d6780635800a0b12e3e
2018-07-27 12:15:14 +05:30
Rikimaru Honjo 33f84252e8 Remove a sample file of masakari.conf
This patch removes a sample file of masakari.conf.
Because masakari configuration file can be generated by
"tox -egenconfig" command now.

This is a trivial fix.

Change-Id: Iec4c147fbc048ab46f3366847c3df977ee0c234a
2018-05-27 17:55:14 -07:00
Vu Cong Tuan 1c0b3d0ce7 Update "auth_url"
Following the change in Keystone Install Guide [1],
this patch replace port 35357 with 5000 for "auth_url".

For more details, please check similar changes which have been done
on other projects: Nova [2], Neutron [3], Cinder [4], Glance [5].

In addition, update deprecated "auth_uri" to "www_authenticate_uri",
according to [6].

[1] https://review.openstack.org/#/c/541857
[2] https://review.openstack.org/#/c/562812
[3] https://review.openstack.org/#/c/566491
[4] https://review.openstack.org/#/c/565464
[5] https://review.openstack.org/#/c/558932
[6] https://review.openstack.org/#/c/508522

Change-Id: I262c3b75f98e3ae85b913a5086c3c5ff5edba8f9
2018-05-11 10:29:45 +07:00
hussainchachuliya 7045f81300 Add missing namespaces in masakari-config-generator.conf
Added missing namespaces including oslo.messaging for configuring
messaging server, oslo.service.service for specifying graceful
shutdown timeout, oslo.db.concurrency for enabling thread pooling
for all DB API calls, oslo.config to configure config directory,
oslo.service.wsgi for wsgi config options and oslo.versionedobjects
for versioned objects related config options.

Change-Id: I9dcc094090b10a65ebbe55ab2d7fdbf2fb0b129f
2016-11-18 11:53:22 +00:00
hussainchachuliya 04560ae07c Set admin user as the default policy
Since the masakari APIs are intended to be used only by admin user,
therefore, the default policy in policy.json is changed from
"rule:admin_or_owner" to "default": "rule:admin_api".

Closes-bug: #1640384

Change-Id: I3cbbc4352d09fe701f2b3e86a8168dc6a40c331e
2016-11-09 11:23:43 +05:30
dineshbhor 49c1171625 Add business rule for process_notification
Added business rules:
Ignore notification if host is on maintenance.
Ignore notification if it is duplicate.

Change-Id: I963ab41e79db74d2574731201ea6df5e2675d449
2016-11-04 15:24:12 +05:30
dineshbhor 44f7699e48 Add notifications controller for masakari
This patch will add following notification apis:

1] GET /v1/notifications
2] GET /v1/notifications/<notification_uuid>
3] POST /v1/notifications

Change-Id: Id2d2b8ba5c372b21a5b0df4f1e4db9054e55831f
2016-10-04 11:37:27 +05:30
dineshbhor 2e267e6604 Added host controller for masakari
Host controller will allow user to do CRUD operations on hosts.
Added authorize policy for host controller methods as these are
going to be called by admin only.

Change-Id: I9871d4163d13bddfa49e6ee5f532de641711c30e
2016-09-23 13:56:19 +05:30
dineshbhor d906541e21 Added failover segments controller for masakari
This patch will allow masakari operators to hit following apis:

1] GET /v1/segments
2] GET /v1/segments/<segment_uuid>
3] POST /v1/segments
4] PUT /v1/segments/<segment_uuid>
5] DELETE /v1/segments/<segment_uuid>

Change-Id: I63b48bfa70db7bfacec1c8431fe48feb7aa4c7ef
2016-09-23 13:54:44 +05:30
dineshbhor 27977c10ee Make use of oslo-config-generator
oslo_config provide a utility for generating sample config files,
which provide more detail about opts, like Minimum/Maximum value
and Allowed values.

After this patch, new config options of masakari code should register
with masakari/conf/opts.py.

Change-Id: I8f2f7e87268498ebee7ca164db1c98ef43c279b0
2016-08-11 12:45:26 +05:30
Abhishek Kekane d4f055262e Add support for wsgi framework
Added wsgi framework support to create masakari-api
service using oslo_service framework. Similar to core
openstack projects, config items will be kept at centralized
location.

Refer README.rst to cofigure and run masakari-api service.

Change-Id: Idb0120b8cf3b10642c51b286d82cd0944cad5ca3
2016-07-12 13:10:10 +05:30