Skip to content

Commit 4b49a7d

Browse files
committed
Release 17.0.6
1 parent ad5246d commit 4b49a7d

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

keepercommander/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
1111
#
1212

13-
__version__ = '17.0.5'
13+
__version__ = '17.0.6'

keepercommander/commands/discoveryrotation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ class PAMCreateRecordRotationCommand(Command):
273273
'5:56PM UTC enter following cron -sc "56 17 * * *"')
274274
schedule_group.add_argument('--on-demand', '-od', required=False, dest='on_demand',
275275
action='store_true', help='Schedule On Demand')
276+
schedule_group.add_argument('--schedule-config', '-sf', required=False, dest='schedule_config',
277+
action='store_true', help='Schedule from Configuration')
276278
parser.add_argument('--complexity', '-x', required=False, dest='pwd_complexity', action='store',
277279
help='Password complexity: length, upper, lower, digits, symbols. Ex. 32,5,5,5,5')
278280
parser.add_argument('--admin-user', '-a', required=False, dest='admin', action='store',
@@ -377,6 +379,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
377379
schedule_json_data = kwargs.get('schedule_json_data')
378380
schedule_cron_data = kwargs.get('schedule_cron_data') # See this page for more details: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#examples
379381
schedule_on_demand = kwargs.get('on_demand') is True
382+
schedule_config = kwargs.get('schedule_config') is True
380383
schedule_data = None # type: Optional[List]
381384
if isinstance(schedule_json_data, list):
382385
schedule_data = [json.loads(x) for x in schedule_json_data]
@@ -500,7 +503,7 @@ def config_iam_aad_user(_dag, target_record, target_iam_aad_config_uid):
500503
# 2. Schedule
501504
record_schedule_data = schedule_data
502505
if record_schedule_data is None:
503-
if current_record_rotation:
506+
if current_record_rotation and not schedule_config:
504507
try:
505508
current_schedule = current_record_rotation.get('schedule')
506509
if current_schedule:

keepercommander/commands/discoveryrotation_v1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class PAMCreateRecordRotationCommand(Command):
149149
schedule_group.add_argument('--schedulejson', '-sj', required=False, dest='schedule_json_data', action='append', help='Json of the scheduler. Example: -sj \'{"type": "WEEKLY", "utcTime": "15:44", "weekday": "SUNDAY", "intervalCount": 1}\'')
150150
schedule_group.add_argument('--schedulecron', '-sc', required=False, dest='schedule_cron_data', action='append', help='Cron tab string of the scheduler. Example: to run job daily at 5:56PM UTC enter following cron -sc "56 17 * * *"')
151151
schedule_group.add_argument('--on-demand', '-sm', required=False, dest='on_demand', action='store_true', help='Schedule On Demand')
152+
schedule_group.add_argument('--schedule-config', '-sf', required=False, dest='schedule_config', action='store_true', help='Schedule from Configuration')
152153
parser.add_argument('--complexity', '-x', required=False, dest='pwd_complexity', action='store', help='Password complexity: length, upper, lower, digits, symbols. Ex. 32,5,5,5,5')
153154
state_group = parser.add_mutually_exclusive_group()
154155
state_group.add_argument('--enable', dest='enable', action='store_true', help='Enable rotation')
@@ -245,6 +246,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
245246
schedule_json_data = kwargs.get('schedule_json_data')
246247
schedule_cron_data = kwargs.get('schedule_cron_data') # See this page for more details: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#examples
247248
schedule_on_demand = kwargs.get('on_demand') is True
249+
schedule_config = kwargs.get('schedule_config') is True
248250
schedule_data = None # type: Optional[List]
249251
if isinstance(schedule_json_data, list):
250252
schedule_data = [json.loads(x) for x in schedule_json_data]
@@ -320,7 +322,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
320322
# 2. Schedule
321323
record_schedule_data = schedule_data
322324
if record_schedule_data is None:
323-
if current_record_rotation:
325+
if current_record_rotation and not schedule_config:
324326
try:
325327
current_schedule = current_record_rotation.get('schedule')
326328
if current_schedule:

keepercommander/commands/record.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,15 @@ def execute(self, params, **kwargs):
17791779
continue
17801780
records.append(r)
17811781

1782+
if len(records) > 1:
1783+
try:
1784+
pattern = re.compile(record_name, re.IGNORECASE).search
1785+
exact_title = [x for x in records if pattern(x.title)]
1786+
if len(exact_title) == 1:
1787+
records = exact_title
1788+
except:
1789+
pass
1790+
17821791
if len(records) == 1:
17831792
if kwargs['output'] == 'clipboard':
17841793
logging.info('Record Title: %s', records[0].title)

0 commit comments

Comments
 (0)