Changes between Version 3 and Version 4 of GeniGet


Ignore:
Timestamp:
11/08/13 10:52:03 (10 years ago)
Author:
Aaron Helsinger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GeniGet

    v3 v4  
    11= geni-get =
    22
    3 A command that runs on (from inside) a GENI node and tells you GENI meta-information about the slivers and slices and experimenter associated with the node. This is a separate tool that must be installed in your disk image.
     3A command that runs on (from inside) a GENI node and tells you GENI meta-information about the slivers and slices and experimenter associated with the node. This is a separate tool that must be installed in your disk image. All GENI compute resource providers should make available a version of this client script that can be installed on their compute resources such that the below functionality works.
    44
    55= PG implementation =
     
    99 * https://www.emulab.net/downloads/geni-get-1.0-1.fc15.noarch.rpm
    1010
     11== Known Issues ==
     12 - Slice email for GPO SA slices is incorrect
     13
    1114= Usage =
    1215
    13 {{{
    14 +$ geni-get --help
    15 usage: geni-get [-h] [-a] [-c] [-n] [-p PORT] [-v] [command]
    16 
    17 positional arguments:
    18   command
    19 
    20 optional arguments:
    21   -h, --help            show this help message and exit
    22   -a, --all             dump all information available
    23   -c, --client-version  display client version
    24   -n, --no-cache        disable reading cached results
    25   -p PORT, --port PORT  specify server port
    26   -v, --version         display server version
     16The client script shall support the options as described below.
     17Notes
     18 - 'client version' refers to the version of the geni-get script.
     19 - 'no-cache' means the script should re-query the server for the latest information
     20 - 'version' refers to the version of the server side of this system
     21
     22{{{
     23$ geni-get --help
     24Usage:
     25    ./geni-get [options] [command]
     26
     27Options:
     28    -a, --all             dump all information available
     29    -c, --client-version  display client version
     30    -h, --help            show this message
     31    -n, --no-cache        disable reading cached results
     32    -p, --port            specify server port
     33    -v, --version         display server version
     34
     35Try "./geni-get commands" for a list of supported commands.
     36
    2737}}}
    2838
    2939= Output =
    3040
     41== commands ==
     42This gives a list of all commands that you can issue at this server - kinds of information you can get. The return is a JSON list. Each of the commands listed below should be supported, but additional commands are allowed.
     43
     44Example:
     45{{{
     46$ ./geni-get commands
     47{
     48 "client_id":    "Return the client-specified sliver ID",
     49 "commands":     "Show all available commands",
     50 "control_mac":  "Show the MAC address of the control interface",
     51 "geni_user":    "Show user accounts and public keys",
     52 "getversion":   "Report the AM version",
     53 "manifest":     "Show the sliver manifest",
     54 "slice_email":  "Retrieve the e-mail address from the slice certificate",
     55 "slice_urn":    "Show the URN of the slice",
     56 "sliverstatus": "Give the current status of the sliver (AM API v2)",
     57 "status":       "Give the current status of the sliver (AM API v3)",
     58 "user_email":   "Show the e-mail address of the sliver creator",
     59 "user_urn":     "Show the URN of the sliver creator"
     60}
     61}}}
     62
     63== client_id ==
     64
     65The `client_id` from the RSpec for this node. This can be used to identify which node this is from your RSpec.
     66
     67{{{
     68$ geni-get client_id
     69bbn-ig-jbs15
     70}}}
     71
     72== control_mac ==
     73
     74The MAC address for the control plane interface on this node.
     75
     76{{{
     77$ geni-get control_mac
     7802bed2ecdc92
     79}}}
     80
     81== geni_user ==
     82
     83Return the users and SSH keys installed on this node. Return is in the format of the geni_user argument to the AM API: http://groups.geni.net/geni/wiki/GAPI_AM_API_V3/CommonConcepts#geni_users
     84
     85'''FIXME: Includes updates from later `poa` actions?'''
     86
     87{{{
     88$ ./geni-get geni_user
     89[{"urn":"urn:publicid:IDN+ch.geni.net+user+ahelsing","keys":["ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"]},{"urn":"urn:publicid:IDN+ch.geni.net+user+sedwards","keys":["ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"]},{"urn":"urn:publicid:IDN+ch.geni.net+user+tmitchel","keys":["ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2","ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"]}]
     90}}}
     91
     92Or in prettier layout:
     93{{{
     94$ ./geni-get geni_user | python -mjson.tool | sed -e's/  / /g'
     95[
     96  {
     97    "keys": [
     98      "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"
     99    ],
     100    "urn": "urn:publicid:IDN+ch.geni.net+user+ahelsing"
     101  },
     102  {
     103    "keys": [
     104      "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"
     105    ],
     106    "urn": "urn:publicid:IDN+ch.geni.net+user+sedwards"
     107  },
     108  {
     109    "keys": [
     110      "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2",
     111      "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwhxWkZuS20ow0MnVeSiiRar55Qgy1GA74HIxgiMSPiqQEL3fjufyO/g6FK7R659oNQRbvLlrN5zpaDQ4MBk/JLTt6NO+9IUsB6HlI2P5q8bVyRpUf6E3SJh2iZWQCLDheyBk1+SjJsmH8ovjrWpfZuABIHYaH2gc3hy0igXiaYeYAF8jH8G+cmDcjd2+lQDwi7PhyOxM5Ai4u+kw16su1HFXBNkDZ0e7+YtPVElDC4TCBmt0O98gPVjcIsD1pDgSbdsTZe6zqLBgujrPQhC72eADtoi3WCMiyo+GPEPeYRrZo4H9vSt2pdIg9E73wJPgCu/LcAql2FJh/glsIqpIhw== ahelsing@hotcocoa2"
     112    ],
     113    "urn": "urn:publicid:IDN+ch.geni.net+user+tmitchel"
     114  }
     115]
     116}}}
     117
    31118== manifest ==
    32119
    33 The manifest RSpec for the slice.
    34 '''NB''': This does not currently work at ProtoGENI.
    35 
    36 == control_mac ==
    37 
    38 The MAC address for the control plane interface on this node.
    39 
    40 {{{
    41 +$ geni-get control_mac
    42 02bed2ecdc92
    43 }}}
    44 
    45 == client_id ==
    46 
    47 The `client_id` from the RSpec for this node. This can be used to identify which node this is from your RSpec.
    48 
    49 {{{
    50 +$ geni-get client_id
    51 bbn-ig-jbs15
     120The manifest RSpec for the slice, in standard GENI Rpec XML format.
     121
     122'''FIXME: For only this node? For only this AM?'''
     123
     124Example:
     125{{{
     126$ ./geni-get manifest
     127<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/manifest.xsd" type="manifest">
     128  <node client_id="request1" exclusive="false" component_id="urn:publicid:IDN+emulab.net+node+pc480" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" sliver_id="urn:publicid:IDN+emulab.net+sliver+158594">
     129    <sliver_type name="emulab-openvz"/>
     130  <rs:vnode xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1" name="pcvm480-3"/><host name="request1.ahtest.ch-geni-net.emulab.net"/><services><login authentication="ssh-keys" hostname="pc480.emulab.net" port="36410" username="ahelsing"/><login authentication="ssh-keys" hostname="pc480.emulab.net" port="36410" username="tmitchel"/><login authentication="ssh-keys" hostname="pc480.emulab.net" port="36410" username="sedwards"/></services></node>
     131</rspec>
    52132}}}
    53133
     
    91171+$ geni-get version
    921721
    93 }}}
    94 
    95 == geni_user ==
    96 
    97 {{{
    98 +$ geni-get geni_user | python -mjson.tool | sed -e 's/    / /g'
    99 [
    100  {
    101   "keys": [
    102    "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvxWF39ISW4XwXbQ480ZumhPY/t+3hnhS91GxvBU2szCNZa7xvRO56sr7gbZLCD9TvQ+gD3X4W1Iy9pvVNX31EUmT+IKwIu8rwxbGF2Qt1VICw9Y0fbBnhkYSBnNwfwlsQUiGojv7IAyD3fi6gmBNdeKBtmiaJQSJf4iARPwfQE6QaXG8Q3+h9jH5GHW9LnWMpZ8VuStLaNLR0DQ8l/xU+i/1NX0vZHqaxxzbR5OSfQcDOlz+NxVjXa1uz7h3W8E0zVL6ZLn650OhoFAfPWEf+pdjyixHx2bUMMCzjBCTMhxQ2u792f/WD0Nq1bwwbZ93tifta8KiMc7UPJQUm4dw8Q== jbs@gpolab.bbn.com",
    103    "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0nK/+rVwI+KMRz5t91eT0AsO+VA+SSkXhtjHO/ReECiOFJOY6qa70OTBTHTBnQtVP2gwzpKDVInqPkqzdoujdV9LrPwxawhZVx3CdSDiKtWbSNvWxdKL2Htnq21vULmAWf7qMhGchvRfGANfLg7mDItH7zLcngPks3FOKP2+xiG4JTGL7z5vF9GaZKi7ujaW0VvXHVxQ6aTbsxo1yx8JlV6IYc3L4PqDprTtpBTFcsh4hgVVahOxRY6dUt+eF6vQcNGEqpBQLf1ndH4z9b+eU9gR7Oe7q01+oTWskLL5VDRIHy9XBx6MV20kufmHd9YXeTQBegDJFDhPWZXa4QowIw== jbs@fenris.infersys.com",
    104    "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxRl7mayQ54SDCoQyigPbrgJcwMLbwG47w0aW7bNGHgdjM82emdIi6VXdajI2AK9hJo09UotY1fvCkvCF8bI0zUxF8tvHkTmIAb1pGAsAyjGMly4LR3NhigyB/3GH3scD8YHmDxH5GiCYW+b4dTJ1WbIsksw11w1+bm/jLJfhrvzTkafHJOp3AHu9dwq8COgrlyxEAV2bLnmLOEmpJr6tmX0GNnq0XsISNgcqzvX5UqNa2IFALoro9dlmSkAl+rgZX/QKBI+c3AwoVlVbafT/VRUHbFvcvJGzRX90JEremnB+8UxbPgz1IIfgWgBii4HFyECXb7Yvu3pOTyMsU3DevQ== jbs"
    105   ],
    106   "urn": "urn:publicid:IDN+ch.geni.net+user+jbs"
    107  }
    108 ]
    109173}}}
    110174
     
    206270
    207271}}}
    208