Skip to content

Instantly share code, notes, and snippets.

@arax
Last active December 17, 2015 10:49
Show Gist options
  • Save arax/5597702 to your computer and use it in GitHub Desktop.
Save arax/5597702 to your computer and use it in GitHub Desktop.
rOCCI -- parsing error from invalid Action rendering (rOCCI-server v0.5.x) and SecGroup mixin (OCCI-OS)
# Action
~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:134:in `category': could not match Category: down;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#up";class="action";title="Activate network" (RuntimeError)
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:73:in `block in categories'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `each'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `categories'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser.rb:41:in `parse'
# Security group from OCCI-OS
~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:134:in `category': could not match Category: 36; scheme="http://schemas.openstack.org/infrastructure/security/group#"; class="mixin"; title="default"; rel="http://schemas.ogf.org/occi/infrastructure/security#group"; location="/security/default/" (RuntimeError)
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:73:in `block in categories'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `each'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `categories'
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser.rb:41:in `parse'
@ffeldhaus
Copy link

The first example fails, as the action scheme contains an additional 'up' behind the '#'. We could allow this in the Regexp, but need to discuss it.
The second example fails because a term must start with a lowercase character (no number). We could change that as well, but it would not be in accordance with the spec (we might change the spec as well in the future if it's reasonable to relax this requirement).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment