[jira] [Commented] (ARIA-54) Create an ARIA package on PyPI

2017-01-04 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15800194#comment-15800194
 ] 

John D. Ament commented on ARIA-54:
---

[~ran] just to point out, any distribution has to be in compliance with our ASF 
policies.  http://www.apache.org/dev/#releases

Key things:
- We cannot distribute a release outside of ASF if it hasn't been approved
- snapshot builds (if pypi has that concept) must be clearly marked as for dev 
testing only
- needs to conform to proper branding

Feel free to drop a note on the dev list if you have questions.

> Create an ARIA package on PyPI
> --
>
> Key: ARIA-54
> URL: https://issues.apache.org/jira/browse/ARIA-54
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


incubator-ariatosca git commit: Misc_fixes [Forced Update!]

2017-01-04 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/Misc_fixes 3eeb4a468 -> ba4595e23 (forced update)


Misc_fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ba4595e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ba4595e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ba4595e2

Branch: refs/heads/Misc_fixes
Commit: ba4595e23b33de3f4f86b382781dc464bf3e5e66
Parents: 860d69b
Author: mxmrlv 
Authored: Wed Jan 4 23:33:12 2017 +0200
Committer: mxmrlv 
Committed: Thu Jan 5 00:30:50 2017 +0200

--
 aria/storage/base_model.py |  4 +--
 aria/storage/structure.py  | 30 ++-
 aria/storage/type.py   | 54 -
 3 files changed, 30 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ba4595e2/aria/storage/base_model.py
--
diff --git a/aria/storage/base_model.py b/aria/storage/base_model.py
index c7eb27c..d1aebf2 100644
--- a/aria/storage/base_model.py
+++ b/aria/storage/base_model.py
@@ -146,7 +146,7 @@ class ExecutionBase(ModelMixin):
 VALID_TRANSITIONS = {
 PENDING: [STARTED, CANCELLED],
 STARTED: END_STATES + [CANCELLING],
-CANCELLING: END_STATES
+CANCELLING: END_STATES + [FORCE_CANCELLING]
 }
 
 @orm.validates('status')
@@ -156,7 +156,7 @@ class ExecutionBase(ModelMixin):
 current_status = getattr(self, key)
 except AttributeError:
 return
-valid_transitions = 
ExecutionBase.VALID_TRANSITIONS.get(current_status, [])
+valid_transitions = self.VALID_TRANSITIONS.get(current_status, [])
 if all([current_status is not None,
 current_status != value,
 value not in valid_transitions]):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ba4595e2/aria/storage/structure.py
--
diff --git a/aria/storage/structure.py b/aria/storage/structure.py
index d222c94..9bf1286 100644
--- a/aria/storage/structure.py
+++ b/aria/storage/structure.py
@@ -124,25 +124,31 @@ class ModelMixin(object):
 remote_side=remote_side_str,
 post_update=True)
 
-def to_dict(self, suppress_error=False):
+def to_dict(self, fields=None, suppress_error=False):
 """Return a dict representation of the model
 
 :param suppress_error: If set to True, sets `None` to attributes that
 it's unable to retrieve (e.g., if a relationship wasn't established
 yet, and so it's impossible to access a property through it)
 """
-if suppress_error:
-res = dict()
-for field in self.fields():
-try:
-field_value = getattr(self, field)
-except AttributeError:
+res = dict()
+fields = fields or self.fields()
+for field in fields:
+try:
+field_value = getattr(self, field)
+except AttributeError:
+# Can't simply call here `self.to_response()` because 
inheriting
+# class might override it, but we always need the same code 
here
+if suppress_error:
 field_value = None
-res[field] = field_value
-else:
-# Can't simply call here `self.to_response()` because inheriting
-# class might override it, but we always need the same code here
-res = dict((f, getattr(self, f)) for f in self.fields())
+else:
+raise
+if isinstance(field_value, list):
+field_value = list(field_value)
+elif isinstance(field_value, dict):
+field_value = dict(field_value)
+res[field] = field_value
+
 return res
 
 @classmethod

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ba4595e2/aria/storage/type.py
--
diff --git a/aria/storage/type.py b/aria/storage/type.py
index 84fd8dc..ab50b0f 100644
--- a/aria/storage/type.py
+++ b/aria/storage/type.py
@@ -60,63 +60,29 @@ class List(_MutableType):
 return list
 
 
-class _MutableDict(mutable.Mutable, dict):
+class _MutableDict(mutable.MutableDict):
 """
 Enables tracking for dict values.
 """
 @classmethod
 def coerce(cls, key, value):
 "Convert plain dictionaries to MutableDict."
+try:
+return mutable.MutableDict.coerce(key, value)
+

incubator-ariatosca git commit: Misc_fixes

2017-01-04 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/Misc_fixes [created] 3eeb4a468


Misc_fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3eeb4a46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3eeb4a46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3eeb4a46

Branch: refs/heads/Misc_fixes
Commit: 3eeb4a468aecadb79dae7d4ab3f85bf50dd06ac5
Parents: 860d69b
Author: mxmrlv 
Authored: Wed Jan 4 23:33:12 2017 +0200
Committer: mxmrlv 
Committed: Wed Jan 4 23:33:12 2017 +0200

--
 aria/storage/base_model.py |  4 +--
 aria/storage/structure.py  | 30 ++-
 aria/storage/type.py   | 54 -
 requirements.txt   |  6 ++---
 4 files changed, 33 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3eeb4a46/aria/storage/base_model.py
--
diff --git a/aria/storage/base_model.py b/aria/storage/base_model.py
index c7eb27c..d1aebf2 100644
--- a/aria/storage/base_model.py
+++ b/aria/storage/base_model.py
@@ -146,7 +146,7 @@ class ExecutionBase(ModelMixin):
 VALID_TRANSITIONS = {
 PENDING: [STARTED, CANCELLED],
 STARTED: END_STATES + [CANCELLING],
-CANCELLING: END_STATES
+CANCELLING: END_STATES + [FORCE_CANCELLING]
 }
 
 @orm.validates('status')
@@ -156,7 +156,7 @@ class ExecutionBase(ModelMixin):
 current_status = getattr(self, key)
 except AttributeError:
 return
-valid_transitions = 
ExecutionBase.VALID_TRANSITIONS.get(current_status, [])
+valid_transitions = self.VALID_TRANSITIONS.get(current_status, [])
 if all([current_status is not None,
 current_status != value,
 value not in valid_transitions]):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3eeb4a46/aria/storage/structure.py
--
diff --git a/aria/storage/structure.py b/aria/storage/structure.py
index d222c94..9bf1286 100644
--- a/aria/storage/structure.py
+++ b/aria/storage/structure.py
@@ -124,25 +124,31 @@ class ModelMixin(object):
 remote_side=remote_side_str,
 post_update=True)
 
-def to_dict(self, suppress_error=False):
+def to_dict(self, fields=None, suppress_error=False):
 """Return a dict representation of the model
 
 :param suppress_error: If set to True, sets `None` to attributes that
 it's unable to retrieve (e.g., if a relationship wasn't established
 yet, and so it's impossible to access a property through it)
 """
-if suppress_error:
-res = dict()
-for field in self.fields():
-try:
-field_value = getattr(self, field)
-except AttributeError:
+res = dict()
+fields = fields or self.fields()
+for field in fields:
+try:
+field_value = getattr(self, field)
+except AttributeError:
+# Can't simply call here `self.to_response()` because 
inheriting
+# class might override it, but we always need the same code 
here
+if suppress_error:
 field_value = None
-res[field] = field_value
-else:
-# Can't simply call here `self.to_response()` because inheriting
-# class might override it, but we always need the same code here
-res = dict((f, getattr(self, f)) for f in self.fields())
+else:
+raise
+if isinstance(field_value, list):
+field_value = list(field_value)
+elif isinstance(field_value, dict):
+field_value = dict(field_value)
+res[field] = field_value
+
 return res
 
 @classmethod

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3eeb4a46/aria/storage/type.py
--
diff --git a/aria/storage/type.py b/aria/storage/type.py
index 84fd8dc..ab50b0f 100644
--- a/aria/storage/type.py
+++ b/aria/storage/type.py
@@ -60,63 +60,29 @@ class List(_MutableType):
 return list
 
 
-class _MutableDict(mutable.Mutable, dict):
+class _MutableDict(mutable.MutableDict):
 """
 Enables tracking for dict values.
 """
 @classmethod
 def coerce(cls, key, value):
 "Convert plain dictionaries to MutableDict."
+try:
+return mutable.MutableDict.coerce(key, 

[jira] [Created] (ARIA-56) API for retrieving a node's host IP

2017-01-04 Thread Ran Ziv (JIRA)
Ran Ziv created ARIA-56:
---

 Summary: API for retrieving a node's host IP
 Key: ARIA-56
 URL: https://issues.apache.org/jira/browse/ARIA-56
 Project: AriaTosca
  Issue Type: Story
Reporter: Ran Ziv
Assignee: Dan Kilman


The node instance's model object should have an "ip" property which will 
retrieve either its IP or its host node instance's IP



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (ARIA-55) API for task retry and task abort

2017-01-04 Thread Ran Ziv (JIRA)
Ran Ziv created ARIA-55:
---

 Summary: API for task retry and task abort
 Key: ARIA-55
 URL: https://issues.apache.org/jira/browse/ARIA-55
 Project: AriaTosca
  Issue Type: Story
Reporter: Ran Ziv
Assignee: Dan Kilman


Add an API for aborting a running task, or setting it for a retry after a given 
amount of time



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: GIT/JIRA Integration

2017-01-04 Thread Ran Ziv
Sounds good. Any idea when it's supposed to happen so I'll know when to
check?

On Wed, Jan 4, 2017 at 3:58 PM, John D. Ament  wrote:

> So it looks like its there.  INFRA is currently enabling fisheye for ASF,
> since Atlassian is shutting down its public offering.  Assuming no qualms
> with enabling fisheye for ARIAs repos, this will happen automatically.  Any
> concerns with that?  Once its up, we can turn off the other format.
>
> John
>
> On Wed, Jan 4, 2017 at 7:05 AM Ran Ziv  wrote:
>
> > Yes, that's what I was referring to.
> > I indeed don't know about version compatibility, I hope it applies for
> the
> > Apache JIRA version as well.
> >
> > Ran
> >
> > On Wed, Jan 4, 2017 at 2:02 PM, John D. Ament 
> > wrote:
> >
> > > Ran,
> > >
> > > Maybe I have to be logged in to see it.  I don't have an account on
> that
> > > JIRA.  Are you talking about the "Development" section on the far
> right?
> > >
> > > That's a feature in newer JIRA versions.  We're on 6.3.  I'd have to
> see
> > if
> > > that's an option first.
> > >
> > > John
> > >
> > > On Tue, Jan 3, 2017 at 8:31 AM Ran Ziv  wrote:
> > >
> > > > Thanks John,
> > > > I see that basically all git traffic now appears on JIRA as comments
> -
> > > that
> > > > indeed seems too noisy IMO.
> > > > Is it possible to configure it so that the git-jira integration will
> > > simply
> > > > present commits/branches/PRs related to a specific JIRA on a separate
> > > > section rather than in comments (like it's done here
> > > >  for example)?
> > > >
> > > > thanks
> > > >
> > > > On Fri, Dec 30, 2016 at 4:52 PM, John D. Ament <
> johndam...@apache.org>
> > > > wrote:
> > > >
> > > > > Just as an FYI, I've enabled GIT/JIRA integration for AriaTosca.
> If
> > it
> > > > > gets too noisy we can switch to worklog entries.  LMK.
> > > > >
> > > >
> > >
> >
>


Re: GIT/JIRA Integration

2017-01-04 Thread Ran Ziv
Yes, that's what I was referring to.
I indeed don't know about version compatibility, I hope it applies for the
Apache JIRA version as well.

Ran

On Wed, Jan 4, 2017 at 2:02 PM, John D. Ament  wrote:

> Ran,
>
> Maybe I have to be logged in to see it.  I don't have an account on that
> JIRA.  Are you talking about the "Development" section on the far right?
>
> That's a feature in newer JIRA versions.  We're on 6.3.  I'd have to see if
> that's an option first.
>
> John
>
> On Tue, Jan 3, 2017 at 8:31 AM Ran Ziv  wrote:
>
> > Thanks John,
> > I see that basically all git traffic now appears on JIRA as comments -
> that
> > indeed seems too noisy IMO.
> > Is it possible to configure it so that the git-jira integration will
> simply
> > present commits/branches/PRs related to a specific JIRA on a separate
> > section rather than in comments (like it's done here
> >  for example)?
> >
> > thanks
> >
> > On Fri, Dec 30, 2016 at 4:52 PM, John D. Ament 
> > wrote:
> >
> > > Just as an FYI, I've enabled GIT/JIRA integration for AriaTosca.  If it
> > > gets too noisy we can switch to worklog entries.  LMK.
> > >
> >
>


Re: GIT/JIRA Integration

2017-01-04 Thread John D. Ament
Ran,

Maybe I have to be logged in to see it.  I don't have an account on that
JIRA.  Are you talking about the "Development" section on the far right?

That's a feature in newer JIRA versions.  We're on 6.3.  I'd have to see if
that's an option first.

John

On Tue, Jan 3, 2017 at 8:31 AM Ran Ziv  wrote:

> Thanks John,
> I see that basically all git traffic now appears on JIRA as comments - that
> indeed seems too noisy IMO.
> Is it possible to configure it so that the git-jira integration will simply
> present commits/branches/PRs related to a specific JIRA on a separate
> section rather than in comments (like it's done here
>  for example)?
>
> thanks
>
> On Fri, Dec 30, 2016 at 4:52 PM, John D. Ament 
> wrote:
>
> > Just as an FYI, I've enabled GIT/JIRA integration for AriaTosca.  If it
> > gets too noisy we can switch to worklog entries.  LMK.
> >
>


[jira] [Created] (ARIA-54) Create an ARIA package on PyPI

2017-01-04 Thread Ran Ziv (JIRA)
Ran Ziv created ARIA-54:
---

 Summary: Create an ARIA package on PyPI
 Key: ARIA-54
 URL: https://issues.apache.org/jira/browse/ARIA-54
 Project: AriaTosca
  Issue Type: Story
Reporter: Ran Ziv






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)