Coder Social home page Coder Social logo

Comments (8)

mikevanwinkle avatar mikevanwinkle commented on June 16, 2024

Hey Brian, try pulling down the master branch again. Yesterday at about 4PM I realized I hadn't pushed up the new Worflows.php. Once you pull down the master this error should go away.

from terminus.

mikevanwinkle avatar mikevanwinkle commented on June 16, 2024

Also RE: the inconsistency in org id and org name ... that's an inconsistency in the API currently. Noted and will bring it up with the API team.

from terminus.

bwood avatar bwood commented on June 16, 2024

As noted in #56 (comment) is not quite working yet.

from terminus.

bwood avatar bwood commented on June 16, 2024

Trying with 0.3.3-beta:

[bwood@mbp ~]$ terminus cli version
Terminus 0.3.3-beta

Can add using lowercased hyphenated org name:

[bwood@mbp ~]$ terminus site organizations add --site=ob7-t032b-01 --org=uc-berkeley-testing

Success: Organization successfully added
+-------------------------+---------------------+-------------+--------------------------------------+
| Label                   | Name                | Role        | Id                                   |
+-------------------------+---------------------+-------------+--------------------------------------+
| 'UC Berkeley'           | uc-berkeley         | team_member | 94a63981-a120-4f67-ae63-11547dee8be1 |
| 'UC Berkeley - Testing' | uc-berkeley-testing | team_member | 430c1947-354f-459a-8755-f38293aef105 |
+-------------------------+---------------------+-------------+--------------------------------------+

Can't remove using lowercased hyphenated org name:

[bwood@mbp ~]$ terminus site organizations remove --site=ob7-t032b-01 --org=uc-berkeley-testing
Error: [ERROR] Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 1891, in _trigger
    d.addCallbacks(executeCallback, failureCallback)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 290, in addCallbacks
    self._runCallbacks()
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 1853, in executeCallback
    d = defer.maybeDeferred(response, workflow=workflow, task=task, **params)
--- <exception caught here> ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 397, in remove_site_organization_membership
    membership = collection.retrieve(organization_id)
  File "/usr/lib/python2.7/site-packages/titan/backends/cassandra/collection.py", line 729, in retrieve
    normalized_id = self.normalize_id(model_id)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/models/memberships.py", line 312, in normalize_id
    return uuid.UUID(str(model_id))
  File "/usr/lib64/python2.7/uuid.py", line 134, in __init__
    raise ValueError('badly formed hexadecimal UUID string')
exceptions.ValueError: badly formed hexadecimal UUID string

Can remove using UUID!

bwood@mbp ~]$ terminus site organizations remove --site=ob7-t032b-01 --org=430c1947-354f-459a-8755-f38293aef105

Success: Organization successfully removed
+---------------+-------------+-------------+--------------------------------------+
| Label         | Name        | Role        | Id                                   |
+---------------+-------------+-------------+--------------------------------------+
| 'UC Berkeley' | uc-berkeley | team_member | 94a63981-a120-4f67-ae63-11547dee8be1 |
+---------------+-------------+-------------+--------------------------------------+

from terminus.

bwood avatar bwood commented on June 16, 2024

Can add using "pretty" name, but can't remove using "pretty" name:

[bwood@mbp ~]$ terminus site organizations add --site=ob7-t032b-01 --org="UC Berkeley - Testing"

Success: Organization successfully added
+-------------------------+---------------------+-------------+--------------------------------------+
| Label                   | Name                | Role        | Id                                   |
+-------------------------+---------------------+-------------+--------------------------------------+
| 'UC Berkeley'           | uc-berkeley         | team_member | 94a63981-a120-4f67-ae63-11547dee8be1 |
| 'UC Berkeley - Testing' | uc-berkeley-testing | team_member | 430c1947-354f-459a-8755-f38293aef105 |
+-------------------------+---------------------+-------------+--------------------------------------+

[bwood@mbp ~]$ terminus site organizations remove --site=ob7-t032b-01 --org="UC Berkeley - Testing"
Error: [ERROR] Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 1891, in _trigger
    d.addCallbacks(executeCallback, failureCallback)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 290, in addCallbacks
    self._runCallbacks()
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 1853, in executeCallback
    d = defer.maybeDeferred(response, workflow=workflow, task=task, **params)
--- <exception caught here> ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/yggdrasil_tasks.py", line 397, in remove_site_organization_membership
    membership = collection.retrieve(organization_id)
  File "/usr/lib/python2.7/site-packages/titan/backends/cassandra/collection.py", line 729, in retrieve
    normalized_id = self.normalize_id(model_id)
  File "/usr/lib/python2.7/site-packages/titan/yggdrasil/models/memberships.py", line 312, in normalize_id
    return uuid.UUID(str(model_id))
  File "/usr/lib64/python2.7/uuid.py", line 134, in __init__
    raise ValueError('badly formed hexadecimal UUID string')
exceptions.ValueError: badly formed hexadecimal UUID string

from terminus.

mikevanwinkle avatar mikevanwinkle commented on June 16, 2024

So I know this is weird, but it's the way the api is name to add id to remove. The reason it's this way is the presumption that if you are removing you already know the id and if adding you do not. I can update terminus to accept both --orgid and --orgname instead of just --org. Does that sound like a good solution?

from terminus.

bwood avatar bwood commented on June 16, 2024

It's not a blocker, but adding both would make it nicer--more predictable.

from terminus.

mikevanwinkle avatar mikevanwinkle commented on June 16, 2024

Awesome ... thanks for the feedback.

On Thu, Jan 22, 2015 at 1:32 PM, Brian Wood [email protected]
wrote:

It's not a blocker, but adding both would make it nicer--more predictable.


Reply to this email directly or view it on GitHub
#57 (comment).

Mike Van Winkle
708-289-3136
[email protected]
http://www.mikevanwinkle.com
http://www.twitter.com/mpvanwinkle
http://www.facebook.com/mpvanwinkle

"All excellent things are as difficult as they are rare." -Spinoza

from terminus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.