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
10 changes: 9 additions & 1 deletion bin/cyhy-domainsync
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Usage:
Options:
-f FILE --config-file=FILE Configuration file to use.
-h --help Show this screen.
-n --no-owned Skip resolved IP addresses that are owned by a
CyHy entity other than the default owner.
-o OWNER --default-owner=OWNER Default owner to use for new HostDocs [default: CYHY].
-r IP --resolver=IP IP address of DNS resolver to use.
-s SECTION --section=SECTION Configuration section to use.
Expand Down Expand Up @@ -84,7 +86,7 @@ def close_tickets(db, ip, hostname, reason):
return result["nModified"]

def main():
args = docopt(__doc__, version="v1.0.3")
args = docopt(__doc__, version="v1.0.4")

# Dictionary to track certain DNS exceptions encountered during processing
dns_exceptions = {
Expand Down Expand Up @@ -173,6 +175,12 @@ def main():
print("Created HostDoc owned by: " + default_owner)
continue
else:
# If the --no-owned option is set and a HostDoc exists
# that is owned by a non-default CyHy entity, skip this
# IP address
if args["--no-owned"] and host_doc["owner"] != default_owner:
print("Skipping IP; --no-owned option enabled and found HostDoc owned by " + host_doc["owner"])
continue
print("Found HostDoc owned by: " + host_doc["owner"])

# The HostDoc did exist, so add the request ID and domain to the list of owners
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="cyhy-core",
version="1.1.12",
version="1.1.13",
author="Mark Feldhousen Jr.",
author_email="mark.feldhousen@cisa.dhs.gov",
packages=find_packages(),
Expand Down