| 533 | |
| 534 | == Resources == |
| 535 | |
| 536 | Resources are things that make up experiments. There are several specialized resources used in experimentation that have their own suite of operations, and there is a general set of operations for future expansion. |
| 537 | |
| 538 | === Computers === |
| 539 | |
| 540 | Computers are the physical computing resources of the testbed. A user may be interested in specific instances of a computer - {{{pc23}}} - or in information about types or classes of computers. Both are possible to view with these calls. |
| 541 | |
| 542 | A user can view computers or classes by: |
| 543 | |
| 544 | * '''Service:''' Resources |
| 545 | * '''Operation:''' viewComputers |
| 546 | * '''Input Parameters:''' |
| 547 | * Userid - the user making the request (the owner on success) |
| 548 | * Owner - an optional string the computer owner |
| 549 | * NameRE - an optional string containing a regular expression matched against the name |
| 550 | * Type - an optional string containing the computer types to look for |
| 551 | * '''Return Values:''' |
| 552 | * Zero or more structures with the following fields: |
| 553 | * Name - a string, the name of this computer, if absent this is a class |
| 554 | * Owner - a string, the owner of the computer or class |
| 555 | * Type - a string containing the type of computer |
| 556 | * Description - a string describing this computer or class |
| 557 | * Allocated - an optional flag indicating whether this computer is allocated. The field is absent all together if this structure describes a class |
| 558 | * AllocatedExperiment - an optional string containing the experiment name if the computer is allocated and the user has the right to read the experiment |
| 559 | * AllocatedProject - an optional string containing the project name in which the experiment is realized if the computer is allocated and the user has the right to read the project |
| 560 | * ProjectDelete - an optional list of project names that can delete this resource |
| 561 | * ProjectModify - an optional list of project names that can modify this resource |
| 562 | * ProjectUse - an optional list of project names that can use this resource |
| 563 | * ProjectRead - an optional list of projects names that can read this resource |
| 564 | |
| 565 | If any of the permission fields are not present, the class permissions apply. If they are present for a specific computer, they specific computer's permissions override the class permissions. |
| 566 | |
| 567 | Administrators can add new computers or classes using |
| 568 | |
| 569 | * '''Service:''' Resources |
| 570 | * '''Operation:''' createComputer |
| 571 | * '''Input Parameters:''' |
| 572 | * Userid - the user making the request (the owner on success) |
| 573 | * Name - an optional string, the name of this computer, if absent this is a class |
| 574 | * Type - a string containing the type of computer |
| 575 | * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used) |
| 576 | * ProjectDelete - an optional list of project names that can delete this resource |
| 577 | * ProjectModify - an optional list of project names that can modify this resource |
| 578 | * ProjectUse - an optional list of project names that can use this resource |
| 579 | * ProjectRead - an optional list of projects names that can read this resource |
| 580 | * '''Return Values:''' |
| 581 | None |
| 582 | |
| 583 | Note that missing fields in a computer creation are generally filled in from the type. Creating a computer or class without any projects that can use it is of questionable value. |
| 584 | |
| 585 | Similarly, they can modify an existing computer using (assuming they are in a project that allows modification of the class or computer): |
| 586 | |
| 587 | * '''Service:''' Resources |
| 588 | * '''Operation:''' modifyComputer |
| 589 | * '''Input Parameters:''' |
| 590 | * Userid - the user making the request |
| 591 | * Name - an optional string, the name of this computer, if absent this is a class |
| 592 | * Type - an optional string containing the type of computer |
| 593 | * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used) |
| 594 | * ProjectDelete - an optional list of project names that can delete this resource |
| 595 | * ProjectModify - an optional list of project names that can modify this resource |
| 596 | * ProjectUse - an optional list of project names that can use this resource |
| 597 | * ProjectRead - an optional list of projects names that can read this resource |
| 598 | * '''Return Values:''' |
| 599 | None |
| 600 | |
| 601 | Values passed in overwrite the current values if the user had modify rights. One of Name or Type must be present. |
| 602 | |
| 603 | Finally an administrator can delete a computer: |
| 604 | |
| 605 | * '''Service:''' Resources |
| 606 | * '''Operation:''' removeComputer |
| 607 | * '''Input Parameters:''' |
| 608 | * Userid - the user making the request |
| 609 | * Name - an optional string, the name of this computer, if absent this is a class |
| 610 | * Type - an optional string, the type of computer. May be omitted for specific computers |
| 611 | * '''Return Values:''' |
| 612 | None |
| 613 | |
| 614 | === Images === |
| 615 | |
| 616 | Images are saved container state - including saved physical container state. These are selected in the experiment definition, but users may need to manipulate them directly. |
| 617 | |
| 618 | To read image information: |
| 619 | |
| 620 | * '''Service:''' Resources |
| 621 | * '''Operation:''' viewImages |
| 622 | * '''Input Parameters:''' |
| 623 | * Userid - the user making the request (the owner on success) |
| 624 | * Owner - an optional string the computer owner |
| 625 | * NameRE - an optional string containing a regular expression matched against the name |
| 626 | * '''Return Values:''' |
| 627 | * Zero or more structures with the following fields: |
| 628 | * Name - a string, the name of this image |
| 629 | * Owner - a string, the owner of the image |
| 630 | * Description - a string describing this image |
| 631 | * ValidIn - a list of container types that can use this image |
| 632 | * ProjectDelete - a list of project names that can delete this resource |
| 633 | * ProjectModify - a list of project names that can modify this resource |
| 634 | * ProjectUse - a list of project names that can use this resource |
| 635 | * ProjectRead - a list of projects names that can read this resource |
| 636 | |
| 637 | Images are created by operations on a container, but users can modify or delete their metadata: |
| 638 | |
| 639 | * '''Service:''' Resources |
| 640 | * '''Operation:''' modifyImage |
| 641 | * '''Input Parameters:''' |
| 642 | * Userid - the user making the request |
| 643 | * Name - a string, the name of this image |
| 644 | * Description - an optional string describing this computer or class |
| 645 | * ValidIn - an optional list of container types that can use this image |
| 646 | * ProjectDelete - an optional list of project names that can delete this resource |
| 647 | * ProjectModify - an optional list of project names that can modify this resource |
| 648 | * ProjectUse - an optional list of project names that can use this resource |
| 649 | * ProjectRead - an optional list of projects names that can read this resource |
| 650 | * '''Return Values:''' |
| 651 | None |
| 652 | |
| 653 | |
| 654 | As with other resources, these values overwrite the existing parameters (except for name which is a selector). |
| 655 | |
| 656 | A user can delete an image: |
| 657 | |
| 658 | * '''Service:''' Resources |
| 659 | * '''Operation:''' removeImage |
| 660 | * '''Input Parameters:''' |
| 661 | * Userid - the user making the request (the owner on success) |
| 662 | * Name - a string, the image to remove |
| 663 | * '''Return Values:''' |
| 664 | None |
| 665 | |
| 666 | |
| 667 | === Pubkey === |
| 668 | |
| 669 | Public/Private keypairs are used several places in the testbed for authentication and access. For example, access to containers that present a computer interface is done using the ssh protocol. These interfaces allow users to manipulate their keys. |
| 670 | |
| 671 | Viewing keys: |
| 672 | |
| 673 | * '''Service:''' Resources |
| 674 | * '''Operation:''' viewKeys |
| 675 | * '''Input Parameters:''' |
| 676 | * Userid - the user making the request |
| 677 | * Owner - an optional string the computer owner |
| 678 | * type - an optional string containing the kind of keys to report |
| 679 | * '''Return Values:''' |
| 680 | * Zero or more structures with the following fields: |
| 681 | * Name - a string, the name of this key |
| 682 | * Owner - a string, the owner of the key |
| 683 | * Description - a string describing this key |
| 684 | * KeyData - an opaque data value - the key data |
| 685 | * ProjectDelete - a list of project names that can delete this resource |
| 686 | * ProjectModify - a list of project names that can modify this resource |
| 687 | * ProjectUse - a list of project names that can use this resource |
| 688 | * ProjectRead - a list of projects names that can read this resource |
| 689 | |
| 690 | |
| 691 | Users can add and delete keys: |
| 692 | |
| 693 | * '''Service:''' Resources |
| 694 | * '''Operation:''' addKey |
| 695 | * '''Input Parameters:''' |
| 696 | * Userid - the user making the request (the owner on success) |
| 697 | * Owner - an optional string the computer owner |
| 698 | * Name - an optional string, the name of this key (system will assign if omitted) |
| 699 | * Description - an optional string describing this key |
| 700 | * KeyData - an opaque data value - the key data |
| 701 | * ProjectDelete - a list of project names that can delete this resource |
| 702 | * ProjectModify - a list of project names that can modify this resource |
| 703 | * ProjectUse - a list of project names that can use this resource |
| 704 | * ProjectRead - a list of projects names that can read this resource |
| 705 | * '''Return Values:''' |
| 706 | * None |
| 707 | |
| 708 | * '''Service:''' Resources |
| 709 | * '''Operation:''' removeKey |
| 710 | * '''Input Parameters:''' |
| 711 | * Userid - the user making the request |
| 712 | * Name - a string, the name of this key |