def test_limit_success(self):
   args = collect_args().parse_args(['--host','beta.enocloud.com','--auth_url', 'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin', '--password', 'p4st0uch3', '--tenant', 'admin', '--req_count', '2'])
   c = GlanceClientTestSuccess(args.host,
           args.username,
           args.password,
           args.tenant,
           args.auth_url,
           args.region_name)
   check_glance(c,args)
 def test_images_limit_success(self):
   args = collect_args().parse_args(['--host','beta.enocloud.com','--auth_url', 'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin', '--password', 'p4st0uch3', '--tenant', 'admin', '--req_count', '2', '--req_images','Debian GNU/Linux 6.0.4 amd64','turnkey-wordpress-11.3-lucid-x86'])
   c = GlanceClientTestSuccess(args.host,
           args.username,
           args.password,
           args.tenant,
           args.auth_url,
           args.region_name)
   check_glance(c,args)
 def test_connection_success(self):
     args = collect_args().parse_args([
         '--host', 'beta.enocloud.com', '--auth_url',
         'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin',
         '--password', 'p4st0uch3', '--tenant', 'admin'
     ])
     c = GlanceClientTestSuccess(args.host, args.username, args.password,
                                 args.tenant, args.auth_url,
                                 args.region_name)
     check_glance(c, args)
 def test_images_success(self):
     args = collect_args().parse_args([
         '--host', 'beta.enocloud.com', '--auth_url',
         'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin',
         '--password', 'p4st0uch3', '--tenant', 'admin', '--req_images',
         'Debian GNU/Linux 6.0.4 amd64', 'turnkey-wordpress-11.3-lucid-x86'
     ])
     c = GlanceClientTestSuccess(args.host, args.username, args.password,
                                 args.tenant, args.auth_url,
                                 args.region_name)
     check_glance(c, args)
 def test_images_limit_fail(self):
   args = collect_args().parse_args(['--host','beta.enocloud.com','--auth_url', 'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin', '--password', 'p4st0uch3', '--tenant', 'admin', '--req_count', '10','--req_images','Debian GNU/Linux 6.0.4 amd64','turnkey-wordpress-11.3-lucid-x86'])
   c = GlanceClientTestImagesFail(args.host,
           args.username,
           args.password,
           args.tenant,
           args.auth_url,
           args.region_name)
   try:
     check_glance(c,args)
   except SystemExit:
     self.assertTrue("images not found")
 def test_limit_fail(self):
   args = collect_args().parse_args(['--host','beta.enocloud.com','--auth_url', 'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin', '--password', 'p4st0uch3', '--tenant', 'admin', '--req_count', '10'])
   c = GlanceClientTestSuccess(args.host,
           args.username,
           args.password,
           args.tenant,
           args.auth_url,
           args.region_name)
   try:
     check_glance(c,args)
   except SystemExit:
     self.assertTrue("not enough images")
 def test_limit_fail(self):
     args = collect_args().parse_args([
         '--host', 'beta.enocloud.com', '--auth_url',
         'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin',
         '--password', 'p4st0uch3', '--tenant', 'admin', '--req_count', '10'
     ])
     c = GlanceClientTestSuccess(args.host, args.username, args.password,
                                 args.tenant, args.auth_url,
                                 args.region_name)
     try:
         check_glance(c, args)
     except SystemExit:
         self.assertTrue("not enough images")
 def test_images_fail(self):
     args = collect_args().parse_args([
         '--host', 'beta.enocloud.com', '--auth_url',
         'http://beta.enocloud.com:5000/v2.0/', '--username', 'admin',
         '--password', 'p4st0uch3', '--tenant', 'admin', '--req_images',
         'Debian GNU/Linux 6.0.4 amd64', 'turnkey-wordpress-11.3-lucid-x86'
     ])
     c = GlanceClientTestImagesFail(args.host, args.username, args.password,
                                    args.tenant, args.auth_url,
                                    args.region_name)
     try:
         check_glance(c, args)
     except SystemExit:
         self.assertTrue("images not found")