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

Rd semantics #114

Closed
oscargdd opened this issue May 21, 2020 · 6 comments · Fixed by #172 or #175
Closed

Rd semantics #114

oscargdd opened this issue May 21, 2020 · 6 comments · Fixed by #172 or #175
Assignees

Comments

@oscargdd
Copy link
Collaborator

The preference of the authors and most implementors so far is:

leaf rd {
  type union {
  type rt-types:route-distinguisher;
   type empty;
}

}
The alternative proposal is:
leaf rd {
type rt-types:route-distinguisher;
}

leaf auto-assign-rd {
  when "not(../rd)";
  type boolean;
}

Check with our Yang doctor

@oscargdd oscargdd self-assigned this May 21, 2020
@billwuqin
Copy link

I think Roque's proposal has been changed into:
leaf rd {
type rt-types:route-distinguisher;
}
container dynamic-assign-rd {
presence "Auto-assign-rd";
when "not(../rd)";
leaf rd-pool-name {
type string;
}
}
Even with this change, I still think it adds complexity.

  1. the upper layer oss should not care about which RD is allocated from which RD pool if the upper layer oss delegates RD assignment task to the controller, the upper layer oss should completely trust controller to do a good job.
  2. which RD is from which RD pool, this is more related to service maintenance, it should be put into separate module.
    My 2 cents.

Orignal proposal has bug, since if RD is not assigned by upper layer oss, the auto-assign-rd is always true, if RD is assigned by upper layer oss, the auto-assign-rd should be always false.
I am not sure it is necessary to consult with YANG doctor for this.

@rgaglian
Copy link

BTW, an better alternative would be to use the CASE statement. I can work on a proposal.

@rgaglian
Copy link

rgaglian commented Jun 25, 2020

Here is an option using choice/case that can faciliate the work for implementations/troubleshooting:

choice rd-choice {
      case directly-assigned {
        leaf rd {
          type rt-types:route-distinguisher;
        }
      }
      case pool-assigned {
        leaf rd-pool-name {
          type string;
        }
      }
      case no-rd {
        leaf no-rd {
          type empty;
        }
      }
    }

@billwuqin
Copy link

Proposed change sounds good to me.

@sbarguil
Copy link
Collaborator

sbarguil commented Jul 2, 2020

4bf6abc

Available in #172

@oscargdd
Copy link
Collaborator Author

oscargdd commented Jul 2, 2020

Samier has sent pull request #172

@oscargdd oscargdd linked a pull request Jul 3, 2020 that will close this issue
@oscargdd oscargdd linked a pull request Jul 23, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants