wiki:GeniGet

Version 2 (modified by Aaron Helsinger, 6 years ago) (diff)

--

geni-get

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.

PG implementation

Usage

+$ geni-get --help
usage: geni-get [-h] [-a] [-c] [-n] [-p PORT] [-v] [command]

positional arguments:
  command

optional arguments:
  -h, --help            show this help message and exit
  -a, --all             dump all information available
  -c, --client-version  display client version
  -n, --no-cache        disable reading cached results
  -p PORT, --port PORT  specify server port
  -v, --version         display server version

Output

manifest

The manifest RSpec for the slice. NB: This does not currently work at ProtoGENI.

control_mac

The MAC address for the control plane interface on this node.

+$ geni-get control_mac
02bed2ecdc92 

client_id

The client_id from the RSpec for this node. This can be used to identify which node this is from your RSpec.

+$ geni-get client_id
bbn-ig-jbs15 

slice_urn

+$ geni-get slice_urn
urn:publicid:IDN+ch.geni.net:JBS+slice+jbs15 

slice_email

The email address of the slice (from the slice certificate).

+$ geni-get slice_email
slice-jbs15@example.com 

user_urn

This is the URN of the user who reserved the node. FIXME: Right?

+$ geni-get user_urn
urn:publicid:IDN+ch.geni.net+user+jbs 

user_email

This is the email address of the user who reserved the node (from the user certificate).

+$ geni-get user_email
jbs@bbn.com 

version

API version? SW Version?

+$ geni-get version
1 

geni_user

+$ geni-get geni_user | python -mjson.tool | sed -e 's/    / /g'
[
 {
  "keys": [
   "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvxWF39ISW4XwXbQ480ZumhPY/t+3hnhS91GxvBU2szCNZa7xvRO56sr7gbZLCD9TvQ+gD3X4W1Iy9pvVNX31EUmT+IKwIu8rwxbGF2Qt1VICw9Y0fbBnhkYSBnNwfwlsQUiGojv7IAyD3fi6gmBNdeKBtmiaJQSJf4iARPwfQE6QaXG8Q3+h9jH5GHW9LnWMpZ8VuStLaNLR0DQ8l/xU+i/1NX0vZHqaxxzbR5OSfQcDOlz+NxVjXa1uz7h3W8E0zVL6ZLn650OhoFAfPWEf+pdjyixHx2bUMMCzjBCTMhxQ2u792f/WD0Nq1bwwbZ93tifta8KiMc7UPJQUm4dw8Q== jbs@gpolab.bbn.com", 
   "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0nK/+rVwI+KMRz5t91eT0AsO+VA+SSkXhtjHO/ReECiOFJOY6qa70OTBTHTBnQtVP2gwzpKDVInqPkqzdoujdV9LrPwxawhZVx3CdSDiKtWbSNvWxdKL2Htnq21vULmAWf7qMhGchvRfGANfLg7mDItH7zLcngPks3FOKP2+xiG4JTGL7z5vF9GaZKi7ujaW0VvXHVxQ6aTbsxo1yx8JlV6IYc3L4PqDprTtpBTFcsh4hgVVahOxRY6dUt+eF6vQcNGEqpBQLf1ndH4z9b+eU9gR7Oe7q01+oTWskLL5VDRIHy9XBx6MV20kufmHd9YXeTQBegDJFDhPWZXa4QowIw== jbs@fenris.infersys.com", 
   "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxRl7mayQ54SDCoQyigPbrgJcwMLbwG47w0aW7bNGHgdjM82emdIi6VXdajI2AK9hJo09UotY1fvCkvCF8bI0zUxF8tvHkTmIAb1pGAsAyjGMly4LR3NhigyB/3GH3scD8YHmDxH5GiCYW+b4dTJ1WbIsksw11w1+bm/jLJfhrvzTkafHJOp3AHu9dwq8COgrlyxEAV2bLnmLOEmpJr6tmX0GNnq0XsISNgcqzvX5UqNa2IFALoro9dlmSkAl+rgZX/QKBI+c3AwoVlVbafT/VRUHbFvcvJGzRX90JEremnB+8UxbPgz1IIfgWgBii4HFyECXb7Yvu3pOTyMsU3DevQ== jbs"
  ], 
  "urn": "urn:publicid:IDN+ch.geni.net+user+jbs"
 }
]

get_version

Returns nothing.

sliverstatus

+$ geni-get sliverstatus
{'geni_urn':'urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15632','geni_status':'ready','geni_resources':[{'geni_urn':'urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15631','geni_status':'ready','geni_error':''}]} 

Bug: This shouldn't use single quotes, that's not legal JSON. Converted to double quotes:

+$ geni-get sliverstatus | sed -e "s/'/\"/g" | python -mjson.tool | sed -e 's/    / /g'
{
 "geni_resources": [
  {
   "geni_error": "", 
   "geni_status": "ready", 
   "geni_urn": "urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15631"
  }
 ], 
 "geni_status": "ready", 
 "geni_urn": "urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15632"
}

--all

+$ geni-get --all
{"client_id":"bbn-ig-jbs15","slice_urn":"urn:publicid:IDN+ch.geni.net:JBS+slice+jbs15","slice_email":"slice-jbs15@example.com","user_urn":"urn:publicid:IDN+ch.geni.net+user+jbs","user_email":"jbs@bbn.com","geni_user":[{"urn":"urn:publicid:IDN+ch.geni.net+user+jbs","keys":["ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvxWF39ISW4XwXbQ480ZumhPY/t+3hnhS91GxvBU2szCNZa7xvRO56sr7gbZLCD9TvQ+gD3X4W1Iy9pvVNX31EUmT+IKwIu8rwxbGF2Qt1VICw9Y0fbBnhkYSBnNwfwlsQUiGojv7IAyD3fi6gmBNdeKBtmiaJQSJf4iARPwfQE6QaXG8Q3+h9jH5GHW9LnWMpZ8VuStLaNLR0DQ8l/xU+i/1NX0vZHqaxxzbR5OSfQcDOlz+NxVjXa1uz7h3W8E0zVL6ZLn650OhoFAfPWEf+pdjyixHx2bUMMCzjBCTMhxQ2u792f/WD0Nq1bwwbZ93tifta8KiMc7UPJQUm4dw8Q== jbs@gpolab.bbn.com","ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0nK/+rVwI+KMRz5t91eT0AsO+VA+SSkXhtjHO/ReECiOFJOY6qa70OTBTHTBnQtVP2gwzpKDVInqPkqzdoujdV9LrPwxawhZVx3CdSDiKtWbSNvWxdKL2Htnq21vULmAWf7qMhGchvRfGANfLg7mDItH7zLcngPks3FOKP2+xiG4JTGL7z5vF9GaZKi7ujaW0VvXHVxQ6aTbsxo1yx8JlV6IYc3L4PqDprTtpBTFcsh4hgVVahOxRY6dUt+eF6vQcNGEqpBQLf1ndH4z9b+eU9gR7Oe7q01+oTWskLL5VDRIHy9XBx6MV20kufmHd9YXeTQBegDJFDhPWZXa4QowIw== jbs@fenris.infersys.com","ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxRl7mayQ54SDCoQyigPbrgJcwMLbwG47w0aW7bNGHgdjM82emdIi6VXdajI2AK9hJo09UotY1fvCkvCF8bI0zUxF8tvHkTmIAb1pGAsAyjGMly4LR3NhigyB/3GH3scD8YHmDxH5GiCYW+b4dTJ1WbIsksw11w1+bm/jLJfhrvzTkafHJOp3AHu9dwq8COgrlyxEAV2bLnmLOEmpJr6tmX0GNnq0XsISNgcqzvX5UqNa2IFALoro9dlmSkAl+rgZX/QKBI+c3AwoVlVbafT/VRUHbFvcvJGzRX90JEremnB+8UxbPgz1IIfgWgBii4HFyECXb7Yvu3pOTyMsU3DevQ== jbs"]}],"control_mac":"02bed2ecdc92","version":"1","getversion":{'code_tag':'9eec998c9be94ed82cf7e21f5b280368d1af0e59','urn':'urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm','url':'https://boss.instageni.gpolab.bbn.com:12369/protogeni/xmlrpc/am','geni_am_type':'protogeni','geni_single_allocation':true,'geni_allocate':'geni_disjoint','geni_credential_types':{'geni_type':'geni_sfa','geni_version':'2','geni_type':'geni_sfa','geni_version':'3'}},"sliverstatus":{'geni_urn':'urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15632','geni_status':'ready','geni_resources':[{'geni_urn':'urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15631','geni_status':'ready','geni_error':''}]}}

Bug: This shouldn't use single quotes, that's not legal JSON. Converted to double quotes:

+$ geni-get --all | sed -e "s/'/\"/g" | python -mjson.tool | sed -e 's/    / /g' 
{
 "client_id": "bbn-ig-jbs15", 
 "control_mac": "02bed2ecdc92", 
 "geni_user": [
  {
   "keys": [
    "ssh-rsa AAAAB3NzaC1yc2EAAAABI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VlVbafT/VRUHbFvcvJGzRX90JEremnB+8UxbPgz1IIfgWgBii4HFyECXb7Yvu3pOTyMsU3DevQ== jbs"
   ], 
   "urn": "urn:publicid:IDN+ch.geni.net+user+jbs"
  }
 ], 
 "getversion": {
  "code_tag": "9eec998c9be94ed82cf7e21f5b280368d1af0e59", 
  "geni_allocate": "geni_disjoint", 
  "geni_am_type": "protogeni", 
  "geni_credential_types": {
   "geni_type": "geni_sfa", 
   "geni_version": "3"
  }, 
  "geni_single_allocation": true, 
  "url": "https://boss.instageni.gpolab.bbn.com:12369/protogeni/xmlrpc/am", 
  "urn": "urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"
 }, 
 "slice_email": "slice-jbs15@example.com", 
 "slice_urn": "urn:publicid:IDN+ch.geni.net:JBS+slice+jbs15", 
 "sliverstatus": {
  "geni_resources": [
   {
    "geni_error": "", 
    "geni_status": "ready", 
    "geni_urn": "urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15631"
   }
  ], 
  "geni_status": "ready", 
  "geni_urn": "urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+15632"
 }, 
 "user_email": "jbs@bbn.com", 
 "user_urn": "urn:publicid:IDN+ch.geni.net+user+jbs", 
 "version": "1"
}