Ask Your Question

Dhana's profile - activity

2016-12-07 15:49:27 -0500 received badge  Popular Question (source)
2016-07-05 10:27:57 -0500 received badge  Famous Question (source)
2016-04-13 22:19:11 -0500 received badge  Famous Question (source)
2015-05-22 23:31:22 -0500 received badge  Nice Answer (source)
2015-03-21 04:33:50 -0500 received badge  Famous Question (source)
2015-03-10 23:09:46 -0500 received badge  Popular Question (source)
2015-03-10 23:09:46 -0500 received badge  Notable Question (source)
2014-10-23 13:50:36 -0500 received badge  Famous Question (source)
2014-10-20 02:02:51 -0500 received badge  Famous Question (source)
2014-10-07 00:10:12 -0500 received badge  Taxonomist
2014-09-24 07:17:29 -0500 received badge  Notable Question (source)
2014-07-29 08:54:24 -0500 received badge  Notable Question (source)
2014-07-29 08:54:24 -0500 received badge  Popular Question (source)
2014-06-13 01:46:43 -0500 received badge  Self-Learner (source)
2014-06-13 01:46:43 -0500 received badge  Teacher (source)
2014-06-09 10:01:23 -0500 commented question post creation script when launching server through novaclient python bindings?

Hi, I have the same problem too. All I need is to run some script like 'echo'ssss'>/root/ttt.tt' on creation of an instance. Can you please give me appropriate Python code.

2014-06-09 10:01:10 -0500 commented answer post creation script when launching server through novaclient python bindings?

Hi, I have the same problem too. All I need is to run some script like 'echo'ssss'>/root/ttt.tt' on creation of an instance. Can you please give me appropriate Python code.

2014-06-09 06:43:51 -0500 received badge  Notable Question (source)
2014-06-09 03:42:04 -0500 answered a question How to create Swift Connection using python API on HP Cloud

Hi, I figured out the problem. It is just adding the version attribute. Change the method as follows:-

def get_swift_creds():
    return {'user': os.environ['OS_USERNAME'], 'key': os.environ['OS_PASSWORD'],
            'authurl': os.environ['OS_AUTH_URL'],
            'tenant_name': os.environ['OS_TENANT_NAME'],
            'auth_version': '2.0'
           }
2014-06-09 00:01:02 -0500 received badge  Enthusiast
2014-06-07 09:00:47 -0500 received badge  Popular Question (source)
2014-06-06 17:34:19 -0500 received badge  Student (source)
2014-06-04 02:32:05 -0500 answered a question Nova Connection Issue through Python API.

HI, I figured out hte problem. I changed the get_nova_creds as follows:-

def get_nova_creds():
    return {'username': os.environ['OS_USERNAME'], 'api_key': os.environ['OS_PASSWORD'],
         'auth_url': os.environ['OS_AUTH_URL'], 'project_id': os.environ['OS_TENANT_NAME']}

The correpsonding values are:-

OS_USERNAME=#username #
OS_PASSWORD=#password>#
OS_TENANT_NAME=#same as project name# OS_AUTH_URL=https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/

Basically the problem is that port 35357 is disabled. This resulted in a 0 response.

Thanks guys. Happy programming!

2014-06-04 02:24:14 -0500 asked a question How to create Swift Connection using python API on HP Cloud

Hi, I am working with HP Openstack. I am trying to get create a Swift Connection and then add a container. How can I do that through Python API.

I wrote the following code which ends up saying :-

swiftclient.exceptions.ClientException:
Auth GET failed:
https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ 405 Method Not Allowed

Code:-

__author__ = 'Dhana'

import swiftclient.client as swift_client
import os


def get_swift_creds():
    return {'user': os.environ['OS_USERNAME'], 'key': os.environ['OS_PASSWORD'],
            'authurl': os.environ['OS_AUTH_URL'], 'tenant_name': os.environ['OS_TENANT_NAME']}

if __name__ == '__main__':
    creds = get_swift_creds()
    conn = swift_client.Connection(**creds)
    conn.post_container('MyContainer', None)
    print 'Container success!'
    conn.close()
2014-06-04 02:19:34 -0500 asked a question Nova Connection Issue through Python API.

Hi, I am using HP Nova Python API to make a connection. However I am not able to create one. I get a 400 error.My code is as follows. Please let me know what is wrong with the code below. Also tell me if I need to add auth_token here. I tried to get my auth_token still I am not able to get it. I tried the following command:-

$ curl -i 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"auth": {"tenantName": "314123431241324123", "passwordCredentials": {"username": "XXXXXXX", "password": "XXXXXXXX"}}}'

import novaclient.v1_1.client as nvclient


def get_nova_creds():
    return {'username': 'XXXXXXXXXXXXXXXXX', # Same as horizon login
               'api_key': '***********************', # Same as  horizon password
               'auth_url': 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v3/auth/tokens', # For US West
               'project_id': 'kony-openstack-poc-10925891839020' # project name I got from Horizon
              }

if __name__ == '__main__':
    try:
        creds = get_nova_creds()
        nova = nvclient.Client(**creds)

        f1 = nova.flavors.find(ram=2048)
        nova.servers.create("my-server", flavor=f1)
    except BaseException as b:
        print 'exception is ', b
2014-06-03 01:45:05 -0500 received badge  Popular Question (source)
2014-05-26 06:10:29 -0500 received badge  Notable Question (source)
2014-05-26 03:07:36 -0500 asked a question yum command equivalent for Swift Installation.

Hi, I am following the site:- http://www.server-world.info/en/ for Openstack Ubuntu 14.04 installation. There are no specific steps for Swift Installation. So I referred the CentOS section here:- http://www.server-world.info/en/note?os=CentOS_6&p=openstack_havana&f=18 (http://www.server-world.info/en/note?...) . The command for installing Swift-Proxy is as follows:- yum --enablerepo=openstack-havana,epel -y install openstack-swift-proxy memcached openssh-clients .

Is there an equivalent apt-get command for this. I am finding trouble with this command. I installed yum on Ubuntu but the command is giving the following errors:-

Error: Package: 1:python-oslo-config-1.2.1-1.el6.noarch (openstack-havana) Requires: python-setuptools Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-keyring Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-netaddr Error: Package: openstack-swift-proxy-1.10.0-2.el6.noarch (openstack-havana) Requires: openstack-swift-plugin-swift3 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: /bin/sh Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-configobj Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-argparse Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: /usr/bin/python Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-setuptools Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-netifaces Error: Package: 1:python-oslo-config-1.2.1-1.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: initscripts Error: Package: python-swiftclient-2.0.2-1.el6.noarch (openstack-havana) Requires: python-requests Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: chkconfig Error: Package: python-swiftclient-2.0.2-1.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-simplejson Error: Package: openstack-swift-proxy-1.10.0-2.el6.noarch (openstack-havana) Requires: /bin/sh Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: /usr/bin/python Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: shadow-utils Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-eventlet >= 0.9.15 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-setuptools Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-requests >= 0.8.8 Error: Package: python-iso8601-0.1.8-1.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-greenlet >= 0.3.1 Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-babel Error: Package: openstack-swift-proxy-1.10.0-2.el6.noarch (openstack-havana) Requires: /usr/bin/python Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: pyxattr Error: Package: openstack-swift-1.10.0-2.el6.noarch (openstack-havana) Requires: python-paste-deploy1.5 Error: Package: python-six-1.5.2-1.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 Error: Package: 1:python-oslo-config-1.2.1-1.el6.noarch (openstack-havana) Requires: python-argparse Error: Package: 1:python-keystoneclient-0.7.1-2.el6.noarch (openstack-havana) Requires: python-prettytable Error: Package: python-swiftclient-2.0.2-1.el6.noarch (openstack-havana) Requires: /usr/bin/python Error: Package: openstack-swift-proxy-1.10.0-2.el6.noarch (openstack-havana) Requires: python(abi) = 2.6 You could ... (more)

2014-05-20 00:55:50 -0500 received badge  Popular Question (source)
2014-05-19 06:05:22 -0500 asked a question How to install/deploy swift in Openstack

Hi, Can some one tell me how to install Swift in Openstack. I want to play with Swift client commands and see the way how they work. The whole point is I want to replace AWS S3 with this. I installed Horizon on my Linux system. However I am not sure what else should I do to make Swift work?

2014-05-19 05:58:37 -0500 commented question adding images in essex

@unmesh-gurjar I am a openstack beginner. I found tutorial on essex and started with that. Probably I should have started with Havana.Thanks for your suggestions.

2014-05-13 13:45:55 -0500 asked a question adding images in essex

Hi, I am trying to add images in the essex horizon(dashboard) under the Images and Snapshots link. I dont see any 'Add Images' button. How can I do that?

2014-05-13 13:21:43 -0500 received badge  Editor (source)
2014-05-13 13:19:55 -0500 asked a question S3 alternative in Openstack, API methods

Hi All, I want to implement S3(Amazon aws) implementation using Openstack. Can you please tell me where can I get the Python API for that. I know its SWIFT(Object Storage). However I am not sure how to implement this functionlity through Openstack. I want to store a file on SWIFT through Python code.