|
13 | 13 | # * See the License for the specific language governing permissions and
|
14 | 14 | # * limitations under the License.
|
15 | 15 |
|
16 |
| -import errno |
17 | 16 | import os
|
| 17 | +import errno |
18 | 18 | import warnings
|
19 | 19 | from contextlib import contextmanager
|
20 | 20 |
|
21 |
| -from cloudify_rest_client.exceptions import CloudifyClientError |
22 |
| -from cloudify.endpoint import ManagerEndpoint, LocalEndpoint |
23 |
| -from cloudify.logs import init_cloudify_logger |
| 21 | +from cloudify import utils |
24 | 22 | from cloudify import constants
|
25 | 23 | from cloudify import exceptions
|
26 |
| -from cloudify import utils |
| 24 | +from cloudify.logs import init_cloudify_logger |
| 25 | +from cloudify.endpoint import ManagerEndpoint, LocalEndpoint |
| 26 | +from cloudify_rest_client.exceptions import CloudifyClientError |
27 | 27 | from cloudify.constants import DEPLOYMENT, NODE_INSTANCE, RELATIONSHIP_INSTANCE
|
28 | 28 |
|
29 | 29 |
|
@@ -424,6 +424,16 @@ def number_of_instances(self):
|
424 | 424 | self._get_node_if_needed()
|
425 | 425 | return self._node.number_of_instances
|
426 | 426 |
|
| 427 | + @property |
| 428 | + def is_external(self) -> bool: |
| 429 | + """If this is a resource that Cloudify manages or not""" |
| 430 | + return self._properties.get('use_external_resource', False) |
| 431 | + |
| 432 | + @property |
| 433 | + def resource_id(self): |
| 434 | + """The resource's ID outside of Cloudify""" |
| 435 | + return self._properties.get('resource_id') |
| 436 | + |
427 | 437 |
|
428 | 438 | class NodeInstanceContext(EntityContext):
|
429 | 439 | def __init__(self, *args, **kwargs):
|
|
0 commit comments