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

Are the "id" fields unique in a file ? #94

Open
cgeoffroy opened this issue Jun 8, 2016 · 2 comments
Open

Are the "id" fields unique in a file ? #94

cgeoffroy opened this issue Jun 8, 2016 · 2 comments
Labels

Comments

@cgeoffroy
Copy link
Contributor

cgeoffroy commented Jun 8, 2016

For example, in the iperf VND, there is 2 elements with the id mgmt: a virtual_link and a connection_point.

It's a little counter-intuitive as an id generally refers to a unique target (at least in the scope of a file).

@mbredel
Copy link
Contributor

mbredel commented Jun 16, 2016

Yes, all ID fields are unique.

Any ID field belongs to a specific scope. In the given example, the scope is not the file (root), but the virtual_link section and the connection_point section respectively. There is no reference that is ambiguous, i.e., referencing a virtual link OR a connection point. Thus, the both id-fields, although the contain the same value, i.e., "mgmt", identify a virtual link and a connection point uniquely.

Moreover, the ID value is an arbitrary string that does not impose any specific format or pattern, right now. Thus, the ID value can be named by the developer/writer of the VNFD file as he wishes. However, it might be wise to come up with a meaningful naming scheme, say "virtual_link:mgmt" and "connection_point:mgmt" to get the scope directly from the name of the ID. We could enforce such a naming scheme, but I have the feeling that this would be to strict ...

@mbredel mbredel closed this as completed Jun 16, 2016
@mbredel mbredel reopened this Jun 16, 2016
@mbredel
Copy link
Contributor

mbredel commented Jun 16, 2016

Although the above statement is true, and the ID fields are unique, we have to change the reference to IDs. In order to reference an ID, we have to provide the scope as well. For example, to identify the connection points in the virtual links section:

virtual_links
  - id: "mgmt"
    connectivity_type: "E-LAN"
    connection_points_reference:
      - vdu_ref: "vdu01"
        cp_ref: "vdu01:cp01"
      - cp_ref: "mgmt"
  - id: "input"
    connectivity_type: "E-Line"
    connection_points_reference:
      - cp_ref: "vdu01:cp02"
        vdu_ref: "vdu01"
      - cp_ref: "input"

A connection_point_reference has to have a reference to the VDU. If this reference is missing, the cp-reference refers to a (global) VNF connection point.

@mbredel mbredel added the bug label Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants