Skip to content

Commit 6441ec3

Browse files
authored
Merge pull request #36 from cloudify-cosmo/2.0.6-build
2.0.6-build
2 parents 764c53e + a639528 commit 6441ec3

File tree

10 files changed

+422
-32
lines changed

10 files changed

+422
-32
lines changed

.circleci/config.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
version: 2.1
22

3+
unittest-post-steps: &unittest-post-steps
4+
post-steps:
5+
- store_test_results:
6+
path: /home/circleci/project/nosetests.xml
7+
- store_artifacts:
8+
path: /home/circleci/project/coverage.xml
9+
prefix: tests
10+
- slack/notify_failed
11+
312
orbs:
4-
node: cloudify/[email protected] #orb version
5-
wagonorb: cloudify/[email protected] #orb version
6-
releaseorb: cloudify/[email protected] #orb version
7-
managerorb: cloudify/[email protected]
13+
node: cloudify/public-unittest-orb@volatile
14+
wagonorb: cloudify/wagon-bulder-orb@volatile
15+
releaseorb: cloudify/release-orb@volatile
16+
managerorb: cloudify/manager-orb@volatile
17+
slack: cloudify/notify-slack@2
818

919
checkout:
1020
post:
@@ -35,31 +45,27 @@ workflows:
3545
filters:
3646
branches:
3747
only: /([0-9\.]*\-build|master|main)/
38-
- wagonorb/arch64_wagon:
48+
- wagonorb/wagon_311:
3949
filters:
4050
branches:
4151
only: /([0-9\.]*\-build|master|main)/
42-
- wagonorb/rhel_wagon:
52+
- wagonorb/arch64_wagon:
4353
filters:
4454
branches:
4555
only: /([0-9\.]*\-build|master|main)/
46-
- wagonorb/build_bundle:
56+
- wagonorb/rhel_wagon:
4757
filters:
4858
branches:
4959
only: /([0-9\.]*\-build|master|main)/
50-
requires:
51-
- wagonorb/wagon
52-
- wagonorb/arch64_wagon
53-
- wagonorb/rhel_wagon
5460
- releaseorb/release:
5561
filters:
5662
branches:
5763
only: /master|main/
5864
requires:
5965
- wagonorb/wagon
66+
- wagonorb/wagon_311
6067
- wagonorb/arch64_wagon
6168
- wagonorb/rhel_wagon
62-
- wagonorb/build_bundle
6369
- node/validate_version_job
6470
- node/validate_documentation_job
6571
- releaseorb/merge_docs_job:

CHANGELOG.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
2.0.3: Rerelease with redhat 8 and dsl 1_4
77
2.0.4: Upgrade to work with vcd 10.3.2
88
2.0.5: Add node_type cloudify.nodes.vcloud.DirectlyConnectedVDCNetwork for supporting SRIOV adapter type
9+
2.0.6: add plugin_1_5.yaml and handle ctx.plugin properties.

cloudify_vcd/__version__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = '2.0.6'

cloudify_vcd/tests/test_utils.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@
3838
find_resource_id_from_relationship_by_type)
3939

4040

41+
class SpecialMockCloudifyContext(MockCloudifyContext):
42+
43+
def __init__(self, *args, **kwargs) -> None:
44+
super().__init__(*args, **kwargs)
45+
setattr(self, 'properties', kwargs.get('properties'))
46+
self._plugin = mock.MagicMock(properties={})
47+
48+
@property
49+
def plugin(self):
50+
return self._plugin
51+
52+
4153
def get_mock_node_instance_context(**kwargs):
4254
kwargs['node_id'] = kwargs.get('node_id', 'foo')
4355
kwargs['node_name'] = kwargs.get('node_id', 'foo')
@@ -55,7 +67,7 @@ def get_mock_node_instance_context(**kwargs):
5567
kwargs['operation'] = kwargs.get(
5668
'operation',
5769
{'name': 'foo', 'retry_number': 0})
58-
_ctx = MockCloudifyContext(**kwargs)
70+
_ctx = SpecialMockCloudifyContext(**kwargs)
5971
_ctx.node.type_hierarchy = ['cloudify.nodes.Root',
6072
'cloudify.nodes.Compute',
6173
'cloudify.nodes.vcloud.VM']
@@ -109,7 +121,7 @@ def get_mock_relationship_context(**kwargs):
109121
kwargs['operation'] = kwargs.get(
110122
'operation',
111123
{'name': 'foo', 'retry_number': 0})
112-
_ctx = MockCloudifyContext(**kwargs)
124+
_ctx = SpecialMockCloudifyContext(**kwargs)
113125
_ctx._context = {'related': kwargs.get('related', {'is_target': False})}
114126
current_ctx.set(_ctx)
115127
return _ctx

cloudify_vcd/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
OperationRetry,
2323
NonRecoverableError)
2424

25+
from cloudify_common_sdk.utils import get_client_config as _get_client_config
26+
2527
from vcd_plugin_sdk.connection import VCloudConnect
2628
from .constants import (
2729
CLIENT_CONFIG_KEYS,
@@ -146,7 +148,7 @@ def get_resource_id(node, instance, instance_id=None):
146148

147149

148150
def get_client_config(node):
149-
client_config = node.get('client_config', {})
151+
client_config = _get_client_config()
150152
vdc = client_config.get('vdc')
151153

152154
def _get_config():

plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
vcd:
44
executor: central_deployment_agent
55
package_name: cloudify-vcloud-plugin
6-
package_version: '2.0.5'
6+
package_version: '2.0.6'
77

88
data_types:
99

plugin_1_4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
vcd:
44
executor: central_deployment_agent
55
package_name: cloudify-vcloud-plugin
6-
package_version: '2.0.5'
6+
package_version: '2.0.6'
77

88
blueprint_labels:
99
obj-type:

0 commit comments

Comments
 (0)