You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
I'm working on an SMC with domains. Some object are on the shared domain, others in domains.
When I'm connected to a specific domain, I can access to both domain objects and shared-domain objects, but I didn't found any solution to know when an object come from.
Objects are requested with Search.objects.filter function.
Do you have any idea to know to which domain an object come from, or how to filter search inside the current domain, ignoring shared?
Best regards,
Sébastien
The text was updated successfully, but these errors were encountered:
Ah this is a great question.
If an element is in a specific (anything but Shared Domain), it will have
an attribute 'admin_domain'.
It looks like I need to add this to the base Element. I will do now, but in
the meantime, here is an example:
Log in to specific domain and if the attribute exists, it's some domain
other than Shared. If it doesn't then it's a Shared domain object:
session.login(url='http://172.18.1.26:8082', api_key='xxxxxxxxxx', domain='
newdomain')
for host in Search.objects.filter('testhost'):
if getattr(host, 'admin_domain', None):
admin_domain = AdminDomain.from_href(host.admin_domain)
else:
admin_domain = "Shared Domain"
print("Host: %s is in domain: %s" % (host, admin_domain))
I will add this attribute to the 0.7.0 develop branch and run some quick
tests but the above will work!
David
On Sat, Jul 27, 2019 at 4:20 PM Sébastien ***@***.***> wrote:
Hi David,
I'm working on an SMC with domains. Some object are on the shared domain,
others in domains.
When I'm connected to a specific domain, I can access to both domain
objects and shared-domain objects, but I didn't found any solution to know
when an object come from.
Objects are requested with Search.objects.filter function.
Do you have any idea to know to which domain an object come from, or how
to filter search inside the current domain, ignoring shared?
Best regards,
Sébastien
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#66?email_source=notifications&email_token=ADRABVN3OX4T474LQLIEKJTQBS32DA5CNFSM4IHKWMB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB3YNSQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADRABVKKAUCODBJGFYO5K4TQBS32DANCNFSM4IHKWMBQ>
.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi David,
I'm working on an SMC with domains. Some object are on the shared domain, others in domains.
When I'm connected to a specific domain, I can access to both domain objects and shared-domain objects, but I didn't found any solution to know when an object come from.
Objects are requested with Search.objects.filter function.
Do you have any idea to know to which domain an object come from, or how to filter search inside the current domain, ignoring shared?
Best regards,
Sébastien
The text was updated successfully, but these errors were encountered: