Name:		aops-zeus
Version:	v1.4.0
Release:	4
Summary:	A host and user manager service which is the foundation of aops.
License:	MulanPSL2
URL:		https://gitee.com/openeuler/%{name}
Source0:	%{name}-%{version}.tar.gz
Patch0001:      0001-add-interface-for-detecting-host-status.patch
Patch0002:      0002-update-the-query-host-list-api.patch
Patch0003:      0003-fix-search_key-validate.patch
Patch0004:      0004-add-rollback-task-execution-method.patch
Patch0005:      0005-fix-apollo-TimedCorrectTask.patch
Patch0006:      0006-update-verification-method-for-adding-host.patch
Patch0007:      0007-update-verification-method-for-host-ip-field.patch
Patch0008:      0008-check-host-status-when-query-host-detail.patch


BuildRequires:  python3-setuptools
Requires:   aops-vulcanus >= v1.3.0
Requires:   python3-marshmallow >= 3.13.0 python3-flask python3-flask-restful python3-gevent
Requires:   python3-requests python3-uWSGI python3-sqlalchemy python3-werkzeug python3-PyMySQL
Requires:   python3-paramiko >= 2.11.0 python3-redis python3-prometheus-api-client
Provides:   aops-zeus
Conflicts:  aops-manager


%description
A host and user manager service which is the foundation of aops.


%prep
%autosetup -n %{name}-%{version} -p1


# build for aops-zeus
%py3_build


# install for aops-zeus
%py3_install
mkdir -p %{buildroot}/opt/aops/
cp -r database %{buildroot}/opt/aops/


%files
%doc README.*
%attr(0644,root,root) %{_sysconfdir}/aops/zeus.ini
%attr(0755,root,root) %{_bindir}/aops-zeus
%attr(0755,root,root) /usr/lib/systemd/system/aops-zeus.service
%{python3_sitelib}/aops_zeus*.egg-info
%{python3_sitelib}/zeus/*
%attr(0755, root, root) /opt/aops/database/*


%changelog
* Thu Dec 21 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-4
- update verification method for host ip field
- check host status when query host detail

* Tue Dec 19 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-3
- update verification method for adding host or updating host info
- fix apollo TimedCorrectTask

* Mon Dec 18 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-2
- Add interface for detecting host status.
- Update query host list api, add a new query method based on host name for it.
- Add rollback task execution method. 
- Fix cve scan callback error.

* Tue Dec 12 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-1
- Change CVE rollback task to hotpatch remove

* Mon Nov 06 2023 wenxin<wenxin32@foxmail.com> - v1.3.1-5
- Bugfix: email config does not take effect
- Add an interface for querying file list

* Fri Oct 27 2023 liulei<450962@qq.com> - v1.3.1-4
- Bugfix: update host api request error when changing username

* Thu Oct 26 2023 wenxin<wenxin32@foxmail.com> - v1.3.1-3
- update the template file contents for adding hosts

* Wed Oct 18 2023 wenxin<wenxin32@foxmail.com> - v1.3.1-2
- fix bug: metric proxy init failed
- add a way about key authentication for add host api
- remove python3-prometheus-api-client 

* Thu Sep 21 2023 wenxin<shusheng.wen@outlook.com> - v1.3.1-1
- update spec requires
- update version info in setup.py file

* Tue Sep 19 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-4
- bugfix: cve fix result parsing error

* Tue Sep 19 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-3
- update callback request headers
- fix bash file sync error

* Wed Sep 13 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-2
- add file sync func

* Tue Sep 05 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-1
- optimize the method of executing apollo tasks

* Fri Jun 02 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-2
- update cve fix

* Tue May 23 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-1
- add cve rollback api;update cve scan callback func

* Tue May 09 2023 wenxin<shusheng.wen@outlook.com> - v1.2.0-4
- update validate rules of username field

* Mon May 08 2023 wenixn<shusheng.wen@outlook.com> - v1.2.0-3
- add gevent config item for uwsgi

* Thu Apr 27 2023 wenixn<shusheng.wen@outlook.com> - v1.2.0-2
- Fix token is not invalidated after the token was refreshed
- update args validation rules for add account and for add host
- replace thread scheduling with gevent scheduling when add host by batch 

* Mon Apr 17 2023 wenixn<shusheng.wen@outlook.com> - v1.2.0-1
- update the call method of ceres; add function how to add host from web
- add api: update host info 

* Tue Dec 27 2022 wenxin<shusheng.wen@outlook.com> - v1.1.1-4
- Modify uwsgi configuration file fields

* Wed Dec 21 2022 gongzhengtang<gong_zhengtang@163.com> - v1.1.1-3
- disabled mysql installed checked

* Tue Dec 06 2022 wenxin<shusheng.wen@outlook.com> - v1.1.1-2
- update delete host, remove the judgment about the workflow

* Fri Dec 02 2022 wenxin<shusheng.wen@outlook.com> - v1.1.1-1
- set timeout for cve scan,cve fix ,repo set

* Fri Nov 25 2022 wenxin<shusheng.wen@outlook.com> - v1.1.0-1
- remove test cases that use the responses module
- remove check_es_installed
- add cve cve fix, add cve cve scan

* Tue Nov 22 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.0.0-1
- Package init
