Skip to content

Commit 9e1bc2a

Browse files
authored
Merge pull request #285 from clenk/master
Fix imports in bindings for cybox core
2 parents ca997b8 + a0cc455 commit 9e1bc2a

File tree

1 file changed

+91
-90
lines changed

1 file changed

+91
-90
lines changed

cybox/bindings/cybox_core.py

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,100 @@
11
# Copyright (c) 2015, The MITRE Corporation. All rights reserved.
22
# See LICENSE.txt for complete terms.
33

4+
from __future__ import absolute_import
45
import sys
56

67
from mixbox.binding_utils import *
78
from . import cybox_common
89

910
#Object Imports
10-
from cybox.bindings.account_object import AccountObjectType
11-
from cybox.bindings.address_object import AddressObjectType
12-
from cybox.bindings.api_object import APIObjectType
13-
from cybox.bindings.archive_file_object import ArchiveFileObjectType
14-
from cybox.bindings.arp_cache_object import ARPCacheObjectType
15-
from cybox.bindings.artifact_object import ArtifactObjectType
16-
from cybox.bindings.as_object import ASObjectType
17-
from cybox.bindings.code_object import CodeObjectType
18-
from cybox.bindings.custom_object import CustomObjectType
19-
from cybox.bindings.device_object import DeviceObjectType
20-
from cybox.bindings.disk_object import DiskObjectType
21-
from cybox.bindings.disk_partition_object import DiskPartitionObjectType
22-
from cybox.bindings.dns_cache_object import DNSCacheObjectType
23-
from cybox.bindings.dns_query_object import DNSQueryObjectType
24-
from cybox.bindings.dns_record_object import DNSRecordObjectType
25-
from cybox.bindings.domain_name_object import DomainNameObjectType
26-
from cybox.bindings.email_message_object import EmailMessageObjectType
27-
from cybox.bindings.file_object import FileObjectType
28-
from cybox.bindings.gui_dialogbox_object import GUIDialogboxObjectType
29-
from cybox.bindings.gui_object import GUIObjectType
30-
from cybox.bindings.gui_window_object import GUIWindowObjectType
31-
from cybox.bindings.hostname_object import HostnameObjectType
32-
from cybox.bindings.http_session_object import HTTPSessionObjectType
33-
from cybox.bindings.image_file_object import ImageFileObjectType
34-
from cybox.bindings.library_object import LibraryObjectType
35-
from cybox.bindings.link_object import LinkObjectType
36-
from cybox.bindings.linux_package_object import LinuxPackageObjectType
37-
from cybox.bindings.memory_object import MemoryObjectType
38-
from cybox.bindings.mutex_object import MutexObjectType
39-
from cybox.bindings.network_connection_object import NetworkConnectionObjectType
40-
from cybox.bindings.network_flow_object import NetworkFlowObjectType
41-
from cybox.bindings.network_packet_object import NetworkPacketObjectType
42-
from cybox.bindings.network_route_entry_object import NetworkRouteEntryObjectType
43-
from cybox.bindings.network_route_object import NetRouteObjectType
44-
from cybox.bindings.network_socket_object import NetworkSocketObjectType
45-
from cybox.bindings.network_subnet_object import NetworkSubnetObjectType
46-
from cybox.bindings.pdf_file_object import PDFFileObjectType
47-
from cybox.bindings.pipe_object import PipeObjectType
48-
from cybox.bindings.port_object import PortObjectType
49-
from cybox.bindings.product_object import ProductObjectType
50-
from cybox.bindings.process_object import ProcessObjectType
51-
from cybox.bindings.semaphore_object import SemaphoreObjectType
52-
from cybox.bindings.sms_message_object import SMSMessageObjectType
53-
from cybox.bindings.socket_address_object import SocketAddressObjectType
54-
from cybox.bindings.system_object import SystemObjectType
55-
from cybox.bindings.unix_file_object import UnixFileObjectType
56-
from cybox.bindings.unix_network_route_entry_object import UnixNetworkRouteEntryObjectType
57-
from cybox.bindings.unix_pipe_object import UnixPipeObjectType
58-
from cybox.bindings.unix_process_object import UnixProcessObjectType
59-
from cybox.bindings.unix_user_account_object import UnixUserAccountObjectType
60-
from cybox.bindings.unix_volume_object import UnixVolumeObjectType
61-
from cybox.bindings.uri_object import URIObjectType
62-
from cybox.bindings.url_history_object import URLHistoryObjectType
63-
from cybox.bindings.user_account_object import UserAccountObjectType
64-
from cybox.bindings.volume_object import VolumeObjectType
65-
from cybox.bindings.whois_object import WhoisObjectType
66-
from cybox.bindings.win_computer_account_object import WindowsComputerAccountObjectType
67-
from cybox.bindings.win_critical_section_object import WindowsCriticalSectionObjectType
68-
from cybox.bindings.win_driver_object import WindowsDriverObjectType
69-
from cybox.bindings.win_event_log_object import WindowsEventLogObjectType
70-
from cybox.bindings.win_event_object import WindowsEventObjectType
71-
from cybox.bindings.win_executable_file_object import WindowsExecutableFileObjectType
72-
from cybox.bindings.win_file_object import WindowsFileObjectType
73-
from cybox.bindings.win_filemapping_object import WindowsFilemappingObjectType
74-
from cybox.bindings.win_handle_object import WindowsHandleObjectType
75-
from cybox.bindings.win_hook_object import WindowsHookObjectType
76-
from cybox.bindings.win_kernel_hook_object import WindowsKernelHookObjectType
77-
from cybox.bindings.win_kernel_object import WindowsKernelObjectType
78-
from cybox.bindings.win_mailslot_object import WindowsMailslotObjectType
79-
from cybox.bindings.win_memory_page_region_object import WindowsMemoryPageRegionObjectType
80-
from cybox.bindings.win_mutex_object import WindowsMutexObjectType
81-
from cybox.bindings.win_network_route_entry_object import WindowsNetworkRouteEntryObjectType
82-
from cybox.bindings.win_network_share_object import WindowsNetworkShareObjectType
83-
from cybox.bindings.win_pipe_object import WindowsPipeObjectType
84-
from cybox.bindings.win_prefetch_object import WindowsPrefetchObjectType
85-
from cybox.bindings.win_process_object import WindowsProcessObjectType
86-
from cybox.bindings.win_registry_key_object import WindowsRegistryKeyObjectType
87-
from cybox.bindings.win_semaphore_object import WindowsSemaphoreObjectType
88-
from cybox.bindings.win_service_object import WindowsServiceObjectType
89-
from cybox.bindings.win_system_object import WindowsSystemObjectType
90-
from cybox.bindings.win_system_restore_object import WindowsSystemRestoreObjectType
91-
from cybox.bindings.win_task_object import WindowsTaskObjectType
92-
from cybox.bindings.win_thread_object import WindowsThreadObjectType
93-
from cybox.bindings.win_user_account_object import WindowsUserAccountObjectType
94-
from cybox.bindings.win_volume_object import WindowsVolumeObjectType
95-
from cybox.bindings.win_waitable_timer_object import WindowsWaitableTimerObjectType
96-
from cybox.bindings.x509_certificate_object import X509CertificateObjectType
11+
from .account_object import AccountObjectType
12+
from .address_object import AddressObjectType
13+
from .api_object import APIObjectType
14+
from .archive_file_object import ArchiveFileObjectType
15+
from .arp_cache_object import ARPCacheObjectType
16+
from .artifact_object import ArtifactObjectType
17+
from .as_object import ASObjectType
18+
from .code_object import CodeObjectType
19+
from .custom_object import CustomObjectType
20+
from .device_object import DeviceObjectType
21+
from .disk_object import DiskObjectType
22+
from .disk_partition_object import DiskPartitionObjectType
23+
from .dns_cache_object import DNSCacheObjectType
24+
from .dns_query_object import DNSQueryObjectType
25+
from .dns_record_object import DNSRecordObjectType
26+
from .domain_name_object import DomainNameObjectType
27+
from .email_message_object import EmailMessageObjectType
28+
from .file_object import FileObjectType
29+
from .gui_dialogbox_object import GUIDialogboxObjectType
30+
from .gui_object import GUIObjectType
31+
from .gui_window_object import GUIWindowObjectType
32+
from .hostname_object import HostnameObjectType
33+
from .http_session_object import HTTPSessionObjectType
34+
from .image_file_object import ImageFileObjectType
35+
from .library_object import LibraryObjectType
36+
from .link_object import LinkObjectType
37+
from .linux_package_object import LinuxPackageObjectType
38+
from .memory_object import MemoryObjectType
39+
from .mutex_object import MutexObjectType
40+
from .network_connection_object import NetworkConnectionObjectType
41+
from .network_flow_object import NetworkFlowObjectType
42+
from .network_packet_object import NetworkPacketObjectType
43+
from .network_route_entry_object import NetworkRouteEntryObjectType
44+
from .network_route_object import NetRouteObjectType
45+
from .network_socket_object import NetworkSocketObjectType
46+
from .network_subnet_object import NetworkSubnetObjectType
47+
from .pdf_file_object import PDFFileObjectType
48+
from .pipe_object import PipeObjectType
49+
from .port_object import PortObjectType
50+
from .product_object import ProductObjectType
51+
from .process_object import ProcessObjectType
52+
from .semaphore_object import SemaphoreObjectType
53+
from .sms_message_object import SMSMessageObjectType
54+
from .socket_address_object import SocketAddressObjectType
55+
from .system_object import SystemObjectType
56+
from .unix_file_object import UnixFileObjectType
57+
from .unix_network_route_entry_object import UnixNetworkRouteEntryObjectType
58+
from .unix_pipe_object import UnixPipeObjectType
59+
from .unix_process_object import UnixProcessObjectType
60+
from .unix_user_account_object import UnixUserAccountObjectType
61+
from .unix_volume_object import UnixVolumeObjectType
62+
from .uri_object import URIObjectType
63+
from .url_history_object import URLHistoryObjectType
64+
from .user_account_object import UserAccountObjectType
65+
from .volume_object import VolumeObjectType
66+
from .whois_object import WhoisObjectType
67+
from .win_computer_account_object import WindowsComputerAccountObjectType
68+
from .win_critical_section_object import WindowsCriticalSectionObjectType
69+
from .win_driver_object import WindowsDriverObjectType
70+
from .win_event_log_object import WindowsEventLogObjectType
71+
from .win_event_object import WindowsEventObjectType
72+
from .win_executable_file_object import WindowsExecutableFileObjectType
73+
from .win_file_object import WindowsFileObjectType
74+
from .win_filemapping_object import WindowsFilemappingObjectType
75+
from .win_handle_object import WindowsHandleObjectType
76+
from .win_hook_object import WindowsHookObjectType
77+
from .win_kernel_hook_object import WindowsKernelHookObjectType
78+
from .win_kernel_object import WindowsKernelObjectType
79+
from .win_mailslot_object import WindowsMailslotObjectType
80+
from .win_memory_page_region_object import WindowsMemoryPageRegionObjectType
81+
from .win_mutex_object import WindowsMutexObjectType
82+
from .win_network_route_entry_object import WindowsNetworkRouteEntryObjectType
83+
from .win_network_share_object import WindowsNetworkShareObjectType
84+
from .win_pipe_object import WindowsPipeObjectType
85+
from .win_prefetch_object import WindowsPrefetchObjectType
86+
from .win_process_object import WindowsProcessObjectType
87+
from .win_registry_key_object import WindowsRegistryKeyObjectType
88+
from .win_semaphore_object import WindowsSemaphoreObjectType
89+
from .win_service_object import WindowsServiceObjectType
90+
from .win_system_object import WindowsSystemObjectType
91+
from .win_system_restore_object import WindowsSystemRestoreObjectType
92+
from .win_task_object import WindowsTaskObjectType
93+
from .win_thread_object import WindowsThreadObjectType
94+
from .win_user_account_object import WindowsUserAccountObjectType
95+
from .win_volume_object import WindowsVolumeObjectType
96+
from .win_waitable_timer_object import WindowsWaitableTimerObjectType
97+
from .x509_certificate_object import X509CertificateObjectType
9798

9899

99100
class ObservablesType(GeneratedsSuper):
@@ -565,7 +566,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
565566
type_name_ = type_names_[1]
566567

567568
if type_name_ == "CIQAddress3.0InstanceType":
568-
import cybox.bindings.extensions.location.ciq_address_3_0 as ciq_address_binding
569+
from .extensions.location import ciq_address_3_0 as ciq_address_binding
569570
obj_ = ciq_address_binding.CIQAddress3_0InstanceType.factory()
570571
else:
571572
obj_ = cybox_common.LocationType.factory() # IdentityType is not abstract
@@ -975,7 +976,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
975976
type_name_ = type_names_[1]
976977

977978
if type_name_ == "CIQAddress3.0InstanceType":
978-
import cybox.bindings.extensions.location.ciq_address_3_0 as ciq_address_binding
979+
from .extensions.location import iq_address_3_0 as ciq_address_binding
979980
obj_ = ciq_address_binding.CIQAddress3_0InstanceType.factory()
980981
else:
981982
obj_ = cybox_common.LocationType.factory() # IdentityType is not abstract
@@ -1826,7 +1827,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
18261827
type_name_ = type_names_[1]
18271828

18281829
if type_name_ == "CIQAddress3.0InstanceType":
1829-
import cybox.bindings.extensions.location.ciq_address_3_0 as ciq_address_binding
1830+
from .extensions.location import ciq_address_3_0 as ciq_address_binding
18301831
obj_ = ciq_address_binding.CIQAddress3_0InstanceType.factory()
18311832
else:
18321833
obj_ = cybox_common.LocationType.factory() # IdentityType is not abstract

0 commit comments

Comments
 (0)