Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability metadata for attributes #794

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Mar 28, 2018

No description provided.

Copy link
Collaborator

@itaibaz itaibaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also add validation each enum capabilities value in the list start with the prefix of the attribute name

@kcudnik
Copy link
Collaborator Author

kcudnik commented Mar 29, 2018

There is validation already on that, so at specific attribute only corresponding enum values can be added, or you are talking about different check ?

Please put any file ending on *.cap in meta folder and remove @Skip tag from that file, and type "make" this will allow to test your scenario

@itaibaz
Copy link
Collaborator

itaibaz commented Mar 30, 2018

I cloned meta dir from your fork, metacap branch
When trying to run make, I get errors with serialize.pm

Creating serialzie for sai_acl_resource_t
Creating serialzie for sai_attr_capability_metadata_t
ERROR: not handled sai_attr_capability_t operationcapability in sai_attr_capability_metadata_t, FIXME
Odd number of elements in hash assignment at serialize.pm line 363 (#1)
(W misc) You specified an odd number of elements to initialize a hash,
which is odd, because hashes come in key/value pairs.

Use of uninitialized value in list assignment at serialize.pm line 363 (#2)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl will try to tell you
the name of the variable (if any) that was undefined.  In some cases
it cannot do this, so it also tells you what operation you used the
undefined value in.  Note, however, that perl optimizes your program
and the operation displayed in the warning may not necessarily appear
literally in your program.  For example, "that $foo" is usually
optimized into "that " . $foo, and the warning will refer to the
concatenation (.) operator, even though there is no . in
your program.

Any idea what is wrong ?

@itaibaz
Copy link
Collaborator

itaibaz commented Mar 30, 2018

P.S. : otherwise I see there is already good validation for using incorrect enum value
So my comment re that issue is not relevant

@kcudnik
Copy link
Collaborator Author

kcudnik commented Apr 3, 2018

As you can see build succeeded on this branch, so probably you are mergin this commit with your code which is not synced with master?

@lguohan lguohan merged commit ca50061 into opencomputeproject:master Apr 6, 2018
@kcudnik kcudnik deleted the metacap branch November 13, 2020 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants