Bug 1004709 - [RFE] Should show domain id when domain show or domain list
Summary: [RFE] Should show domain id when domain show or domain list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: libra bugs
URL:
Whiteboard:
: 1043896 (view as bug list)
Depends On:
Blocks: 1067301
TreeView+ depends on / blocked
 
Reported: 2013-09-05 10:00 UTC by Wei Sun
Modified: 2015-05-15 02:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1067301 (view as bug list)
Environment:
Last Closed: 2014-01-30 00:48:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Wei Sun 2013-09-05 10:00:52 UTC
Description of problem:
Try to create domain/:id/view, domain/:id/edit, domain/:id/admin scope,but could not get domain id via `rhc domain show` or `rhc domain list`,only could get domain id via mongodb.But  user could not login instance to search domain id via mongodb.So should show domain id via `rhc domain show` or `rhc domain list`

Version-Release number of selected component (if applicable):
rhc 1.14.1
devenv_3745

How reproducible:
Always

Steps to Reproduce:
1.rhc domain show
2.rhc domain list
3.Check domain via rest

Actual results:
Could not get domain id .
1.[wsun@dhcp-8-229 ~]$ rhc domain show  -n wsundomain3745
Domain wsundomain3745 (owned by wsun+domain)
-------------------------------------------------------
  Created:            2:40 PM
  Allowed Gear Sizes: small, medium

2.[wsun@dhcp-8-229 ~]$ rhc domain list 
Domain wsundomain3745 (owned by wsun+domain)
-------------------------------------------------------
  Created:            2:40 PM
  Allowed Gear Sizes: small, medium

You have access to 1 domain.

3.[wsun@dhcp-8-229 ~]$ curl -k -H 'Accept: application/xml' -u wsun+domain:change https://ec2-107-22-136-17.compute-1.amazonaws.com/broker/rest/domains/wsundomain3745
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <type>domain</type>
  <data>
    <domain>
      <name>wsundomain3745</name>
      <suffix>dev.rhcloud.com</suffix>
      <creation-time>2013-09-05T06:40:52Z</creation-time>


Expected results:
1.Could get domain id via `rhc domain show` or `rhc domain list`
2.Or could add scope via domain name,like :domain/$domainname/view, domain/$domainname/edit, domain/$domainname/admin

Additional info:

Comment 1 Clayton Coleman 2013-09-06 14:54:59 UTC
Need to figure out a good solution for this.  We don't want to use name in scope, because names can change.

Comment 2 Wei Sun 2013-12-18 05:20:52 UTC
*** Bug 1043896 has been marked as a duplicate of this bug. ***

Comment 3 Liang Xia 2013-12-18 06:28:13 UTC
We can get domain id via REST API now, on devenv_4148.

# curl -k -u lxia https://ec2-54-226-88-9.compute-1.amazonaws.com/broker/rest/domains -d nolinks=true -X GET
Enter host password for user 'lxia':
{"api_version":1.6,"data":[{"allowed_gear_sizes":["small","medium","large"],"creation_time":"2013-12-18T05:21:10Z","id":"52b130c649d56d4711000051","members":[{"explicit_role":null,"from":[{"type":"owner","role":"admin"}],"id":"52b1168b49d56d4711000001","login":"lxia","owner":true,"role":"admin","type":"user"},{"explicit_role":"view","id":"52b1306c49d56d4711000049","login":"lxia","owner":false,"role":"view","type":"user"}],"name":"lxia","suffix":"dev.rhcloud.com"}],"messages":[],"status":"ok","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":"domains","version":"1.6"}

Comment 4 Jordan Liggitt 2013-12-18 14:34:03 UTC
Added in https://github.com/openshift/rhc/pull/526

Comment 5 Wei Sun 2013-12-19 03:04:12 UTC
Verified in devenv_4154 with rhc-1.19.2
Now could show domain id  via `rhc domain show` and `rhc domain list`

Result:

[wsun@dhcp-8-229 test]$ rhc domain show -n wsundev4154
Domain wsundev4154 (owned by wsun)
---------------------------------------------
  Created:            10:57 AM
  ID:                 52b260a8bb50a3796800000c
  Allowed Gear Sizes: small

The domain wsundev4154 exists but has no applications. You can use 'rhc create-app' to create a new application.
[wsun@dhcp-8-229 test]$ rhc domain list
Domain wsundev4154 (owned by wsun)
---------------------------------------------
  Created:            10:57 AM
  ID:                 52b260a8bb50a3796800000c
  Allowed Gear Sizes: small

You have access to 1 domain.


Note You need to log in before you can comment on or make changes to this bug.