657 | | /* |
658 | | |
659 | | Associate an aggregate as having sliver information in a given slice |
660 | | Expected to be called by an aggregate as an asynchronous (not critical-path) part of the resource allocation process. |
661 | | |
662 | | */ |
663 | | |
664 | | '''Arguments:''' |
665 | | |
666 | | slice_urn: URN of slice for which to associate aggregate |
667 | | |
668 | | aggregate_url : URL of aggregate for which slivers may exist for the given slice |
669 | | |
670 | | '''Return:''' |
671 | | |
672 | | None |
673 | | |
674 | | function '''register_aggregate'''(slice_urn, aggregate_url, credentials, options) |
675 | | |
676 | | /* |
677 | | |
678 | | Dis-associate an aggregate as having sliver information in a given slice |
679 | | |
680 | | Expected to be called by an aggregate as an asynchronous (not critical-path) part of the resource de-allocation process. |
681 | | |
682 | | */ |
683 | | |
684 | | '''Arguments:''' |
685 | | |
686 | | slice_urn: URN of slice for which to associate aggregate |
687 | | |
688 | | aggregate_url : URL of aggregate for which slivers may exist for the given slice |
689 | | |
690 | | '''Return:''' |
691 | | |
692 | | None |
693 | | |
694 | | function '''remove_aggregate'''(slice_urn, aggregate_url, credentials, options) |
695 | | |
696 | | /* |
697 | | |
698 | | Provide a list of URLs of all aggregates that have been registered as having resources allocated with a given slice. |
699 | | |
700 | | NB: This list is not definitive in that the aggregate may not have called the register_aggregate call, and that the slivers may no longer be at the aggregate. But it is provided as a convenience for tools to know where to go for sliver information (rather than querying every aggregate in the Registry). |
701 | | |
702 | | '''Arguments:''' |
703 | | |
704 | | slice_urn: URN of slice for which to return associated aggregates |
705 | | |
706 | | '''Return:''' |
707 | | |
708 | | List of URL’s of aggregates for which slivers may exist for given slice. |
709 | | |
710 | | */ |
711 | | |
712 | | function '''get_slice_aggregates'''(slice_urn, credentials, options) |
| 657 | The following table contains the required fields for sliver info objects and whether they are allowed in lookup 'match' criteria, required at creation or allowed at update: |
| 658 | |
| 659 | || '''Name''' || '''Type''' || '''Description''' || '''Match''' || '''Creation''' || '''Update''' || |
| 660 | || SLIVER_INFO_SLICE_URN || URN || URN of slice for registered sliver || Yes || Required || No || |
| 661 | || SLIVER_INFO_URN || URN || URN of registered sliver || Yes || Required || No || |
| 662 | || SLIVER_INFO_AGGREGATE_URN || URN || URN of aggregate of registered sliver || Yes || Required || No || |
| 663 | || SLIVER_INFO_CREATOR_URN || URN || URN of member/tool that created the registered sliver || Yes || Required || No || |
| 664 | || SLIVER_INFO_EXPIRATION || DATETIME || Time of sliver expiration || No || Allowed || Yes || |
| 665 | || SLIVER_INFO_CREATION || DATETIME || Time of sliver creation || No || Allowed || No || |
| 666 | |
| 667 | /* |
| 668 | |
| 669 | Create a record of a sliver creation |
| 670 | |
| 671 | '''Arguments:''' |
| 672 | |
| 673 | options: 'fields' containing the fields for the sliver info being registered at SA |
| 674 | |
| 675 | '''Return:''' |
| 676 | |
| 677 | Dictionary of name/value pairs for created sliver_info record |
| 678 | |
| 679 | */ |
| 680 | |
| 681 | function '''create_sliver_info'''(credentials, options) |
| 682 | |
| 683 | /* |
| 684 | |
| 685 | Delete a sliver_info record |
| 686 | |
| 687 | '''Arguments:''' |
| 688 | |
| 689 | sliver_urn: urn of sliver whose record is to be deleted |
| 690 | |
| 691 | '''Return:''' |
| 692 | |
| 693 | True if succeeded |
| 694 | |
| 695 | Should return ARGUMENT_ERROR if no such sliver urn is registered |
| 696 | |
| 697 | */ |
| 698 | |
| 699 | function '''delete_sliver_info'''(sliver_urn, credentials, options) |
| 700 | |
| 701 | /* |
| 702 | |
| 703 | Update the details of a sliver_info record |
| 704 | |
| 705 | '''Arguments:''' |
| 706 | |
| 707 | sliver_urn: urn of sliver for which to update |
| 708 | |
| 709 | options: 'fields' containing fields for sliver_infos that are permitted for update |
| 710 | |
| 711 | '''Return:''' |
| 712 | |
| 713 | True if succeeded |
| 714 | |
| 715 | Should return ARGUMENT_ERROR if no such sliver_urn is found |
| 716 | |
| 717 | */ |
| 718 | |
| 719 | function '''update_sliver_info'''(sliver_urn, credentials, options) |
| 720 | |
| 721 | /* |
| 722 | |
| 723 | Lookup sliver_info for given match criteria return fields in given filter criteria |
| 724 | |
| 725 | '''Arguments:''' |
| 726 | |
| 727 | options: 'match' for query match criteria, 'filter' for fields to be returned |
| 728 | |
| 729 | '''Return:''' |
| 730 | |
| 731 | Dictionary (indexed by sliver_urn) of dictionaries containing name/value pairs for all sliver_infos registered at this SA matching given criteria. |
| 732 | |
| 733 | */ |
| 734 | |
| 735 | function '''lookup_sliver_info'''(credentials, options) |
| 736 | |