Skip to content

Commit ea549e4

Browse files
authored
Rd 817 manila sdk (#383)
* add Manila SDK * manila sdk and tests * manila support * fix tests * manila changes * add cicd
1 parent d91ae85 commit ea549e4

18 files changed

Lines changed: 1143 additions & 44 deletions

File tree

.circleci/config.yml

Lines changed: 137 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,116 @@ commands:
231231
at: workspace
232232
- run: python .circleci/package_release.py
233233

234+
235+
validate_documentation:
236+
steps:
237+
- run:
238+
name: "Pull Submodules"
239+
command: |
240+
git submodule init
241+
git submodule update --remote --recursive
242+
- run:
243+
name: Download pip
244+
command: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
245+
- run:
246+
name: Install pip
247+
command: sudo python get-pip.py
248+
- run:
249+
name: Install virtualenv
250+
command: pip install --user virtualenv
251+
- run:
252+
name: Init virtualenv
253+
command: virtualenv env
254+
- run:
255+
name: install tox
256+
command: pip install --user pygithub pyyaml==3.10
257+
- run:
258+
name: upgrade setuptools
259+
command: pip install --upgrade setuptools
260+
- run:
261+
name: install local project
262+
command: pip install https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/latest.zip
263+
- attach_workspace:
264+
at: workspace
265+
- run: python .circleci/validate_docs.py
266+
267+
validate_version:
268+
steps:
269+
- run:
270+
name: "Pull Submodules"
271+
command: |
272+
git submodule init
273+
git submodule update --remote --recursive
274+
- run:
275+
name: Download pip
276+
command: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
277+
- run:
278+
name: Install pip
279+
command: sudo python get-pip.py
280+
- run:
281+
name: Install virtualenv
282+
command: pip install --user virtualenv
283+
- run:
284+
name: Init virtualenv
285+
command: virtualenv env
286+
- run:
287+
name: install tox
288+
command: pip install --user pygithub pyyaml==3.10
289+
- run:
290+
name: upgrade setuptools
291+
command: pip install --upgrade setuptools
292+
- run:
293+
name: install local project
294+
command: pip install https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/latest.zip
295+
- attach_workspace:
296+
at: workspace
297+
- run: python .circleci/validate_version.py
298+
299+
300+
merge_docs:
301+
steps:
302+
- attach_workspace:
303+
at: workspace
304+
- run:
305+
name: "Pull Submodules"
306+
command: |
307+
git submodule init
308+
git submodule update --remote --recursive
309+
- run:
310+
name: Set Python
311+
command: |
312+
if ! pyenv -v COMMAND &> /dev/null
313+
then
314+
echo "pyenv could not be found"
315+
exit
316+
else
317+
pyenv global 3.6.5
318+
fi
319+
- run:
320+
name: Download pip
321+
command: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
322+
- run:
323+
name: Install pip
324+
command: sudo python get-pip.py
325+
- run:
326+
name: Install virtualenv
327+
command: pip install --user virtualenv
328+
- run:
329+
name: Init virtualenv
330+
command: virtualenv env
331+
- run:
332+
name: install tox
333+
command: pip install --user pygithub pyyaml==3.10
334+
- run:
335+
name: upgrade setuptools
336+
command: pip install --upgrade setuptools
337+
- run:
338+
name: install local project
339+
command: pip install https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/latest.zip
340+
- attach_workspace:
341+
at: workspace
342+
- run: python .circleci/merge_docs.py
343+
234344
jobs:
235345

236346
unittests_py27:
@@ -249,6 +359,18 @@ jobs:
249359
- checkout
250360
- check_py3_compat
251361

362+
validate_version:
363+
executor: py36
364+
steps:
365+
- checkout
366+
- validate_version
367+
368+
validate_documentation:
369+
executor: py36
370+
steps:
371+
- checkout
372+
- validate_documentation
373+
252374
wagon:
253375
executor: wagon_generator
254376
steps:
@@ -292,12 +414,20 @@ jobs:
292414
- checkout
293415
- release_plugin
294416

417+
merge_docs:
418+
executor: py36
419+
steps:
420+
- checkout
421+
- merge_docs
422+
295423
workflows:
296424
version: 2
297425
tests:
298426
jobs:
299427
- py3_compat
300428
- unittests_py27
429+
- validate_version
430+
- validate_documentation
301431
- unittests_py36:
302432
requires:
303433
- py3_compat
@@ -316,20 +446,6 @@ workflows:
316446
requires:
317447
- wagon
318448
- rhel_wagon
319-
# - integration_tests_505:
320-
# requires:
321-
# - unittests_py27
322-
# - build_bundle
323-
# filters:
324-
# branches:
325-
# only: /([0-9\.]*\-build|master|dev)/
326-
# - integration_tests_510:
327-
# requires:
328-
# - unittests_py36
329-
# - build_bundle
330-
# filters:
331-
# branches:
332-
# only: /([0-9\.]*\-build|master|dev)/
333449
- release:
334450
filters:
335451
branches:
@@ -339,8 +455,13 @@ workflows:
339455
- wagon
340456
- rhel_wagon
341457
- build_bundle
342-
# - integration_tests_505
343-
# - integration_tests_510
458+
- merge_docs:
459+
filters:
460+
branches:
461+
only: /master/
462+
requires:
463+
- release
464+
- validate_documentation
344465

345466
nightly:
346467
triggers:

.circleci/merge_docs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from ecosystem_cicd_tools.github_stuff import merge_documentation_pulls
2+
3+
if __name__ == '__main__':
4+
merge_documentation_pulls()

.circleci/validate_docs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from ecosystem_cicd_tools.validations import validate_documentation_pulls
2+
3+
if __name__ == '__main__':
4+
validate_documentation_pulls()

.circleci/validate_version.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from os import path, pardir
2+
from ecosystem_cicd_tools.validations import validate_plugin_version
3+
4+
package_dir = path.join(
5+
path.abspath(
6+
path.join(path.dirname(__file__), pardir)
7+
)
8+
)
9+
10+
11+
if __name__ == '__main__':
12+
validate_plugin_version(package_dir)

CHANGELOG.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
3.3.0: Support Openstack Manila.
12
3.2.21: Versioning mismatch
23
3.2.20: Bump PyYaml to 5.3.1 and replace pycrypto 2.6.1 with pycryptodome 3.9.8
34
3.2.19: Fix issues with windows password decrypt
@@ -18,11 +19,11 @@
1819
- Add public_ip property when using server_connected_to_floating_ip and if use_public_ip is set True.
1920
3.2.10:
2021
- Remove ID key from resource object if healing terminated VM.
21-
3.2.9
22+
3.2.9:
2223
- Expose insecure & ca_cert to client config
23-
3.2.8
24+
3.2.8:
2425
- Expose ipv4 and ipv6 addresses as runtime properties for port node instance for openstack plugin 3.x
25-
3.2.7
26+
3.2.7:
2627
- Fix issue with OpenstackSDK for connecting server to security group
2728
3.2.6:
2829
- Changed minimum supported Cloudify version to 4.3.3

constraints.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
dogpile.cache===0.9.2
1+
dogpile.cache===0.9.2
2+
cloudify==5.1
3+
cryptography==3.2.1

examples/manila/script.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# For development help:
2+
from manilaclient import client
3+
# Fill in with real values.
4+
manila = client.Client(
5+
client_version='2',
6+
username='admin',
7+
password='openstack',
8+
project_name='demo',
9+
auth_url='http://10.11.12.2/identity',
10+
user_domain_name='Default',
11+
project_domain_name='default')
12+
share_networks = manila.share_networks.list()
13+
shares = manila.shares.list()

0 commit comments

Comments
 (0)