Remove unused attribute "ssh_authorized_key"
This attribute was used in CoreOS template before. The usage of this attribute has been removed [1][2]. This patch removed it from CLI. [1] https://review.openstack.org/#/c/262628/ [2] https://review.openstack.org/#/c/262926/ Change-Id: I97bbffb8c53bce852fa5f210caafeb0047fe1efb Partial-Bug: #1540134 Partial-Implements: blueprint coreos-k8s-bay
This commit is contained in:
parent
a0b7dfa962
commit
5beb4eb0a2
@ -34,13 +34,6 @@ BAYMODEL1 = {'id': 123,
|
||||
'volume_driver': 'rexray',
|
||||
'dns_nameserver': '8.8.1.1',
|
||||
'docker_volume_size': '71',
|
||||
'ssh_authorized_key': 'ssh-rsa AAAAB3NaC1yc2EAAAADAABAAABAQC'
|
||||
'0XRqg3tm+jlsOKGO81lPDH+KaSJs8qegZHtQw'
|
||||
'3Q7wvmjUqszP/H6NC/m+qiGp/sTitomSofMam'
|
||||
'YucqbeuM7nmJi+8Hb55y1xWoOZItvKJ+n4VKc'
|
||||
'Ma71G5/4EOQxuQ/sgW965OOO2Hq027yHOwzcR'
|
||||
'8vjlQUnTK0HijrbSTLxp/9kazWWraBS0AyXe6'
|
||||
'v0Zio4VeFrfpytB8RtAAA test1234@magnum',
|
||||
'coe': 'swarm',
|
||||
'http_proxy': 'http_proxy',
|
||||
'https_proxy': 'https_proxy',
|
||||
@ -63,13 +56,6 @@ BAYMODEL2 = {'id': 124,
|
||||
'volume_driver': 'cinder',
|
||||
'dns_nameserver': '8.8.1.2',
|
||||
'docker_volume_size': '50',
|
||||
'ssh_authorized_key': 'ssh-rsa AAAAB3NzaC1ycEAAAADAQABAAABAQC'
|
||||
'v0XRqg3tm+jlsOKGO81lPDH+KaSJs8qegZHtQw'
|
||||
'n3Q7wvmjUqszP/H6NC/m+qiGp/sTitomSofMam'
|
||||
'DYucqbeuM7nmJi+8Hb55y1xWoOZItvKJ+n4VKc'
|
||||
'KMa71G5/4EOQxuQ/sgW965OOO2Hq027yHOwzcR'
|
||||
'X8vjlQUnTK0HijrbSTLxp/9kazWWraBS0AyXe6'
|
||||
'Jv0Zio4VeFrfpytB8RtAAA test1234@magnum',
|
||||
'coe': 'kubernetes',
|
||||
'labels': 'key2=val2,key22=val22',
|
||||
'tls_disabled': True,
|
||||
@ -155,8 +141,6 @@ class BayModelManagerTest(testtools.TestCase):
|
||||
self.assertEqual(BAYMODEL1['docker_volume_size'],
|
||||
baymodel.docker_volume_size)
|
||||
self.assertEqual(BAYMODEL1['fixed_network'], baymodel.fixed_network)
|
||||
self.assertEqual(BAYMODEL1['ssh_authorized_key'],
|
||||
baymodel.ssh_authorized_key)
|
||||
self.assertEqual(BAYMODEL1['coe'], baymodel.coe)
|
||||
self.assertEqual(BAYMODEL1['http_proxy'], baymodel.http_proxy)
|
||||
self.assertEqual(BAYMODEL1['https_proxy'], baymodel.https_proxy)
|
||||
@ -180,8 +164,6 @@ class BayModelManagerTest(testtools.TestCase):
|
||||
self.assertEqual(BAYMODEL1['docker_volume_size'],
|
||||
baymodel.docker_volume_size)
|
||||
self.assertEqual(BAYMODEL1['fixed_network'], baymodel.fixed_network)
|
||||
self.assertEqual(BAYMODEL1['ssh_authorized_key'],
|
||||
baymodel.ssh_authorized_key)
|
||||
self.assertEqual(BAYMODEL1['coe'], baymodel.coe)
|
||||
self.assertEqual(BAYMODEL1['http_proxy'], baymodel.http_proxy)
|
||||
self.assertEqual(BAYMODEL1['https_proxy'], baymodel.https_proxy)
|
||||
|
@ -124,18 +124,6 @@ class ShellTest(shell_test_base.TestCommandLineArgument):
|
||||
'--coe swarm')
|
||||
self.assertTrue(mock_create.called)
|
||||
|
||||
@mock.patch('magnumclient.v1.baymodels.BayModelManager.create')
|
||||
def test_baymodel_create_ssh_authorized_key_success(self, mock_create):
|
||||
self._test_arg_success('baymodel-create '
|
||||
'--name test '
|
||||
'--keypair-id test_keypair '
|
||||
'--external-network-id test_net '
|
||||
'--image-id test_image '
|
||||
'--coe swarm '
|
||||
'--ssh-authorized-key test_key '
|
||||
)
|
||||
self.assertTrue(mock_create.called)
|
||||
|
||||
@mock.patch('magnumclient.v1.baymodels.BayModelManager.create')
|
||||
def test_baymodel_create_http_proxy_success(self, mock_create):
|
||||
self._test_arg_success('baymodel-create '
|
||||
|
@ -18,10 +18,9 @@ from magnumclient import exceptions
|
||||
CREATION_ATTRIBUTES = ['name', 'image_id', 'flavor_id', 'master_flavor_id',
|
||||
'keypair_id', 'external_network_id', 'fixed_network',
|
||||
'dns_nameserver', 'docker_volume_size', 'labels',
|
||||
'ssh_authorized_key', 'coe', 'http_proxy',
|
||||
'https_proxy', 'no_proxy', 'network_driver',
|
||||
'tls_disabled', 'public', 'registry_enabled',
|
||||
'volume_driver']
|
||||
'coe', 'http_proxy', 'https_proxy', 'no_proxy',
|
||||
'network_driver', 'tls_disabled', 'public',
|
||||
'registry_enabled', 'volume_driver']
|
||||
|
||||
|
||||
class BayModel(base.Resource):
|
||||
|
@ -56,9 +56,6 @@ def _show_baymodel(baymodel):
|
||||
metavar='<volume-driver>',
|
||||
help='The volume driver name for instantiating container'
|
||||
' volume.')
|
||||
@utils.arg('--ssh-authorized-key',
|
||||
metavar='<ssh-authorized-key>',
|
||||
help='The SSH authorized key to use')
|
||||
@utils.arg('--dns-nameserver',
|
||||
metavar='<dns-nameserver>',
|
||||
default='8.8.8.8',
|
||||
@ -113,7 +110,6 @@ def do_baymodel_create(cs, args):
|
||||
opts['volume_driver'] = args.volume_driver
|
||||
opts['dns_nameserver'] = args.dns_nameserver
|
||||
opts['docker_volume_size'] = args.docker_volume_size
|
||||
opts['ssh_authorized_key'] = args.ssh_authorized_key
|
||||
opts['coe'] = args.coe
|
||||
opts['http_proxy'] = args.http_proxy
|
||||
opts['https_proxy'] = args.https_proxy
|
||||
|
Loading…
Reference in New Issue
Block a user