Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def st2kv_(context, key, decrypt=False):
except Exception as e:
raise Exception('Failed to retrieve User object for user "%s" % (username)' % (str(e)))

LOG.debug('ST2KV Decrypt: %s', decrypt)

kvp = kvp_util.get_key(key=key, user_db=user_db, decrypt=decrypt)

if not kvp:
Expand Down
2 changes: 1 addition & 1 deletion contrib/runners/orchestra_runner/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'orchestra = orchestra_runner.orchestra_runner',
],
'orchestra.expressions.functions': [
'st2kv = functions.st2kv:st2kv_',
'st2kv = orchestra_functions.st2kv:st2kv_',
],
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import st2tests.config as tests_config
tests_config.parse_args()

from functions import st2kv
from orchestra_functions import st2kv
from orchestra import exceptions as exc

from st2common.constants import keyvalue as kvp_const
Expand Down
4 changes: 2 additions & 2 deletions st2client/st2client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_client(self, args, debug=False):

return client

def _get_config_file_options(self, args, validate_config_permissions=True):
def _get_config_file_options(self, args, validate_config_permissions=False):
"""
Parse the config and return kwargs which can be passed to the Client
constructor.
Expand All @@ -168,7 +168,7 @@ def _get_config_file_options(self, args, validate_config_permissions=True):

return result

def _parse_config_file(self, args, validate_config_permissions=True):
def _parse_config_file(self, args, validate_config_permissions=False):
config_file_path = self._get_config_file_path(args=args)

parser = CLIConfigParser(config_file_path=config_file_path,
Expand Down
2 changes: 1 addition & 1 deletion st2client/st2client/commands/keyvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def run(self, args, **kwargs):


class KeyValuePairSetCommand(resource.ResourceCommand):
display_attributes = ['name', 'value', 'expire_timestamp']
display_attributes = ['name', 'value', 'scope', 'expire_timestamp']

def __init__(self, resource, *args, **kwargs):
super(KeyValuePairSetCommand, self).__init__(
Expand Down
1 change: 1 addition & 0 deletions st2client/tests/unit/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def _write_mock_package_metadata_file(self):

return package_metadata_path

@unittest2.skipIf(True, 'skipping until checks are re-enabled')
@mock.patch.object(
requests, 'get',
mock.MagicMock(return_value=base.FakeResponse("{}", 200, 'OK')))
Expand Down
5 changes: 3 additions & 2 deletions st2common/st2common/util/keyvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import
import six
import logging
Expand Down Expand Up @@ -99,7 +98,9 @@ def get_key(key=None, user_db=None, scope=None, decrypt=False):
scope, key_id = _derive_scope_and_key(key=key, user=user_db.name, scope=scope)
scope = get_datastore_full_scope(scope)

LOG.debug('get_key scope: %s', scope)
LOG.debug('get_key key_id: %s, scope: %s, user: %s, decrypt: %s' % (key_id, scope,
str(user_db.name),
decrypt))

_validate_scope(scope=scope)

Expand Down